Skip to content

Commit 1776a92

Browse files
authoredMar 17, 2025··
Tech debt Changes and Ubuntu 16.04 support (#205)
1 parent dab69e7 commit 1776a92

File tree

5 files changed

+45
-12
lines changed

5 files changed

+45
-12
lines changed
 

‎.github/workflows/merge_to_main.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ jobs:
103103
needs: [ get_release_tag, promote_prerelease_to_release ]
104104
if: ${{ needs.promote_prerelease_to_release.outputs.is_release == 'true' }}
105105
steps:
106+
- name: Fetch artifacts
107+
id: fetch_artifacts
108+
run: |
109+
RELEASE_ID=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/newrelic/fluent-bit-package/releases" | jq --arg tag "${{ needs.get_release_tag.outputs.tag }}" '.[] | select(.tag_name==$tag) | .id')
110+
if [ -z "$RELEASE_ID" ]; then
111+
echo "Failed to retrieve release ID"
112+
exit 1
113+
fi
114+
ARTIFACTS=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/newrelic/fluent-bit-package/releases/$RELEASE_ID/assets" | jq -r '[.[] | select(.name | test("^(fb|fluent-bit)")) | .name] | join("\n")')
115+
echo "artifacts=$ARTIFACTS" >> "$GITHUB_OUTPUT"
116+
106117
- name: Send release details to Slack workflow
107118
id: slack
108119
uses: slackapi/slack-github-action@v1
@@ -112,7 +123,8 @@ jobs:
112123
"releaseUrl": "https://github.com/newrelic/fluent-bit-package/releases/tag/${{ needs.get_release_tag.outputs.tag }}",
113124
"releaseName": "${{ needs.get_release_tag.outputs.tag }}",
114125
"productName": "${{ env.PRODUCT_NAME }}",
115-
"productUrl": "${{ env.PRODUCT_URL }}"
126+
"productUrl": "${{ env.PRODUCT_URL }}",
127+
"publishedPackages" : "${{ steps.fetch_artifacts.outputs.artifacts }}"
116128
}
117129
env:
118130
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

‎.github/workflows/pull_request.yml

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
sles_matrix: ${{ steps.set-matrices.outputs.sles_matrix }}
2525
linux_and_windows_matrix: ${{ steps.set-matrices.outputs.linux_and_windows_matrix }}
2626
linux_and_windows_unique_target_package : ${{ steps.set-matrices.outputs.linux_and_windows_unique_target_package }}
27+
windows_matrix: ${{ steps.set-matrices.outputs.windows_matrix }}
2728
steps:
2829
- name: Checkout code
2930
uses: actions/checkout@v3
@@ -70,6 +71,7 @@ jobs:
7071
filtered_json=$(echo "$json_data" | jq 'unique_by(.targetPackageName)')
7172
echo "linux_and_windows_unique_target_package=$(echo $filtered_json)" >> "$GITHUB_OUTPUT"
7273
echo "sles_matrix=$( cat versions/slesMatrix.json )" >> "$GITHUB_OUTPUT"
74+
echo "windows_matrix=$( cat versions/windowsMatrix.json )" >> "$GITHUB_OUTPUT"
7375
gh release upload ${{ env.PRE_RELEASE_NAME }} versions/linuxAndWindowsMatrix.json --repo newrelic/fluent-bit-package
7476
gh release upload ${{ env.PRE_RELEASE_NAME }} versions/slesMatrix.json --repo newrelic/fluent-bit-package
7577
@@ -158,6 +160,7 @@ jobs:
158160
infra_agent_env: prerelease
159161
sles_matrix: ${{ needs.setup_environment.outputs.sles_matrix }}
160162
pre_release_name: ${{ needs.setup_environment.outputs.pre_release_name }}
163+
windows_matrix: ${{ needs.setup_environment.outputs.windows_matrix }}
161164
secrets: inherit
162165

163166
publish_linux_to_staging:

‎.github/workflows/run_prerelease.yml

+22-9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ on:
2727
description: Matrix of SLES distros, versions, and architectures to run the tests on
2828
required: false
2929
type: string
30+
windows_matrix:
31+
description: Matrix of Windows distros, versions, and architectures to run the tests on
32+
required: false
33+
type: string
3034
linux_test_report_name:
3135
description: Linux test report name
3236
required: false
@@ -62,6 +66,10 @@ on:
6266
description: Matrix of SLES distros, versions, and architectures to run the tests on
6367
required: false
6468
type: string
69+
windows_matrix:
70+
description: Matrix of Windows distros, versions, and architectures to run the tests on
71+
required: false
72+
type: string
6573
linux_test_report_name:
6674
description: Linux test report name
6775
required: false
@@ -102,14 +110,14 @@ jobs:
102110
secrets: inherit
103111

