From 5bc45d3542170d787635c5e9a6e02c63bd976b34 Mon Sep 17 00:00:00 2001 From: Philipp Eder Date: Tue, 25 Jun 2024 08:22:59 +0200 Subject: [PATCH 1/2] Removes build-container As the build container construct is not used for some time but fails it is removed. --- .docker/build.Dockerfile | 40 --------------- .github/workflows/build-container.yml | 65 ------------------------- .github/workflows/ci-c.yml | 6 ++- .github/workflows/codeql-analysis-c.yml | 3 +- 4 files changed, 6 insertions(+), 108 deletions(-) delete mode 100644 .docker/build.Dockerfile delete mode 100644 .github/workflows/build-container.yml diff --git a/.docker/build.Dockerfile b/.docker/build.Dockerfile deleted file mode 100644 index 5a7f0e3b..00000000 --- a/.docker/build.Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -# Dockerfile for gvm-libs-$COMPILER-build:$VERSION - -# Define ARG we use through the build -ARG VERSION=unstable - -# Use '-slim' image for reduced image size -FROM debian:stable-slim -LABEL deprecated="This image is deprecated and may be removed soon." - -# This will make apt-get install without question -ARG DEBIAN_FRONTEND=noninteractive - -# Redefine ARG we use through the build -ARG COMPILER - -WORKDIR /source - -# Install core dependencies required for building and testing gvm-libs -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - build-essential \ - curl \ - cmake \ - pkg-config \ - gnupg \ - libglib2.0-dev \ - libgpgme-dev \ - libgnutls28-dev \ - uuid-dev \ - libssh-gcrypt-dev \ - libhiredis-dev \ - libxml2-dev \ - libpcap-dev \ - libnet1-dev \ - libldap2-dev \ - libradcli-dev \ - libpaho-mqtt-dev \ - libcgreen1-dev \ - lcov \ - && rm -rf /var/lib/apt/lists/* diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml deleted file mode 100644 index 78451975..00000000 --- a/.github/workflows/build-container.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Build Container Image Builds - -on: - push: - branches: [ main, stable, oldstable ] - tags: ["v*"] - paths: - - .github/workflows/build-container.yml - - .docker/build.Dockerfile - pull_request: - branches: [ main, stable, oldstable ] - paths: - - .github/workflows/build-container.yml - - .docker/build.Dockerfile - workflow_dispatch: - schedule: - # rebuild image every sunday - - cron: "0 0 * * 0" - -jobs: - build: - name: Build Images - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup container meta information - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ github.repository }}-build - labels: | - org.opencontainers.image.vendor=Greenbone - org.opencontainers.image.base.name=debian:stable-slim - flavor: latest=false # no latest container tag for git tags - tags: | - # create container tag for git tags - type=ref,event=tag - type=ref,event=pr - # use latest for stable branch - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'stable') }} - type=raw,value=stable,enable=${{ github.ref == format('refs/heads/{0}', 'stable') }} - type=raw,value=oldstable,enable=${{ github.ref == format('refs/heads/{0}', 'oldstable') }} - # use unstable for main branch - type=raw,value=unstable,enable={{is_default_branch}} - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - run: echo "Build and push ${{ steps.container.outputs.image-tags }}" - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: . - push: ${{ github.event_name != 'pull_request' }} - file: .docker/build.Dockerfile - platforms: linux/amd64,linux/arm64 - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/ci-c.yml b/.github/workflows/ci-c.yml index 78cd2fe5..4669c8e5 100644 --- a/.github/workflows/ci-c.yml +++ b/.github/workflows/ci-c.yml @@ -21,9 +21,10 @@ jobs: tests: name: Unit Tests runs-on: 'ubuntu-latest' - container: greenbone/gvm-libs-build:unstable + container: greenbone/gvm-libs:unstable steps: - uses: actions/checkout@v4 + - run: sh .github/install-dependencies.sh - name: Configure and Compile gvm-libs run: | mkdir build @@ -39,9 +40,10 @@ jobs: scan-build: name: Scan-build gvm-libs with clang runs-on: 'ubuntu-latest' - container: greenbone/gvm-libs-build:unstable + container: greenbone/gvm-libs:unstable steps: - uses: actions/checkout@v4 + - run: sh .github/install-dependencies.sh - name: Install clang tools run: | apt update diff --git a/.github/workflows/codeql-analysis-c.yml b/.github/workflows/codeql-analysis-c.yml index f17d8e98..c99fa496 100644 --- a/.github/workflows/codeql-analysis-c.yml +++ b/.github/workflows/codeql-analysis-c.yml @@ -19,7 +19,7 @@ jobs: actions: read contents: read security-events: write - container: greenbone/gvm-libs-build:unstable + container: greenbone/gvm-libs:unstable strategy: fail-fast: false @@ -30,6 +30,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - run: sh .github/install-dependencies.sh - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: From 46982a31c3b4851ceedff58b288b1268576186fb Mon Sep 17 00:00:00 2001 From: Philipp Eder Date: Fri, 28 Jun 2024 10:59:05 +0200 Subject: [PATCH 2/2] Switch unstable to edge tag --- .github/workflows/ci-c.yml | 4 ++-- .github/workflows/codeql-analysis-c.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-c.yml b/.github/workflows/ci-c.yml index 4669c8e5..a052f860 100644 --- a/.github/workflows/ci-c.yml +++ b/.github/workflows/ci-c.yml @@ -21,7 +21,7 @@ jobs: tests: name: Unit Tests runs-on: 'ubuntu-latest' - container: greenbone/gvm-libs:unstable + container: greenbone/gvm-libs:edge steps: - uses: actions/checkout@v4 - run: sh .github/install-dependencies.sh @@ -40,7 +40,7 @@ jobs: scan-build: name: Scan-build gvm-libs with clang runs-on: 'ubuntu-latest' - container: greenbone/gvm-libs:unstable + container: greenbone/gvm-libs:edge steps: - uses: actions/checkout@v4 - run: sh .github/install-dependencies.sh diff --git a/.github/workflows/codeql-analysis-c.yml b/.github/workflows/codeql-analysis-c.yml index c99fa496..71f74ccf 100644 --- a/.github/workflows/codeql-analysis-c.yml +++ b/.github/workflows/codeql-analysis-c.yml @@ -19,7 +19,7 @@ jobs: actions: read contents: read security-events: write - container: greenbone/gvm-libs:unstable + container: greenbone/gvm-libs:edge strategy: fail-fast: false