Skip to content

Commit 956ceda

Browse files
committed
Fix: CI: edge should be based on the stable image
Fixes the bug that the definition of prod-testing ended up in edge instead of testing-edge.
1 parent b9f3f57 commit 956ceda

File tree

5 files changed

+14
-19
lines changed

5 files changed

+14
-19
lines changed

.docker/prod-oldstable.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ RUN setcap cap_net_raw,cap_net_admin+eip /usr/local/sbin/openvas
9292
# allow nmap to send e.g. UDP or TCP SYN probes without root permissions
9393
ENV NMAP_PRIVILEGED=1
9494
RUN setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip /usr/bin/nmap
95-
CMD /usr/local/bin/openvasd
95+
CMD ["/usr/local/bin/openvasd"]

.docker/prod-testing.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,4 @@ RUN setcap cap_net_raw,cap_net_admin+eip /usr/local/sbin/openvas
7171
# allow nmap to send e.g. UDP or TCP SYN probes without root permissions
7272
ENV NMAP_PRIVILEGED=1
7373
RUN setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip /usr/bin/nmap
74+
CMD ["/usr/local/bin/openvasd"]

.docker/prod.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,4 @@ RUN setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip /usr/bin/nmap
9494
RUN chmod 755 /usr/local/bin/scannerctl
9595
RUN chmod 755 /usr/local/bin/openvasd
9696
RUN mkdir -p /var/lib/openvasd/certs
97-
CMD /usr/local/bin/openvasd
97+
CMD ["/usr/local/bin/openvasd"]

.github/workflows/control.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
needs: [build-rs-amd64]
9494
uses: ./.github/workflows/functional.yaml
9595
container:
96-
needs: [build, init, build-rs-arm64, build-rs-amd64]
96+
needs: [build, init]
9797
uses: ./.github/workflows/push-container.yml
9898
secrets:
9999
dockerhub_user: ${{ secrets.DOCKERHUB_USERNAME }}

.github/workflows/push-container.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ jobs:
5656
dockerfile: .docker/prod.Dockerfile
5757
stable-name: stable
5858
edge-name: edge
59+
tags: |
60+
type=raw,value=latest,enable=${{ inputs.is_latest_tag }}
61+
type=raw,value=stable,enable=${{ inputs.is_latest_tag }}
62+
type=semver,pattern={{version}},enable=${{ inputs.is_version_tag }}
63+
type=semver,pattern={{major}}.{{minor}},enable=${{ inputs.is_version_tag }}
64+
type=semver,pattern={{major}},enable=${{ inputs.is_version_tag }}
65+
type=raw,value=edge,enable=${{ github.ref_name == 'main' }}
66+
type=raw,value={{branch}}-{{sha}},enable=${{ github.ref_type == 'branch' && github.event_name == 'push' && github.ref_name != 'main' }}
67+
type=ref,event=pr
5968
- build:
6069
name: testing
6170
dockerfile: .docker/prod-testing.Dockerfile
@@ -69,8 +78,6 @@ jobs:
6978
name: Build and Push Container Images (${{ matrix.build.name }})
7079
uses: greenbone/workflows/.github/workflows/container-build-push-gea.yml@main
7180
with:
72-
ref: ${{ inputs.ref-name }}
73-
ref-name: ${{ inputs.ref-name }}
7481
name: ${{ matrix.build.name }}
7582
dockerfile: ${{ matrix.build.dockerfile }}
7683
stable-name: ${{ matrix.build.stable-name }}
@@ -83,20 +90,7 @@ jobs:
8390
org.opencontainers.image.base.name=debian:stable-slim
8491
build-args: ${{ matrix.build.build-args }}
8592
prefix: ${{ matrix.build.prefix }}
86-
tags: |
87-
# when IS_LATEST_TAG is set create a stable and a latest tag
88-
type=raw,value=latest,enable=${{ inputs.is_latest_tag }}
89-
type=raw,value=stable,enable=${{ inputs.is_latest_tag }}
90-
# if tag version is set than create a version tags
91-
type=semver,pattern={{version}},enable=${{ inputs.is_version_tag }}
92-
type=semver,pattern={{major}}.{{minor}},enable=${{ inputs.is_version_tag }}
93-
type=semver,pattern={{major}},enable=${{ inputs.is_version_tag }}
94-
# if on main or a branch TODO calculate upfront
95-
type=raw,value=edge,enable=${{ github.ref_name == 'main' }}
96-
type=raw,value={{branch}}-{{sha}},enable=${{ github.ref_type == 'branch' && github.event_name == 'push' && github.ref_name != 'main' }}
97-
# use pr-$PR_ID for pull requests (will not be uploaded)
98-
type=ref,event=pr
99-
93+
tags: ${{ matrix.tags }}
10094
secrets: inherit
10195

10296
notify:

0 commit comments

Comments
 (0)