Skip to content

Commit d999682

Browse files
committed
tech debt
1 parent dab69e7 commit d999682

File tree

3 files changed

+86
-38
lines changed

3 files changed

+86
-38
lines changed

.github/workflows/pull_request.yml

+70-38
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
@@ -148,6 +150,35 @@ jobs:
148150
# To understand the need for /*/*, see comment in "upload artifacts" step above
149151
gh release upload ${{ env.PRE_RELEASE_NAME }} packages/*/* --repo newrelic/fluent-bit-package
150152

153+
154+
notify:
155+
runs-on: ubuntu-latest
156+
needs: [ upload_official_packages_to_prerelease, setup_environment ]
157+
steps:
158+
- name: Fetch artifacts
159+
id: fetch_artifacts
160+
run: |
161+
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.setup_environment.outputs.pre_release_name }}" '.[] | select(.tag_name==$tag) | .id')
162+
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: .name, url: .browser_download_url}')
163+
echo "::set-output name=artifacts::$ARTIFACTS"
164+
165+
- name: Send release details to Slack workflow
166+
id: slack
167+
uses: slackapi/slack-github-action@v1
168+
with:
169+
payload: |
170+
{
171+
"type" : "Sanath is testing improved slack message. Please IGNORE.",
172+
"releaseUrl": "https://github.com/newrelic/fluent-bit-package/releases/tag/${{ needs.setup_environment.outputs.pre_release_name }}",
173+
"productName": "${{ env.PRODUCT_NAME }}",
174+
"productUrl": "${{ env.PRODUCT_URL }}",
175+
"artifacts": ${{ steps.fetch_artifacts.outputs.artifacts }}
176+
}
177+
env:
178+
SLACK_WEBHOOK_URL: ${{ secrets.LOGGING_INTEGRATIONS_SLACK_WEBHOOK }}
179+
PRODUCT_NAME: Fluent Bit packages for the New Relic Infrastructure Agent
180+
PRODUCT_URL: https://docs.newrelic.com/docs/logs/forward-logs/forward-your-logs-using-infrastructure-agent
181+
151182
run_e2e_tests_prerelease:
152183
needs: [ setup_environment,upload_official_packages_to_prerelease ]
153184
# name: Run E2E tests by installing NRIA from Production and installing Fluent Bit from the PR pre-release
@@ -158,43 +189,44 @@ jobs:
158189
infra_agent_env: prerelease
159190
sles_matrix: ${{ needs.setup_environment.outputs.sles_matrix }}
160191
pre_release_name: ${{ needs.setup_environment.outputs.pre_release_name }}
192+
windows_matrix: ${{ needs.setup_environment.outputs.windows_matrix }}
161193
secrets: inherit
162194

163-
publish_linux_to_staging:
164-
name: Publish linux packages to staging
165-
needs: [ setup_environment, run_e2e_tests_prerelease ]
166-
runs-on: ubuntu-latest
167-
steps:
168-
- name: Publish linux packages to staging
169-
uses: newrelic/infrastructure-publish-action@v1
170-
with:
171-
app_name: fluent-bit
172-
tag: ${{ env.PRE_RELEASE_NAME }}
173-
repo_name: "newrelic/fluent-bit-package"
174-
schema: "custom"
175-
schema_url: "https://github.com/newrelic/fluent-bit-package/releases/download/${{ env.PRE_RELEASE_NAME }}/generated-linux-schema-staging.yaml"
176-
aws_access_key_id: ${{ secrets.OHAI_AWS_ACCESS_KEY_ID_STAGING }}
177-
aws_secret_access_key: ${{ secrets.OHAI_AWS_SECRET_ACCESS_KEY_STAGING }}
178-
aws_s3_bucket_name: "nr-downloads-ohai-staging"
179-
aws_s3_lock_bucket_name: "onhost-ci-lock-staging"
180-
access_point_host: "staging"
181-
run_id: ${{ github.run_id }}
182-
aws_region: "us-east-1"
183-
aws_role_session_name: ${{ secrets.OHAI_AWS_ROLE_SESSION_NAME_STAGING }}
184-
aws_role_arn: ${{ secrets.OHAI_AWS_ROLE_ARN_STAGING }}
185-
# used for signing package stuff
186-
gpg_passphrase: ${{ secrets.OHAI_GPG_PASSPHRASE }}
187-
gpg_private_key_base64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded
188-
189-
run_e2e_tests_staging:
190-
needs: [ setup_environment, run_e2e_tests_prerelease, publish_linux_to_staging ]
191-
if: |
192-
always() && !failure() && !cancelled()
193-
name: Run E2E tests for all supported packages installing NRIA+FB from staging
194-
uses: ./.github/workflows/run_e2e_tests.yml
195-
with:
196-
gh_release_name: ${{ needs.setup_environment.outputs.pre_release_name }}
197-
infra_agent_version: latest
198-
infra_agent_env: staging
199-
test_report_filename: test-report-staging.xml
200-
secrets: inherit
195+
# publish_linux_to_staging:
196+
# name: Publish linux packages to staging
197+
# needs: [ setup_environment, run_e2e_tests_prerelease ]
198+
# runs-on: ubuntu-latest
199+
# steps:
200+
# - name: Publish linux packages to staging
201+
# uses: newrelic/infrastructure-publish-action@v1
202+
# with:
203+
# app_name: fluent-bit
204+
# tag: ${{ env.PRE_RELEASE_NAME }}
205+
# repo_name: "newrelic/fluent-bit-package"
206+
# schema: "custom"
207+
# schema_url: "https://github.com/newrelic/fluent-bit-package/releases/download/${{ env.PRE_RELEASE_NAME }}/generated-linux-schema-staging.yaml"
208+
# aws_access_key_id: ${{ secrets.OHAI_AWS_ACCESS_KEY_ID_STAGING }}
209+
# aws_secret_access_key: ${{ secrets.OHAI_AWS_SECRET_ACCESS_KEY_STAGING }}
210+
# aws_s3_bucket_name: "nr-downloads-ohai-staging"
211+
# aws_s3_lock_bucket_name: "onhost-ci-lock-staging"
212+
# access_point_host: "staging"
213+
# run_id: ${{ github.run_id }}
214+
# aws_region: "us-east-1"
215+
# aws_role_session_name: ${{ secrets.OHAI_AWS_ROLE_SESSION_NAME_STAGING }}
216+
# aws_role_arn: ${{ secrets.OHAI_AWS_ROLE_ARN_STAGING }}
217+
# # used for signing package stuff
218+
# gpg_passphrase: ${{ secrets.OHAI_GPG_PASSPHRASE }}
219+
# gpg_private_key_base64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded
220+
#
221+
# run_e2e_tests_staging:
222+
# needs: [ setup_environment, run_e2e_tests_prerelease, publish_linux_to_staging ]
223+
# if: |
224+
# always() && !failure() && !cancelled()
225+
# name: Run E2E tests for all supported packages installing NRIA+FB from staging
226+
# uses: ./.github/workflows/run_e2e_tests.yml
227+
# with:
228+
# gh_release_name: ${{ needs.setup_environment.outputs.pre_release_name }}
229+
# infra_agent_version: latest
230+
# infra_agent_env: staging
231+
# test_report_filename: test-report-staging.xml
232+
# secrets: inherit

.github/workflows/run_prerelease.yml

+11
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
@@ -148,6 +156,7 @@ jobs:
148156
provision_and_execute_tests_linux:
149157
name: Provision instances and run tests for linux
150158
needs: [spin_up_test_executor_instances, sign_suse_packages, tear_down_suse]
159+
if : ${{ (needs.sign_suse_packages.result == 'success' || needs.sign_suse_packages.result == 'skipped') }}
151160
uses: ./.github/workflows/run_task.yml
152161
with:
153162
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 }}"
@@ -165,6 +174,7 @@ jobs:
165174
name: Report results
166175
runs-on: ubuntu-20.04
167176
needs: [ provision_and_execute_tests_linux ]
177+
if : ${{ needs.provision_and_execute_tests_linux.result == 'success' }}
168178
env:
169179
GH_TOKEN: ${{ github.token }}
170180
steps:
@@ -193,6 +203,7 @@ jobs:
193203
name: Report results
194204
runs-on: ubuntu-20.04
195205
needs: [provision_and_execute_tests_windows ]
206+
if: ${{ inputs.windows_matrix != '[]' }}
196207
env:
197208
GH_TOKEN: ${{ github.token }}
198209
steps:

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

0 commit comments

Comments
 (0)