104112
build_suse_packages:
105-
needs: [spin_up_suse ]
113+
needs: [ spin_up_suse ]
106114
uses: ./.github/workflows/run_task.yml
107115
with:
108116
container_make_target: "ansible/build-fb-suse/run PRE_RELEASE_NAME=${{ inputs.pre_release_name }}"
109117
secrets: inherit
110118

111119
tear_down_suse:
112-
needs: [build_suse_packages ]
120+
needs: [ build_suse_packages ]
113121
if: always()
114122
uses: ./.github/workflows/run_task.yml
115123
with:
@@ -144,10 +152,12 @@ jobs:
144152
run:
145153
gh release upload ${{ inputs.pre_release_name }} packages/* --clobber
146154

147-
148155
provision_and_execute_tests_linux:
149-
name: Provision instances and run tests for linux
150-
needs: [spin_up_test_executor_instances, sign_suse_packages, tear_down_suse]
156+
name: Provision instances and run tests for linux
157+
needs: [ spin_up_test_executor_instances, sign_suse_packages, tear_down_suse ]
158+
if: ${{ always() && !failure() && !cancelled()
159+
&& (needs.spin_up_test_executor_instances.result == 'success' || needs.spin_up_test_executor_instances.result == 'skipped')
160+
&& (needs.sign_suse_packages.result == 'success' || needs.sign_suse_packages.result == 'skipped')}}
151161
uses: ./.github/workflows/run_task.yml
152162
with:
153163
container_make_target: "ansible/provision-and-execute-tests/${{ inputs.infra_agent_env }}-linux PRE_RELEASE_NAME=${{ inputs.gh_release_name }} TEST_REPORT_NAME=${{ inputs.linux_test_report_name }}"
@@ -156,15 +166,17 @@ jobs:
156166
provision_and_execute_tests_windows:
157167
name: Provision instances and run tests for windows
158168
needs: spin_up_test_executor_instances
169+
if: ${{ (needs.spin_up_test_executor_instances.result == 'success' || needs.spin_up_test_executor_instances.result == 'skipped') && ( inputs.windows_matrix != '[]' ) }}
159170
uses: ./.github/workflows/run_task.yml
160171
with:
161172
container_make_target: "ansible/provision-and-execute-tests/${{ inputs.infra_agent_env }}-windows PRE_RELEASE_NAME=${{ inputs.gh_release_name }} TEST_REPORT_NAME=${{ inputs.windows_test_report_name }}"
162173
secrets: inherit
163174

164175
report_linux_test_results:
165-
name: Report results
176+
name: Report results linux
166177
runs-on: ubuntu-20.04
167178
needs: [ provision_and_execute_tests_linux ]
179+
if : ${{ always() && !failure() && !cancelled() && (needs.provision_and_execute_tests_linux.result == 'success')}}
168180
env:
169181
GH_TOKEN: ${{ github.token }}
170182
steps:
@@ -190,9 +202,10 @@ jobs:
190202
${{ inputs.linux_test_report_name }}
191203
192204
report_windows_test_results:
193-
name: Report results
205+
name: Report results windows
194206
runs-on: ubuntu-20.04
195-
needs: [provision_and_execute_tests_windows ]
207+
needs: [ provision_and_execute_tests_windows ]
208+
if: ${{ inputs.windows_matrix != '[]' }}
196209
env:
197210
GH_TOKEN: ${{ github.token }}
198211
steps:
@@ -220,7 +233,7 @@ jobs:
220233
tear_down_test_executor_instances:
221234
name: Tear down test executor instances
222235
if: always()
223-
needs: [report_windows_test_results, report_linux_test_results]
236+
needs: [ report_windows_test_results, report_linux_test_results ]
224237
uses: ./.github/workflows/run_task.yml
225238
with:
226239
container_make_target: "terraform/ec2-test-executors/clean PRE_RELEASE_NAME=${{ inputs.gh_release_name }}"

‎versions/ubuntu_16_xenial.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
osDistro: ubuntu
2+
osVersion: xenial
3+
packages:
4+
- arch: amd64
5+
ami: ami-01e7407a20284c7ff

‎versions/windows-server-2019.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ osDistro: windows-server
22
osVersion: 2019
33
packages:
44
- arch: win64
5-
ami: ami-033cf42b9fd3b1b94
5+
ami: ami-00144397b84c851bd
66
# There is no win32 image available in AWS, so we use the w64 one to test the w32 binaries
77
- arch: win32
8-
ami: ami-033cf42b9fd3b1b94
8+
ami: ami-00144397b84c851bd

0 commit comments

Comments
 (0)
Please sign in to comment.