From f8957e6a6a50cd5720597946506e2cb3ed1194c1 Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Fri, 8 Apr 2022 14:35:50 +0100 Subject: [PATCH 01/17] workflows: fix wildcard error Signed-off-by: Patrick Stephens --- .github/workflows/staging-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging-build.yaml b/.github/workflows/staging-build.yaml index db0dede528a..bb389f457cc 100644 --- a/.github/workflows/staging-build.yaml +++ b/.github/workflows/staging-build.yaml @@ -101,7 +101,7 @@ jobs: # We may have no schema so ignore that failure continue-on-error: true run: | - aws --region "$AWS_REGION" s3 sync *.json "s3://${AWS_S3_BUCKET}/${DEST_DIR}" --no-progress ${ENDPOINT} + aws --region "$AWS_REGION" s3 sync "*.json" "s3://${AWS_S3_BUCKET}/${DEST_DIR}" --no-progress ${ENDPOINT} env: DEST_DIR: "${{ needs.staging-build-get-meta.outputs.version }}/" AWS_REGION: "us-east-1" From 3929767c2df5e95e97a2733c8a2aa240307c2a5e Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Fri, 8 Apr 2022 14:40:31 +0100 Subject: [PATCH 02/17] workflows: remove region Signed-off-by: Patrick Stephens --- .github/workflows/staging-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging-build.yaml b/.github/workflows/staging-build.yaml index bb389f457cc..017bdd58c2b 100644 --- a/.github/workflows/staging-build.yaml +++ b/.github/workflows/staging-build.yaml @@ -101,7 +101,7 @@ jobs: # We may have no schema so ignore that failure continue-on-error: true run: | - aws --region "$AWS_REGION" s3 sync "*.json" "s3://${AWS_S3_BUCKET}/${DEST_DIR}" --no-progress ${ENDPOINT} + aws s3 sync "*.json" "s3://${AWS_S3_BUCKET}/${DEST_DIR}" --no-progress ${ENDPOINT} env: DEST_DIR: "${{ needs.staging-build-get-meta.outputs.version }}/" AWS_REGION: "us-east-1" From ece5cace3ceae9171f074e0ad9297850aa8dd18d Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Fri, 8 Apr 2022 16:03:41 +0100 Subject: [PATCH 03/17] packaging: add test and Windows scripts Signed-off-by: Patrick Stephens --- packaging/server/publish-all.sh | 0 packaging/server/windows-checksums.sh | 22 ++++++++++++++++++++++ packaging/test-release-packages.sh | 10 ++++++++++ 3 files changed, 32 insertions(+) mode change 100644 => 100755 packaging/server/publish-all.sh create mode 100755 packaging/server/windows-checksums.sh create mode 100755 packaging/test-release-packages.sh diff --git a/packaging/server/publish-all.sh b/packaging/server/publish-all.sh old mode 100644 new mode 100755 diff --git a/packaging/server/windows-checksums.sh b/packaging/server/windows-checksums.sh new file mode 100755 index 00000000000..9092b366f54 --- /dev/null +++ b/packaging/server/windows-checksums.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -eu + +MAJOR_VERSION=${MAJOR_VERSION:?} +PACKAGE_DIR=${PACKAGE_DIR:?} + +pushd "$PACKAGE_DIR" + +for i in *.exe +do + echo "$i" + sha256sum "$i" > "$i".sha256 +done + +for i in *.zip +do + echo "$i" + sha256sum "$i" > "$i".sha256 +done +popd + +sudo cp -v "$PACKAGE_DIR"/* /var/www/releases.fluentbit.io/releases/"$MAJOR_VERSION"/ diff --git a/packaging/test-release-packages.sh b/packaging/test-release-packages.sh new file mode 100755 index 00000000000..19f1b8e9125 --- /dev/null +++ b/packaging/test-release-packages.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -eux +# Verify package install for a latest release version +docker run --rm -it ubuntu:20.04 sh -c "apt-get update && apt-get install -y sudo gpg curl;curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh" +docker run --rm -it ubuntu:18.04 sh -c "apt-get update && apt-get install -y sudo gpg curl;curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh" +docker run --rm -it debian:10 sh -c "apt-get update && apt-get install -y sudo gpg curl;curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh" +docker run --rm -it debian:11 sh -c "apt-get update && apt-get install -y sudo gpg curl;curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh" +docker run --rm -it centos:7 sh -c "yum install -y curl sudo;curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh" +docker run --rm -it rockylinux:8 sh -c "yum install -y curl sudo;curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh" +docker run --rm -it amazonlinux:2 sh -c "yum install -y curl sudo;curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh" From 6d8c220186512ceb44c21b15df661be5d973963d Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Fri, 8 Apr 2022 16:38:11 +0100 Subject: [PATCH 04/17] workflows: add Windows container build Signed-off-by: Patrick Stephens --- .github/workflows/call-build-images.yaml | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/.github/workflows/call-build-images.yaml b/.github/workflows/call-build-images.yaml index 3d4d8e9c677..f8f5e65b495 100644 --- a/.github/workflows/call-build-images.yaml +++ b/.github/workflows/call-build-images.yaml @@ -284,3 +284,53 @@ jobs: env: COSIGN_PRIVATE_KEY: ${{ secrets.cosign_private_key }} COSIGN_PASSWORD: ${{ secrets.cosign_private_key_password }} # optional + + # This takes a long time... + call-build-windows-container: + name: Windows container image + runs-on: windows-2019 + environment: ${{ inputs.environment }} + needs: + - call-build-legacy-check + permissions: + contents: read + packages: write + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + ref: ${{ inputs.ref }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to the Container registry + uses: docker/login-action@v1 + with: + registry: ${{ inputs.registry }} + username: ${{ inputs.username }} + password: ${{ secrets.token }} + + - name: Extract metadata from Github + id: meta + uses: docker/metadata-action@v3 + with: + images: ${{ inputs.registry }}/${{ inputs.image }} + tags: | + raw,windows-2019-${{ inputs.version }} + raw,windows-2019 + + - name: Build the production images + uses: docker/build-push-action@v2 + with: + file: ./dockerfiles/Dockerfile.windows + context: . + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + platforms: windows/amd64 + target: runtime + push: true + load: false + build-args: | + FLB_NIGHTLY_BUILD=${{ inputs.unstable }} + WINDOWS_VERSION=ltsc2019 From 8def290674b3e7f174cf56a98529bdbc0feacad9 Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Fri, 8 Apr 2022 16:41:20 +0100 Subject: [PATCH 05/17] workflows: switch path separator Signed-off-by: Patrick Stephens --- .github/workflows/call-build-windows.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/call-build-windows.yaml b/.github/workflows/call-build-windows.yaml index af9c8de3b81..3412acb3c90 100644 --- a/.github/workflows/call-build-windows.yaml +++ b/.github/workflows/call-build-windows.yaml @@ -83,8 +83,8 @@ jobs: # Only upload for staging if: inputs.environment == 'staging' run: | - aws s3 sync "build/*-bit-*.exe" "s3://${{ secrets.bucket }}/${{ inputs.version }}/windows/" --follow-symlinks --no-progress --delete - aws s3 sync "build/*-bit-*.zip" "s3://${{ secrets.bucket }}/${{ inputs.version }}/windows/" --follow-symlinks --no-progress + aws s3 sync "build\*-bit-*.exe" "s3://${{ secrets.bucket }}/${{ inputs.version }}/windows/" --follow-symlinks --no-progress --delete + aws s3 sync "build\*-bit-*.zip" "s3://${{ secrets.bucket }}/${{ inputs.version }}/windows/" --follow-symlinks --no-progress env: AWS_REGION: "us-east-1" AWS_ACCESS_KEY_ID: ${{ secrets.access_key_id }} From b7fc7fd2d1e6f2536bad891e854c691479be7a47 Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Fri, 8 Apr 2022 17:04:05 +0100 Subject: [PATCH 06/17] workflows: windows CI Signed-off-by: Patrick Stephens --- .github/workflows/call-build-windows.yaml | 34 ++++++++++++++++++++--- packaging/server/publish-all.sh | 6 +++- packaging/server/windows-checksums.sh | 22 --------------- packaging/windows-checksums.sh | 18 ++++++++++++ 4 files changed, 53 insertions(+), 27 deletions(-) delete mode 100755 packaging/server/windows-checksums.sh create mode 100755 packaging/windows-checksums.sh diff --git a/.github/workflows/call-build-windows.yaml b/.github/workflows/call-build-windows.yaml index 3412acb3c90..309bcb60d06 100644 --- a/.github/workflows/call-build-windows.yaml +++ b/.github/workflows/call-build-windows.yaml @@ -79,13 +79,39 @@ jobs: build/*-bit-*.zip if-no-files-found: error - - name: Push packages to S3 - # Only upload for staging + call-build-windows-s3: + name: Handle upload to S3 + runs-on: ubuntu-latest + needs: + - call-build-windows-package + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + ref: ${{ inputs.ref }} + + - name: Download all artefacts + continue-on-error: true + uses: actions/download-artifact@v2 + with: + path: artifacts/ + + - name: Set up Windows checksums + run: | + ls -lR artifacts/ + packaging/windows-checksums.sh + shell: bash + env: + SOURCE_DIR: artifacts + + - name: Push Windows packages to S3 if: inputs.environment == 'staging' + # Only upload for staging run: | - aws s3 sync "build\*-bit-*.exe" "s3://${{ secrets.bucket }}/${{ inputs.version }}/windows/" --follow-symlinks --no-progress --delete - aws s3 sync "build\*-bit-*.zip" "s3://${{ secrets.bucket }}/${{ inputs.version }}/windows/" --follow-symlinks --no-progress + aws s3 sync "$SOURCE_DIR" "s3://$DEST_DIR" --follow-symlinks --no-progress --delete env: + SOURCE_DIR: "artifacts" + DEST_DIR: "${{ secrets.bucket }}/${{ inputs.version }}/windows/" AWS_REGION: "us-east-1" AWS_ACCESS_KEY_ID: ${{ secrets.access_key_id }} AWS_SECRET_ACCESS_KEY: ${{ secrets.secret_access_key }} diff --git a/packaging/server/publish-all.sh b/packaging/server/publish-all.sh index c8ec561f46d..96d136b1ea5 100755 --- a/packaging/server/publish-all.sh +++ b/packaging/server/publish-all.sh @@ -13,6 +13,7 @@ if [ -z "$1" ]; then exit 1 fi VERSION="$1" +MAJOR_VERSION=${MAJOR_VERSION:-VERSION##\.*} if [[ ! -d "$SOURCE_DIR" ]]; then echo "Missing source directory: $SOURCE_DIR" @@ -114,4 +115,7 @@ if ! aptly -config="$APTLY_CONFIG" publish switch -gpg-key="releases@fluentbit.i fi # Sign YUM repo meta-data -find "/var/www/apt.fluentbit.io" -name repomd.xml -exec gpg --detach-sign --armor --yes -u "releases@fluentbit.io" {} \; \ No newline at end of file +find "/var/www/apt.fluentbit.io" -name repomd.xml -exec gpg --detach-sign --armor --yes -u "releases@fluentbit.io" {} \; + +# Windows +cp -v "$SOURCE_DIR/windows/*$VERSION*" /var/www/releases.fluentbit.io/releases/"$MAJOR_VERSION"/ diff --git a/packaging/server/windows-checksums.sh b/packaging/server/windows-checksums.sh deleted file mode 100755 index 9092b366f54..00000000000 --- a/packaging/server/windows-checksums.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -set -eu - -MAJOR_VERSION=${MAJOR_VERSION:?} -PACKAGE_DIR=${PACKAGE_DIR:?} - -pushd "$PACKAGE_DIR" - -for i in *.exe -do - echo "$i" - sha256sum "$i" > "$i".sha256 -done - -for i in *.zip -do - echo "$i" - sha256sum "$i" > "$i".sha256 -done -popd - -sudo cp -v "$PACKAGE_DIR"/* /var/www/releases.fluentbit.io/releases/"$MAJOR_VERSION"/ diff --git a/packaging/windows-checksums.sh b/packaging/windows-checksums.sh new file mode 100755 index 00000000000..2b243ddc01c --- /dev/null +++ b/packaging/windows-checksums.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -eu + +SOURCE_DIR=${SOURCE_DIR:?} + +pushd "$SOURCE_DIR" +for i in *.exe +do + echo "$i" + sha256sum "$i" > "$i".sha256 +done + +for i in *.zip +do + echo "$i" + sha256sum "$i" > "$i".sha256 +done +popd From a937a229eedd44d232bd808de246c11229a6a0cf Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Fri, 8 Apr 2022 17:13:26 +0100 Subject: [PATCH 07/17] workflows: remove --delete Signed-off-by: Patrick Stephens --- .github/workflows/call-build-windows.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call-build-windows.yaml b/.github/workflows/call-build-windows.yaml index 309bcb60d06..3e6506583bb 100644 --- a/.github/workflows/call-build-windows.yaml +++ b/.github/workflows/call-build-windows.yaml @@ -108,7 +108,7 @@ jobs: if: inputs.environment == 'staging' # Only upload for staging run: | - aws s3 sync "$SOURCE_DIR" "s3://$DEST_DIR" --follow-symlinks --no-progress --delete + aws s3 sync "$SOURCE_DIR" "s3://$DEST_DIR" --follow-symlinks --no-progress env: SOURCE_DIR: "artifacts" DEST_DIR: "${{ secrets.bucket }}/${{ inputs.version }}/windows/" From c5b8e7dd3de6263aa2592d7ee662627391f3ef2b Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Fri, 8 Apr 2022 17:17:43 +0100 Subject: [PATCH 08/17] workflows: fix schema upload Signed-off-by: Patrick Stephens --- .github/workflows/staging-build.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/staging-build.yaml b/.github/workflows/staging-build.yaml index 017bdd58c2b..dc51f486d3b 100644 --- a/.github/workflows/staging-build.yaml +++ b/.github/workflows/staging-build.yaml @@ -92,16 +92,18 @@ jobs: uses: actions/download-artifact@v2 with: name: fluent-bit-schema-${{ needs.staging-build-get-meta.outputs.version }} + path: artifacts/ - name: Display structure of downloaded files - run: ls -R + run: | + ls -R shell: bash - name: Push schema to S3 bucket # We may have no schema so ignore that failure continue-on-error: true run: | - aws s3 sync "*.json" "s3://${AWS_S3_BUCKET}/${DEST_DIR}" --no-progress ${ENDPOINT} + aws s3 sync "artifacts/" "s3://${AWS_S3_BUCKET}/${DEST_DIR}" --no-progress env: DEST_DIR: "${{ needs.staging-build-get-meta.outputs.version }}/" AWS_REGION: "us-east-1" From 21de3705c44316096b1b47e978104b3586ca78b2 Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Mon, 11 Apr 2022 09:33:04 +0100 Subject: [PATCH 09/17] workflows: minor tweak Signed-off-by: Patrick Stephens --- .github/workflows/call-build-windows.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/call-build-windows.yaml b/.github/workflows/call-build-windows.yaml index 3e6506583bb..2a9b0a96f77 100644 --- a/.github/workflows/call-build-windows.yaml +++ b/.github/workflows/call-build-windows.yaml @@ -79,7 +79,7 @@ jobs: build/*-bit-*.zip if-no-files-found: error - call-build-windows-s3: + call-build-windows-s3-upload: name: Handle upload to S3 runs-on: ubuntu-latest needs: @@ -98,15 +98,15 @@ jobs: - name: Set up Windows checksums run: | - ls -lR artifacts/ packaging/windows-checksums.sh + ls -lR artifacts/ shell: bash env: SOURCE_DIR: artifacts - name: Push Windows packages to S3 - if: inputs.environment == 'staging' # Only upload for staging + if: inputs.environment == 'staging' run: | aws s3 sync "$SOURCE_DIR" "s3://$DEST_DIR" --follow-symlinks --no-progress env: From e9f01f97865a28e38e60e4f22d3d2f1a82e7d01e Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Mon, 11 Apr 2022 09:35:42 +0100 Subject: [PATCH 10/17] workflows: REVERT - test this branch Signed-off-by: Patrick Stephens --- .github/workflows/staging-build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/staging-build.yaml b/.github/workflows/staging-build.yaml index dc51f486d3b..c8d7169c9b9 100644 --- a/.github/workflows/staging-build.yaml +++ b/.github/workflows/staging-build.yaml @@ -66,7 +66,7 @@ jobs: staging-build-images: needs: staging-build-get-meta - uses: fluent/fluent-bit/.github/workflows/call-build-images.yaml@master + uses: fluent/fluent-bit/.github/workflows/call-build-images.yaml@5196_windows_release_artefacts with: version: ${{ needs.staging-build-get-meta.outputs.version }} ref: ${{ github.event.inputs.version || github.ref_name }} @@ -145,7 +145,7 @@ jobs: staging-build-windows-packages: needs: - staging-build-get-meta - uses: fluent/fluent-bit/.github/workflows/call-build-windows.yaml@master + uses: fluent/fluent-bit/.github/workflows/call-build-windows.yaml@5196_windows_release_artefacts with: version: ${{ needs.staging-build-get-meta.outputs.version }} ref: ${{ github.event.inputs.version || github.ref_name }} From 97c5655642ea82d8345cf48af4254b91b4789e63 Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Mon, 11 Apr 2022 09:43:12 +0100 Subject: [PATCH 11/17] workflows: direct container build rather than action Signed-off-by: Patrick Stephens --- .github/workflows/call-build-images.yaml | 34 +++++++++++++++--------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/call-build-images.yaml b/.github/workflows/call-build-images.yaml index f8f5e65b495..48cbcf95577 100644 --- a/.github/workflows/call-build-images.yaml +++ b/.github/workflows/call-build-images.yaml @@ -321,16 +321,24 @@ jobs: raw,windows-2019 - name: Build the production images - uses: docker/build-push-action@v2 - with: - file: ./dockerfiles/Dockerfile.windows - context: . - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - platforms: windows/amd64 - target: runtime - push: true - load: false - build-args: | - FLB_NIGHTLY_BUILD=${{ inputs.unstable }} - WINDOWS_VERSION=ltsc2019 + run: + docker build -t ${{ steps.meta.outputs.tags }} --build-arg FLB_NIGHTLY_BUILD=${{ inputs.unstable }} --build-arg WINDOWS_VERSION=ltsc2019 -f ./dockerfiles/Dockerfile.windows . + docker push ${{ steps.meta.outputs.tags }} + env: + DOCKER_BUILDKIT: 1 + # We cannot use this action as it requires privileged mode + # uses: docker/build-push-action@v2 + # with: + # file: ./dockerfiles/Dockerfile.windows + # context: . + # tags: ${{ steps.meta.outputs.tags }} + # labels: ${{ steps.meta.outputs.labels }} + # platforms: windows/amd64 + # target: runtime + # push: true + # load: false + # build-args: | + # FLB_NIGHTLY_BUILD=${{ inputs.unstable }} + # WINDOWS_VERSION=ltsc2019 + + From 47731b8bcb27b16369cedfac36bafa5cf50d80c3 Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Mon, 11 Apr 2022 09:49:15 +0100 Subject: [PATCH 12/17] workflows: fix Windows tags Signed-off-by: Patrick Stephens --- .github/workflows/call-build-images.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/call-build-images.yaml b/.github/workflows/call-build-images.yaml index 48cbcf95577..dc9bb33e956 100644 --- a/.github/workflows/call-build-images.yaml +++ b/.github/workflows/call-build-images.yaml @@ -322,8 +322,10 @@ jobs: - name: Build the production images run: - docker build -t ${{ steps.meta.outputs.tags }} --build-arg FLB_NIGHTLY_BUILD=${{ inputs.unstable }} --build-arg WINDOWS_VERSION=ltsc2019 -f ./dockerfiles/Dockerfile.windows . - docker push ${{ steps.meta.outputs.tags }} + docker build -t ${{ inputs.registry }}/${{ inputs.image }}:windows-2019-${{ inputs.version }} --build-arg FLB_NIGHTLY_BUILD=${{ inputs.unstable }} --build-arg WINDOWS_VERSION=ltsc2019 -f ./dockerfiles/Dockerfile.windows . + docker push ${{ inputs.registry }}/${{ inputs.image }}:windows-2019-${{ inputs.version }} + docker tag ${{ inputs.registry }}/${{ inputs.image }}:windows-2019-${{ inputs.version }} ${{ inputs.registry }}/${{ inputs.image }}:windows-2019 + docker push ${{ inputs.registry }}/${{ inputs.image }}:windows-2019 env: DOCKER_BUILDKIT: 1 # We cannot use this action as it requires privileged mode From b6b9d063f2b9d4abf3da283dfaee1906c86a4e32 Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Mon, 11 Apr 2022 09:51:35 +0100 Subject: [PATCH 13/17] workflows: fix Windows multi-line shell Signed-off-by: Patrick Stephens --- .github/workflows/call-build-images.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/call-build-images.yaml b/.github/workflows/call-build-images.yaml index dc9bb33e956..4aad31ab563 100644 --- a/.github/workflows/call-build-images.yaml +++ b/.github/workflows/call-build-images.yaml @@ -311,17 +311,17 @@ jobs: username: ${{ inputs.username }} password: ${{ secrets.token }} - - name: Extract metadata from Github - id: meta - uses: docker/metadata-action@v3 - with: - images: ${{ inputs.registry }}/${{ inputs.image }} - tags: | - raw,windows-2019-${{ inputs.version }} - raw,windows-2019 + # - name: Extract metadata from Github + # id: meta + # uses: docker/metadata-action@v3 + # with: + # images: ${{ inputs.registry }}/${{ inputs.image }} + # tags: | + # raw,windows-2019-${{ inputs.version }} + # raw,windows-2019 - name: Build the production images - run: + run: | docker build -t ${{ inputs.registry }}/${{ inputs.image }}:windows-2019-${{ inputs.version }} --build-arg FLB_NIGHTLY_BUILD=${{ inputs.unstable }} --build-arg WINDOWS_VERSION=ltsc2019 -f ./dockerfiles/Dockerfile.windows . docker push ${{ inputs.registry }}/${{ inputs.image }}:windows-2019-${{ inputs.version }} docker tag ${{ inputs.registry }}/${{ inputs.image }}:windows-2019-${{ inputs.version }} ${{ inputs.registry }}/${{ inputs.image }}:windows-2019 From ae133a307525a5686be3174506486588189fc969 Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Mon, 11 Apr 2022 09:59:46 +0100 Subject: [PATCH 14/17] workflows: remove buildx support on Windows Signed-off-by: Patrick Stephens --- .github/workflows/call-build-images.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/call-build-images.yaml b/.github/workflows/call-build-images.yaml index 4aad31ab563..4efa24f477e 100644 --- a/.github/workflows/call-build-images.yaml +++ b/.github/workflows/call-build-images.yaml @@ -301,9 +301,6 @@ jobs: with: ref: ${{ inputs.ref }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Log in to the Container registry uses: docker/login-action@v1 with: @@ -311,23 +308,12 @@ jobs: username: ${{ inputs.username }} password: ${{ secrets.token }} - # - name: Extract metadata from Github - # id: meta - # uses: docker/metadata-action@v3 - # with: - # images: ${{ inputs.registry }}/${{ inputs.image }} - # tags: | - # raw,windows-2019-${{ inputs.version }} - # raw,windows-2019 - - name: Build the production images run: | docker build -t ${{ inputs.registry }}/${{ inputs.image }}:windows-2019-${{ inputs.version }} --build-arg FLB_NIGHTLY_BUILD=${{ inputs.unstable }} --build-arg WINDOWS_VERSION=ltsc2019 -f ./dockerfiles/Dockerfile.windows . docker push ${{ inputs.registry }}/${{ inputs.image }}:windows-2019-${{ inputs.version }} docker tag ${{ inputs.registry }}/${{ inputs.image }}:windows-2019-${{ inputs.version }} ${{ inputs.registry }}/${{ inputs.image }}:windows-2019 docker push ${{ inputs.registry }}/${{ inputs.image }}:windows-2019 - env: - DOCKER_BUILDKIT: 1 # We cannot use this action as it requires privileged mode # uses: docker/build-push-action@v2 # with: @@ -342,5 +328,3 @@ jobs: # build-args: | # FLB_NIGHTLY_BUILD=${{ inputs.unstable }} # WINDOWS_VERSION=ltsc2019 - - From 9183010589bc6c47f7e8515aeb2708ec9b6aee21 Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Mon, 11 Apr 2022 10:09:20 +0100 Subject: [PATCH 15/17] workflows: reverted branch for testing Signed-off-by: Patrick Stephens --- .github/workflows/staging-build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/staging-build.yaml b/.github/workflows/staging-build.yaml index c8d7169c9b9..dc51f486d3b 100644 --- a/.github/workflows/staging-build.yaml +++ b/.github/workflows/staging-build.yaml @@ -66,7 +66,7 @@ jobs: staging-build-images: needs: staging-build-get-meta - uses: fluent/fluent-bit/.github/workflows/call-build-images.yaml@5196_windows_release_artefacts + uses: fluent/fluent-bit/.github/workflows/call-build-images.yaml@master with: version: ${{ needs.staging-build-get-meta.outputs.version }} ref: ${{ github.event.inputs.version || github.ref_name }} @@ -145,7 +145,7 @@ jobs: staging-build-windows-packages: needs: - staging-build-get-meta - uses: fluent/fluent-bit/.github/workflows/call-build-windows.yaml@5196_windows_release_artefacts + uses: fluent/fluent-bit/.github/workflows/call-build-windows.yaml@master with: version: ${{ needs.staging-build-get-meta.outputs.version }} ref: ${{ github.event.inputs.version || github.ref_name }} From a2350c95ad6af0cf900f6a86e0e9c26280d972bf Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Mon, 11 Apr 2022 11:04:00 +0100 Subject: [PATCH 16/17] workflows: fix linkage for MacOS Signed-off-by: Patrick Stephens --- .github/workflows/call-build-macos.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/call-build-macos.yaml b/.github/workflows/call-build-macos.yaml index e9ea3eded81..b16fae8ebf2 100644 --- a/.github/workflows/call-build-macos.yaml +++ b/.github/workflows/call-build-macos.yaml @@ -78,6 +78,7 @@ jobs: - name: Build Fluent Bit packages run: | + export LIBRARY_PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib:$LIBRARY_PATH cmake -DCPACK_GENERATOR=productbuild -DFLB_NIGHTLY_BUILD=${{ inputs.unstable }} ../ cmake --build . cpack -G productbuild From d304838ad0cb1fcf1c5c102d749d8a3d9fc8c7a9 Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Mon, 11 Apr 2022 11:06:32 +0100 Subject: [PATCH 17/17] workflows: remove overwriting Windows latest version Signed-off-by: Patrick Stephens --- .github/workflows/call-build-images.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/call-build-images.yaml b/.github/workflows/call-build-images.yaml index 4efa24f477e..2a2e98b1fd9 100644 --- a/.github/workflows/call-build-images.yaml +++ b/.github/workflows/call-build-images.yaml @@ -312,8 +312,6 @@ jobs: run: | docker build -t ${{ inputs.registry }}/${{ inputs.image }}:windows-2019-${{ inputs.version }} --build-arg FLB_NIGHTLY_BUILD=${{ inputs.unstable }} --build-arg WINDOWS_VERSION=ltsc2019 -f ./dockerfiles/Dockerfile.windows . docker push ${{ inputs.registry }}/${{ inputs.image }}:windows-2019-${{ inputs.version }} - docker tag ${{ inputs.registry }}/${{ inputs.image }}:windows-2019-${{ inputs.version }} ${{ inputs.registry }}/${{ inputs.image }}:windows-2019 - docker push ${{ inputs.registry }}/${{ inputs.image }}:windows-2019 # We cannot use this action as it requires privileged mode # uses: docker/build-push-action@v2 # with: