Skip to content

Commit

Permalink
workflows: update to handle 2.2 releases
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Stephens <[email protected]>
  • Loading branch information
patrick-stephens committed Oct 31, 2023
1 parent 0ae1dba commit 3a9d942
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 17 deletions.
6 changes: 4 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ Enter `[N/A]` in the box, if an item is not applicable to your change.

**Testing**
Before we can approve your change; please submit the following in a comment:

- [ ] Example configuration file for the change
- [ ] Debug log output from testing the change
<!--
Please refer to the Developer Guide for instructions on building Fluent Bit with Valgrind support:
<!--
Please refer to the Developer Guide for instructions on building Fluent Bit with Valgrind support:
https://github.com/fluent/fluent-bit/blob/master/DEVELOPER_GUIDE.md#valgrind
Invoke Fluent Bit and Valgrind as: $ valgrind --leak-check=full ./bin/fluent-bit <args>
-->
- [ ] Attached [Valgrind](https://valgrind.org/docs/manual/quick-start.html) output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

- [ ] Run [local packaging test](./packaging/local-build-all.sh) showing all targets (including any new ones) build.
- [ ] Set `ok-package-test` label to test for all targets (requires maintainer to do).

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ Take the checksums from the release process above, the AppVeyor stage provides t
## Unstable/nightly builds

These happen every 24 hours and [reuse the same workflow](./cron-unstable-build.yaml) as the staging build so are identical except they skip the upload to S3 step.
This means all targets are built nightly for `master` and `2.0` branches including container images and Linux, macOS and Windows packages.
This means all targets are built nightly for `master` and `2.1` branches including container images and Linux, macOS and Windows packages.

The container images are available here (the tag refers to the branch):

* [ghcr.io/fluent/fluent-bit/unstable:2.0](ghcr.io/fluent/fluent-bit/unstable:2.0)
* [ghcr.io/fluent/fluent-bit/unstable:2.1](ghcr.io/fluent/fluent-bit/unstable:2.1)
* [ghcr.io/fluent/fluent-bit/unstable:master](ghcr.io/fluent/fluent-bit/unstable:master)
* [ghcr.io/fluent/fluent-bit/unstable:windows-2019-2.0](ghcr.io/fluent/fluent-bit/unstable:windows-2019-2.0)
* [ghcr.io/fluent/fluent-bit/unstable:windows-2019-2.1](ghcr.io/fluent/fluent-bit/unstable:windows-2019-2.1)
* [ghcr.io/fluent/fluent-bit/unstable:windows-2019-master](ghcr.io/fluent/fluent-bit/unstable:windows-2019-master)

The Linux, macOS and Windows packages are available to download from the specific workflow run.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cron-unstable-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
# Run nightly build at this time, bit of trial and error but this seems good.
schedule:
- cron: "0 6 * * *" # master build
- cron: "0 12 * * *" # 2.0 build
- cron: "0 12 * * *" # 2.1 build

# We do not want a new unstable build to run whilst we are releasing the current unstable build.
concurrency: unstable-build-release
Expand Down Expand Up @@ -51,10 +51,10 @@ jobs:
echo "cron_branch=master" >> $GITHUB_ENV
shell: bash

- name: 2.0 run
- name: 2.1 run
if: github.event_name == 'schedule' && github.event.schedule=='0 12 * * *'
run: |
echo "cron_branch=2.0" >> $GITHUB_ENV
echo "cron_branch=2.1" >> $GITHUB_ENV
shell: bash

- name: Output the branch to use
Expand Down
40 changes: 31 additions & 9 deletions .github/workflows/staging-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ jobs:
shell: bash

- name: Promote container images from staging to GHCR.io
if: ${{ startsWith(github.event.inputs.version, '2.0') || ! startsWith(matrix.tag, 'latest') }}
if: ${{ startsWith(github.event.inputs.version, '2.0') || startsWith(github.event.inputs.version, '2.1') || ! startsWith(matrix.tag, 'latest') }}
run: |
docker run --rm \
quay.io/skopeo/stable:latest \
Expand All @@ -479,9 +479,6 @@ jobs:
# Part of resolution for: https://github.com/fluent/fluent-bit/issues/7748
# More recent build-push-actions may mean legacy format is not preserved so we provide arch-specific tags just in case
staging-release-images-arch-specific-legacy-tags:
# TODO: remove next release once we are happy this all works, for now though do not block a release
continue-on-error: true
#
name: Release ${{ matrix.arch }} legacy format Linux container images
runs-on: ubuntu-latest
needs:
Expand Down Expand Up @@ -545,8 +542,8 @@ jobs:
TAG: ${{ steps.get-tag.outputs.tag }}

staging-release-images-latest-tags:
# Only update latest tags for 2.1 releases
if: startsWith(github.event.inputs.version, '2.1')
# Only update latest tags for 2.2 releases
if: startsWith(github.event.inputs.version, '2.2')
name: Release latest Linux container images
runs-on: ubuntu-latest
needs:
Expand Down Expand Up @@ -821,7 +818,7 @@ jobs:
tag_name: v${{ inputs.version }}
target_commitish: '2.0'

- name: Release 2.1 and latest
- name: Release 2.1 - not latest
uses: softprops/action-gh-release@v1
if: startsWith(inputs.version, '2.1')
with:
Expand All @@ -830,6 +827,17 @@ jobs:
generate_release_notes: true
name: "Fluent Bit ${{ inputs.version }}"
tag_name: v${{ inputs.version }}
target_commitish: '2.1'

- name: Release 2.2 and latest
uses: softprops/action-gh-release@v1
if: startsWith(inputs.version, '2.2')
with:
body: "https://fluentbit.io/announcements/v${{ inputs.version }}/"
draft: false
generate_release_notes: true
name: "Fluent Bit ${{ inputs.version }}"
tag_name: v${{ inputs.version }}

staging-release-create-docs-pr:
name: Create docs updates for new release
Expand All @@ -849,9 +857,17 @@ jobs:
ref: 2.0
token: ${{ secrets.GH_PA_TOKEN }}

- name: Release 2.1 and latest
- name: Release 2.1 - not latest
if: startsWith(inputs.version, '2.1')
uses: actions/checkout@v4
with:
repository: fluent/fluent-bit-docs
ref: 2.1
token: ${{ secrets.GH_PA_TOKEN }}

- name: Release 2.2 and latest
if: startsWith(inputs.version, '2.2')
uses: actions/checkout@v4
with:
repository: fluent/fluent-bit-docs
token: ${{ secrets.GH_PA_TOKEN }}
Expand Down Expand Up @@ -914,9 +930,15 @@ jobs:
with:
ref: 2.0

- name: Release 2.1 and latest
- name: Release 2.1
if: startsWith(inputs.version, '2.1')
uses: actions/checkout@v4
with:
ref: 2.1

- name: Release 2.2 and latest
if: startsWith(inputs.version, '2.2')
uses: actions/checkout@v4

# Get the new version to use
- name: 'Get next minor version'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- 2.1
- 2.0
- 1.9
- 1.8
Expand All @@ -18,6 +19,7 @@ on:
- 'examples/**'
branches:
- master
- 2.1
- 2.0
- 1.9
- 1.8
Expand Down

0 comments on commit 3a9d942

Please sign in to comment.