Skip to content

Commit 9ef9d6d

Browse files
workflows: container refactor and promotion to release (#4610)
* documentation: update readme for container images Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: initial workflow refactor Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: comment tweak Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: test specific version of PR image Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: align name for PR jobs Signed-off-by: Patrick Stephens <pat@calyptia.com> * documentation: combine Windows documentation Signed-off-by: Patrick Stephens <pat@calyptia.com> * windows: more skips for appveyor Signed-off-by: Patrick Stephens <pat@calyptia.com> * documentation: update readme for container images Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: initial workflow refactor Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: comment tweak Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: test specific version of PR image Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: align name for PR jobs Signed-off-by: Patrick Stephens <pat@calyptia.com> * documentation: combine Windows documentation Signed-off-by: Patrick Stephens <pat@calyptia.com> * windows: more skips for appveyor Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: skopeo sync updates Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: use native skopeo in action Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: comments Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: container release signing Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: add debug images to signing Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: linting fix Signed-off-by: Patrick Stephens <pat@calyptia.com> * dockerfiles: add missing debug image Signed-off-by: Patrick Stephens <pat@calyptia.com> * dockerfiles: add missing debug image Signed-off-by: Patrick Stephens <pat@calyptia.com> * documentation: add multi-arch info Signed-off-by: Patrick Stephens <pat@calyptia.com> * dockerfiles: remove busybox Signed-off-by: Patrick Stephens <pat@calyptia.com> * workflows: ignore more CVEs Signed-off-by: Patrick Stephens <pat@calyptia.com>
1 parent 599ef02 commit 9ef9d6d

20 files changed

+412
-175
lines changed

.github/containerscan/allowedlist.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ general:
1414
- CVE-2020-1751
1515
- CVE-2020-1752
1616
- CVE-2021-3326
17+
- CVE-2021-3999
1718
- CVE-2020-16156
1819
- CVE-2021-33560
1920
- CVE-2021-43618
21+
- CVE-2022-23218
22+
- CVE-2022-23219
2023
bestPracticeViolations:
2124
# Fatal
2225
- DKL-DI-0005 # Clear apt-get caches

.github/workflows/call-build-images.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ jobs:
115115
images: ${{ inputs.registry }}/${{ inputs.image }}
116116
tags: |
117117
raw,x86_64-${{ inputs.version }}-debug
118-
raw,x86_64-latest
118+
raw,{{ inputs.version }}-debug
119+
raw,latest-debug
119120
120121
- name: Build the debug staging image
121122
uses: docker/build-push-action@v2

.github/workflows/master-integration-test.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
ref: ${{ github.sha }}
1212
registry: ghcr.io
1313
username: ${{ github.actor }}
14-
image: ${{ github.repository }}
15-
image-tag: x86_64-master
14+
image: ${{ github.repository }}/master
15+
image-tag: x86_64
1616
environment: integration
1717
secrets:
1818
token: ${{ secrets.GITHUB_TOKEN }}
@@ -31,8 +31,8 @@ jobs:
3131
needs: master-integration-test-build
3232
uses: calyptia/fluent-bit-ci/.github/workflows/reusable-integration-test-gcp.yaml@main
3333
with:
34-
image_name: ghcr.io/${{ github.repository }}
35-
image_tag: x86_64-master
34+
image_name: ghcr.io/${{ github.repository }}/master
35+
image_tag: x86_64
3636
secrets:
3737
grafana_username: ${{ secrets.GRAFANA_USERNAME }}
3838
terraform_api_token: ${{ secrets.TF_API_TOKEN }}

.github/workflows/pr-closed-docker.yaml

+1-8
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,10 @@ on:
66
types: [closed]
77
jobs:
88
cleanup:
9+
name: PR - cleanup pr-${{ github.event.number }} images
910
runs-on: ubuntu-latest
1011
steps:
1112
- uses: bots-house/ghcr-delete-image-action@v1.0.1
12-
with:
13-
owner: fluent
14-
name: fluent-bit
15-
token: ${{ secrets.GITHUB_TOKEN }}
16-
tag: x86_64-master-pr-${{ github.event.number }}
17-
18-
- uses: bots-house/ghcr-delete-image-action@v1.0.1
19-
if: always()
2013
with:
2114
owner: fluent
2215
name: fluent-bit/pr-${{ github.event.number }}

.github/workflows/pr-fuzz.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ on:
66
- '**.c'
77
- '**.h'
88
jobs:
9-
Fuzzing:
9+
fuzzing:
10+
name: PR - fuzzing test
1011
runs-on: ubuntu-latest
1112
steps:
1213
- name: Build Fuzzers

.github/workflows/pr-image-tests.yaml

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
pr-get-latest-tag:
9-
name: PR get latest tag for source build
9+
name: PR - get latest tag for source build
1010
runs-on: ubuntu-latest
1111
environment: pr
1212
outputs:
@@ -26,6 +26,7 @@ jobs:
2626
flags: 'g'
2727

2828
pr-image-tests-build-images:
29+
name: PR - build images
2930
uses: fluent/fluent-bit/.github/workflows/call-build-images.yaml@master
3031
needs: pr-get-latest-tag
3132
with:
@@ -38,14 +39,14 @@ jobs:
3839
token: ${{ secrets.GITHUB_TOKEN }}
3940

4041
pr-image-tests-smoke-test-images:
41-
name: Multi-arch images smoke tests
42-
needs: pr-image-tests-build-images
42+
name: PR - smoke test images
43+
needs: [pr-get-latest-tag, pr-image-tests-build-images]
4344
uses: fluent/fluent-bit/.github/workflows/call-test-images.yaml@master
4445
with:
4546
registry: ghcr.io
4647
username: ${{ github.actor }}
4748
image: ${{ github.repository }}/pr-${{ github.event.number }}
48-
image-tag: latest
49+
image-tag: ${{ needs.pr-get-latest-tag.outputs.latest_tag }}
4950
environment: pr
5051
secrets:
5152
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-integration-test.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ on:
1111
- synchronize
1212
jobs:
1313
pr-integration-test-build:
14-
name: PR - integration build
14+
name: PR - GCP build
1515
# We only need to test this once as the rest are chained from it.
1616
if: contains(github.event.pull_request.labels.*.name, 'ok-to-test')
1717
uses: fluent/fluent-bit/.github/workflows/call-integration-image-build.yaml@master
1818
with:
1919
ref: ${{ github.event.pull_request.head.sha }}
2020
registry: ghcr.io
2121
username: ${{ github.actor }}
22-
image: ${{ github.repository }}
23-
image-tag: x86_64-master-pr-${{ github.event.number }}
22+
image: ${{ github.repository }}/pr-${{ github.event.number }}
23+
image-tag: x86_64
2424
environment: integration
2525
secrets:
2626
token: ${{ secrets.GITHUB_TOKEN }}
2727

2828
pr-integration-test-build-complete:
29-
name: PR - build complete
29+
name: PR - GCP build complete
3030
runs-on: ubuntu-latest
3131
needs: pr-integration-test-build
3232
steps:
@@ -42,7 +42,7 @@ jobs:
4242
docker pull $IMAGE
4343
docker save --output /tmp/pr-image.tar $IMAGE
4444
env:
45-
IMAGE: ghcr.io/${{ github.repository }}:x86_64-master-pr-${{ github.event.pull_request.number }}
45+
IMAGE: ghcr.io/${{ github.repository }}/pr-${{ github.event.pull_request.number }}:x86_64
4646
shell: bash
4747

4848
- name: Upload artifact
@@ -57,16 +57,16 @@ jobs:
5757
needs: pr-integration-test-build
5858
uses: calyptia/fluent-bit-ci/.github/workflows/reusable-integration-test-gcp.yaml@main
5959
with:
60-
image_name: ghcr.io/${{ github.repository }}
61-
image_tag: x86_64-master-pr-${{ github.event.pull_request.number }}
60+
image_name: ghcr.io/${{ github.repository }}/pr-${{ github.event.pull_request.number }}
61+
image_tag: x86_64
6262
secrets:
6363
grafana_username: ${{ secrets.GRAFANA_USERNAME }}
6464
terraform_api_token: ${{ secrets.TF_API_TOKEN }}
6565
gcp_service_account_key: ${{ secrets.GCP_SA_KEY }}
6666
grafana_password: ${{ secrets.GRAFANA_PASSWORD }}
6767

6868
pr-integration-test-run-integration-post-label:
69-
name: PR - test complete
69+
name: PR - GCP test complete
7070
runs-on: ubuntu-latest
7171
needs: pr-integration-test-run-integration-gcp
7272
steps:

.github/workflows/pr-labels.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- opened
66
jobs:
77
apply-default-labels:
8-
name: apply default labels
8+
name: PR - apply default labels
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions-ecosystem/action-add-labels@v1

.github/workflows/pr-lint.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ jobs:
77

88
hadolint-pr:
99
runs-on: ubuntu-latest
10-
name: Hadolint
10+
name: PR - Hadolint
1111
steps:
1212
- uses: actions/checkout@v2
13-
# Ignores do no work: https://github.com/reviewdog/action-hadolint/issues/35 is resolved
13+
# Ignores do not work: https://github.com/reviewdog/action-hadolint/issues/35 is resolved
1414
- uses: reviewdog/action-hadolint@v1
1515
with:
1616
exclude: |
1717
packaging/testing/smoke/packages/Dockerfile.*
1818
1919
shellcheck-pr:
2020
runs-on: ubuntu-latest
21-
name: Shellcheck
21+
name: PR - Shellcheck
2222
steps:
2323
- uses: actions/checkout@v2
2424
- uses: ludeeus/action-shellcheck@master
@@ -27,7 +27,7 @@ jobs:
2727

2828
actionlint-pr:
2929
runs-on: ubuntu-latest
30-
name: Actionlint
30+
name: PR - Actionlint
3131
steps:
3232
- uses: actions/checkout@v2
3333
- run: |

.github/workflows/pr-stale.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55

66
jobs:
77
stale:
8+
name: PR - mark stale
89
runs-on: ubuntu-latest
910
steps:
1011
- uses: actions/stale@v3

.github/workflows/staging-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
version: ${{ needs.staging-build-get-version.outputs.version }}
6161
registry: ghcr.io
6262
username: ${{ github.actor }}
63-
image: ${{ github.repository }}
63+
image: ${{ github.repository }}/staging
6464
environment: staging
6565
secrets:
6666
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)