From b7dffb6ad37f12d8deb416e23c3ecd54daec5e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20R=C3=B6hrich?= Date: Mon, 20 Nov 2023 11:30:51 +0100 Subject: [PATCH 1/2] ci: debug release and nightly workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop buildx from release and nightly workflows. Buildx was having odd trouble with networking related errors. Signed-off-by: Moritz Röhrich (cherry picked from commit b28b4487593f7f588ae9984a68e64143cb037f21) Signed-off-by: Joao Eduardo Luis --- .github/workflows/nightly.yaml | 63 +++++++++++++--------------------- .github/workflows/release.yaml | 56 +++++++++++------------------- 2 files changed, 43 insertions(+), 76 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 2fbd2152..658895b6 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -66,18 +66,6 @@ jobs: python3 -m pip install boto3==1.24.96 python3 -m pip install -r s3tests/requirements.txt - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Context - run: | - docker context create builder - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - endpoint: builder - - name: Quay Login uses: docker/login-action@v2 with: @@ -91,34 +79,29 @@ jobs: DATE="$(date +%Y-%m-%d)" echo "tag=nightly-${DATE}" >> $GITHUB_OUTPUT - - name: Build Unittest Container - uses: docker/build-push-action@v4 - with: - load: true - build-args: | - CMAKE_BUILD_TYPE=Release - S3GW_VERSION=${{ steps.date.outputs.tag }} - NPROC=16 - tags: | - s3gw-unittests - target: s3gw-unittests - file: s3gw/Dockerfile - context: s3gw - - - name: Build Nightly Container - uses: docker/build-push-action@v4 - with: - push: true - build-args: | - CMAKE_BUILD_TYPE=Release - S3GW_VERSION=${{ steps.date.outputs.tag }} - NPROC=16 - QUAY_EXPIRATION=1w - tags: | - quay.io/s3gw/s3gw:${{ steps.date.outputs.tag }} - quay.io/s3gw/s3gw:nightly-latest - file: s3gw/Dockerfile - context: s3gw + - name: Build Unittests + run: | + docker build \ + --build-arg CMAKE_BUILD_TYPE=Release \ + --build-arg NPROC=16 \ + --file s3gw/Dockerfile \ + --tag s3gw-unittests \ + --target s3gw-unittests \ + s3gw + + - name: Build s3gw Container Image + run: | + docker build \ + --build-arg CMAKE_BUILD_TYPE=Release \ + --build-arg NPROC=16 \ + --build-arg S3GW_VERSION=${{ steps.date.outputs.tag }} \ + --build-arg QUAY_EXPIRATION=1w \ + --file s3gw/Dockerfile \ + --tag quay.io/s3gw/s3gw:latest \ + --tag quay.io/s3gw/s3gw:${{ steps.date.outputs.tag }} \ + s3gw + docker push quay.io/s3gw/s3gw:nightly-latest + docker push quay.io/s3gw/s3gw:${{ steps.date.outputs.tag }} - name: Run Unittests run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 49b8f3d0..2828baae 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,18 +16,6 @@ jobs: with: submodules: recursive - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Context - run: | - docker context create builder - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - endpoint: builder - - name: Quay Login uses: docker/login-action@v2 with: @@ -36,36 +24,32 @@ jobs: password: ${{ secrets.QUAY_PASSWORD }} - name: Build Unittests - uses: docker/build-push-action@v4 - with: - load: true - build-args: | - CMAKE_BUILD_TYPE=Release - NPROC=16 - tags: | - s3gw-unittests - target: s3gw-unittests - file: Dockerfile - context: . + run: | + docker build \ + --build-arg CMAKE_BUILD_TYPE=Release \ + --build-arg NPROC=16 \ + --file Dockerfile \ + --tag s3gw-unittests \ + --target s3gw-unittests \ + . - name: Run Unittests run: | docker run --rm s3gw-unittests - name: Build s3gw Container Image - uses: docker/build-push-action@v4 - with: - push: true - build-args: | - CMAKE_BUILD_TYPE=Release - S3GW_VERSION=${{ github.ref_name }} - NPROC=16 - QUAY_EXPIRATION=Never - tags: | - quay.io/s3gw/s3gw:latest - quay.io/s3gw/s3gw:${{ github.ref_name }} - file: Dockerfile - context: . + run: | + docker build \ + --build-arg CMAKE_BUILD_TYPE=Release \ + --build-arg NPROC=16 \ + --build-arg S3GW_VERSION=${{ github.ref_name }} \ + --build-arg QUAY_EXPIRATION=Never \ + --file Dockerfile \ + --tag quay.io/s3gw/s3gw:latest \ + --tag quay.io/s3gw/s3gw:${{ github.ref_name }} \ + . + docker push quay.io/s3gw/s3gw:latest + docker push quay.io/s3gw/s3gw:${{ github.ref_name }} pre-release-smoke-test: runs-on: ubuntu-latest From 76a9b5863cdf3b64a37b27dba1dcc2ebb4eb4e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20R=C3=B6hrich?= Date: Mon, 20 Nov 2023 16:11:39 +0100 Subject: [PATCH 2/2] fixup container tag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Moritz Röhrich (cherry picked from commit 318b6cfa857f063f874114ff50cf8fad2a78b506) Signed-off-by: Joao Eduardo Luis --- .github/workflows/nightly.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 658895b6..ab334d9a 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -97,7 +97,7 @@ jobs: --build-arg S3GW_VERSION=${{ steps.date.outputs.tag }} \ --build-arg QUAY_EXPIRATION=1w \ --file s3gw/Dockerfile \ - --tag quay.io/s3gw/s3gw:latest \ + --tag quay.io/s3gw/s3gw:nightly-latest \ --tag quay.io/s3gw/s3gw:${{ steps.date.outputs.tag }} \ s3gw docker push quay.io/s3gw/s3gw:nightly-latest