Skip to content

Commit

Permalink
Add: openvas-smb debian testing
Browse files Browse the repository at this point in the history
Adds a new image for openvas-smb based on debian:testing

The tags for that are:

- testing - releases
- testing-edge - any change

That way we can buy some time for adjusting our workflow for new debian
releases.
  • Loading branch information
Kraemii committed Jul 11, 2023
1 parent 9a91965 commit 9697c86
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .docker/prod-testing.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ARG VERSION=latest

FROM debian:testing-slim AS build
COPY . /source
RUN sh /source/.github/install-openvas-smb-dependencies.sh

RUN cmake -DCMAKE_BUILD_TYPE=Release -B/build /source
RUN DESTDIR=/install cmake --build /build -- install

FROM debian:testing-slim

RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
libgnutls30 \
libgssapi3-heimdal \
libkrb5-26-heimdal \
libasn1-8-heimdal \
libroken18-heimdal \
libhdb9-heimdal \
libpopt0 \
&& rm -rf /var/lib/apt/lists/*

COPY --from=build /install/ /

RUN ldconfig
35 changes: 33 additions & 2 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
# set this tag to latest and stable
echo "IS_LATEST_TAG=true" >> $GITHUB_ENV
fi
- name: 'Setup meta information (IS_VERSION_TAG: ${{ env.IS_VERSION_TAG }}, IS_LATEST_TAG: ${{ env.IS_LATEST_TAG }} )'
- name: 'Setup meta information debian:stable'
id: meta
uses: docker/metadata-action@v4
with:
Expand Down Expand Up @@ -82,7 +82,8 @@ jobs:
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: 'Setup meta information (IS_VERSION_TAG: ${{ env.IS_VERSION_TAG }}, IS_LATEST_TAG: ${{ env.IS_LATEST_TAG }} )'

- name: 'Setup meta information debian:oldstable'
id: meta-oldstable
uses: docker/metadata-action@v4
with:
Expand Down Expand Up @@ -111,3 +112,33 @@ jobs:
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta-oldstable.outputs.tags }}
labels: ${{ steps.meta-oldstable.outputs.labels }}

- name: 'Setup meta information debian:testing'
id: meta-testing
uses: docker/metadata-action@v4
with:
images: ${{ github.repository }}
labels: |
org.opencontainers.image.vendor=Greenbone
org.opencontainers.image.base.name=debian:testing-slim
flavor: latest=false # no auto latest container tag for git tags
tags: |
# for the images provided for debian:testing we just provide
# testing on an new version or testing-edge when it is on main.
# testing-branch-sha on a branch
type=raw,value=testing,enable=${{ env.IS_LATEST_TAG }}
# if we are on the main branch set edge
type=raw,value=testing-edge,enable=${{ github.ref_name == 'main' }}
# use branch-sha otherwise for pushes to branches other then main (will not be uploaded)
type=raw,value=testing-{{branch}}-{{sha}},enable=${{ github.ref_type == 'branch' && github.event_name == 'push' && github.ref_name != 'main' }}
# use pr-$PR_ID for pull requests (will not be uploaded)
type=ref,event=pr
- name: Build and push Container image testing
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' && (github.ref_type == 'tag' || github.ref_name == 'main') }}
file: .docker/prod-testing.Dockerfile
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta-testing.outputs.tags }}
labels: ${{ steps.meta-testing.outputs.labels }}

0 comments on commit 9697c86

Please sign in to comment.