Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 41 additions & 39 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
download_official_packages:
needs: [setup_environment]
runs-on: ubuntu-latest
if: ${{ needs.setup_environment.outputs.linux_and_windows_unique_target_package != '[]' }}
if: ${{ always() && needs.setup_environment.outputs.linux_and_windows_unique_target_package != '[]' }}
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -137,6 +137,7 @@ jobs:

upload_official_packages_to_prerelease:
needs: [ download_official_packages ]
if : ${{ always() && !cancelled() && !failure() && needs.download_official_packages.result == 'success' }}
runs-on: ubuntu-latest

steps:
Expand All @@ -152,6 +153,7 @@ jobs:

run_e2e_tests_prerelease:
needs: [ setup_environment,upload_official_packages_to_prerelease ]
if : ${{ always() && !cancelled() && !failure() }}
# name: Run E2E tests by installing NRIA from Production and installing Fluent Bit from the PR pre-release
uses: ./.github/workflows/run_prerelease.yml
with:
Expand All @@ -163,41 +165,41 @@ jobs:
windows_matrix: ${{ needs.setup_environment.outputs.windows_matrix }}
secrets: inherit

publish_linux_to_staging:
name: Publish linux packages to staging
needs: [ setup_environment, run_e2e_tests_prerelease ]
runs-on: ubuntu-latest
steps:
- name: Publish linux packages to staging
uses: newrelic/infrastructure-publish-action@v1
with:
app_name: fluent-bit
tag: ${{ env.PRE_RELEASE_NAME }}
repo_name: "newrelic/fluent-bit-package"
schema: "custom"
schema_url: "https://github.com/newrelic/fluent-bit-package/releases/download/${{ env.PRE_RELEASE_NAME }}/generated-linux-schema-staging.yaml"
aws_access_key_id: ${{ secrets.OHAI_AWS_ACCESS_KEY_ID_STAGING }}
aws_secret_access_key: ${{ secrets.OHAI_AWS_SECRET_ACCESS_KEY_STAGING }}
aws_s3_bucket_name: "nr-downloads-ohai-staging"
aws_s3_lock_bucket_name: "onhost-ci-lock-staging"
access_point_host: "staging"
run_id: ${{ github.run_id }}
aws_region: "us-east-1"
aws_role_session_name: ${{ secrets.OHAI_AWS_ROLE_SESSION_NAME_STAGING }}
aws_role_arn: ${{ secrets.OHAI_AWS_ROLE_ARN_STAGING }}
# used for signing package stuff
gpg_passphrase: ${{ secrets.OHAI_GPG_PASSPHRASE }}
gpg_private_key_base64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded

run_e2e_tests_staging:
needs: [ setup_environment, run_e2e_tests_prerelease, publish_linux_to_staging ]
if: |
always() && !failure() && !cancelled()
name: Run E2E tests for all supported packages installing NRIA+FB from staging
uses: ./.github/workflows/run_e2e_tests.yml
with:
gh_release_name: ${{ needs.setup_environment.outputs.pre_release_name }}
infra_agent_version: latest
infra_agent_env: staging
test_report_filename: test-report-staging.xml
secrets: inherit
# publish_linux_to_staging:
# name: Publish linux packages to staging
# needs: [ setup_environment, run_e2e_tests_prerelease ]
# runs-on: ubuntu-latest
# steps:
# - name: Publish linux packages to staging
# uses: newrelic/infrastructure-publish-action@v1
# with:
# app_name: fluent-bit
# tag: ${{ env.PRE_RELEASE_NAME }}
# repo_name: "newrelic/fluent-bit-package"
# schema: "custom"
# schema_url: "https://github.com/newrelic/fluent-bit-package/releases/download/${{ env.PRE_RELEASE_NAME }}/generated-linux-schema-staging.yaml"
# aws_access_key_id: ${{ secrets.OHAI_AWS_ACCESS_KEY_ID_STAGING }}
# aws_secret_access_key: ${{ secrets.OHAI_AWS_SECRET_ACCESS_KEY_STAGING }}
# aws_s3_bucket_name: "nr-downloads-ohai-staging"
# aws_s3_lock_bucket_name: "onhost-ci-lock-staging"
# access_point_host: "staging"
# run_id: ${{ github.run_id }}
# aws_region: "us-east-1"
# aws_role_session_name: ${{ secrets.OHAI_AWS_ROLE_SESSION_NAME_STAGING }}
# aws_role_arn: ${{ secrets.OHAI_AWS_ROLE_ARN_STAGING }}
# # used for signing package stuff
# gpg_passphrase: ${{ secrets.OHAI_GPG_PASSPHRASE }}
# gpg_private_key_base64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded
#
# run_e2e_tests_staging:
# needs: [ setup_environment, run_e2e_tests_prerelease, publish_linux_to_staging ]
# if: |
# always() && !failure() && !cancelled()
# name: Run E2E tests for all supported packages installing NRIA+FB from staging
# uses: ./.github/workflows/run_e2e_tests.yml
# with:
# gh_release_name: ${{ needs.setup_environment.outputs.pre_release_name }}
# infra_agent_version: latest
# infra_agent_env: staging
# test_report_filename: test-report-staging.xml
# secrets: inherit
196 changes: 109 additions & 87 deletions .github/workflows/run_prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,31 @@ jobs:
container_make_target: "terraform/ec2-test-executors/${{ inputs.infra_agent_env }} PRE_RELEASE_NAME=${{ inputs.gh_release_name }}"
secrets: inherit

check_sles_build_optional:
if: ${{ inputs.sles_matrix != '[]' }}
runs-on: ubuntu-latest
outputs:
is_sles_present: ${{ steps.sles_build_optional.outputs.is_sles_present }}
steps:
- name: sles build optional
run: |
is_sles_present=true
echo "inputs.sles_matrix=${{ inputs.sles_matrix }}"
echo "is_sles_present=$is_sles_present" >> "$GITHUB_OUTPUT"

trying_something:
needs: [ check_sles_build_optional ]
if: always()
runs-on: ubuntu-latest
steps:
- name: trying something
run: |
echo "${{ needs.check_sles_build_optional.outputs.is_sles_present }}"

spin_up_suse:
needs : check_sles_build_optional
# needs: setup_environment
if: ${{ inputs.sles_matrix != '[]' }}
if : ${{ needs.check_sles_build_optional.outputs.is_sles_present == 'false' }}
uses: ./.github/workflows/run_task.yml
with:
container_make_target: "terraform/ec2-suse-builders/provision PRE_RELEASE_NAME=${{ inputs.pre_release_name }}"
Expand Down Expand Up @@ -152,89 +174,89 @@ jobs:
run:
gh release upload ${{ inputs.pre_release_name }} packages/* --clobber

provision_and_execute_tests_linux:
name: Provision instances and run tests for linux
needs: [ spin_up_test_executor_instances, sign_suse_packages, tear_down_suse ]
if: ${{ always() && !failure() && !cancelled()
&& (needs.spin_up_test_executor_instances.result == 'success' || needs.spin_up_test_executor_instances.result == 'skipped')
&& (needs.sign_suse_packages.result == 'success' || needs.sign_suse_packages.result == 'skipped')}}
uses: ./.github/workflows/run_task.yml
with:
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 }}"
secrets: inherit

provision_and_execute_tests_windows:
name: Provision instances and run tests for windows
needs: spin_up_test_executor_instances
if: ${{ (needs.spin_up_test_executor_instances.result == 'success' || needs.spin_up_test_executor_instances.result == 'skipped') && ( inputs.windows_matrix != '[]' ) }}
uses: ./.github/workflows/run_task.yml
with:
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 }}"
secrets: inherit

report_linux_test_results:
name: Report results linux
runs-on: ubuntu-20.04
needs: [ provision_and_execute_tests_linux ]
if : ${{ always() && !failure() && !cancelled() && (needs.provision_and_execute_tests_linux.result == 'success')}}
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Download report from pre-release # not ok
run: |
gh release download ${{ inputs.gh_release_name }} --pattern ${{ inputs.linux_test_report_name }}

- name: Tests Report Details Linux # ok
uses: dorny/test-reporter@v1
with:
name: Tests Report Details # Name of the check run which will be created
path: ${{ inputs.linux_test_report_name }} # Path to test results
reporter: jest-junit

- name: Tests Report Summary Linux # ok
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
${{ inputs.linux_test_report_name }}

report_windows_test_results:
name: Report results windows
runs-on: ubuntu-20.04
needs: [ provision_and_execute_tests_windows ]
if: ${{ inputs.windows_matrix != '[]' }}
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Download report from pre-release # not ok
run: |
gh release download ${{ inputs.gh_release_name }} --pattern ${{ inputs.windows_test_report_name }}

- name: Tests Report Details Windows # ok
uses: dorny/test-reporter@v1
with:
name: Tests Report Details # Name of the check run which will be created
path: ${{ inputs.windows_test_report_name }} # Path to test results
reporter: jest-junit

- name: Tests Report Summary Windows # ok
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
${{ inputs.windows_test_report_name }}

tear_down_test_executor_instances:
name: Tear down test executor instances
if: always()
needs: [ report_windows_test_results, report_linux_test_results ]
uses: ./.github/workflows/run_task.yml
with:
container_make_target: "terraform/ec2-test-executors/clean PRE_RELEASE_NAME=${{ inputs.gh_release_name }}"
secrets: inherit
# provision_and_execute_tests_linux:
# name: Provision instances and run tests for linux
# needs: [ spin_up_test_executor_instances, sign_suse_packages, tear_down_suse ]
# if: ${{ always() && !failure() && !cancelled()
# && (needs.spin_up_test_executor_instances.result == 'success' || needs.spin_up_test_executor_instances.result == 'skipped')
# && (needs.sign_suse_packages.result == 'success' || needs.sign_suse_packages.result == 'skipped')}}
# uses: ./.github/workflows/run_task.yml
# with:
# 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 }}"
# secrets: inherit
#
# provision_and_execute_tests_windows:
# name: Provision instances and run tests for windows
# needs: spin_up_test_executor_instances
# if: ${{ (needs.spin_up_test_executor_instances.result == 'success' || needs.spin_up_test_executor_instances.result == 'skipped') && ( inputs.windows_matrix != '[]' ) }}
# uses: ./.github/workflows/run_task.yml
# with:
# 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 }}"
# secrets: inherit
#
# report_linux_test_results:
# name: Report results linux
# runs-on: ubuntu-20.04
# needs: [ provision_and_execute_tests_linux ]
# if : ${{ always() && !failure() && !cancelled() && (needs.provision_and_execute_tests_linux.result == 'success')}}
# env:
# GH_TOKEN: ${{ github.token }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
#
# - name: Download report from pre-release # not ok
# run: |
# gh release download ${{ inputs.gh_release_name }} --pattern ${{ inputs.linux_test_report_name }}
#
# - name: Tests Report Details Linux # ok
# uses: dorny/test-reporter@v1
# with:
# name: Tests Report Details # Name of the check run which will be created
# path: ${{ inputs.linux_test_report_name }} # Path to test results
# reporter: jest-junit
#
# - name: Tests Report Summary Linux # ok
# uses: EnricoMi/publish-unit-test-result-action@v2
# if: always()
# with:
# files: |
# ${{ inputs.linux_test_report_name }}
#
# report_windows_test_results:
# name: Report results windows
# runs-on: ubuntu-20.04
# needs: [ provision_and_execute_tests_windows ]
# if: ${{ inputs.windows_matrix != '[]' }}
# env:
# GH_TOKEN: ${{ github.token }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
#
# - name: Download report from pre-release # not ok
# run: |
# gh release download ${{ inputs.gh_release_name }} --pattern ${{ inputs.windows_test_report_name }}
#
# - name: Tests Report Details Windows # ok
# uses: dorny/test-reporter@v1
# with:
# name: Tests Report Details # Name of the check run which will be created
# path: ${{ inputs.windows_test_report_name }} # Path to test results
# reporter: jest-junit
#
# - name: Tests Report Summary Windows # ok
# uses: EnricoMi/publish-unit-test-result-action@v2
# if: always()
# with:
# files: |
# ${{ inputs.windows_test_report_name }}
#
# tear_down_test_executor_instances:
# name: Tear down test executor instances
# if: always()
# needs: [ report_windows_test_results, report_linux_test_results ]
# uses: ./.github/workflows/run_task.yml
# with:
# container_make_target: "terraform/ec2-test-executors/clean PRE_RELEASE_NAME=${{ inputs.gh_release_name }}"
# secrets: inherit
1 change: 1 addition & 0 deletions ansible/provision-and-execute-tests/playbook-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# the playbook again by removing free strategy.
any_errors_fatal: true
strategy: free
gather_facts : no
vars:
node_version: 16.14.0
# The following information is populated using the gathered inventory variables
Expand Down
2 changes: 1 addition & 1 deletion versions/common.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fbVersion: 3.2.7
fbVersion: 3.2.8

# This file, together with each distro file are processed and merged incrementally to
# build all the information required to download and test each package. Each package ends
Expand Down
3 changes: 2 additions & 1 deletion versions/strategyMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ def list_distro_files():
return [
filename
for filename in os.listdir(".")
if (filename.endswith(".yml") or filename.endswith(".yaml"))
# if (filename.endswith(".yml") or filename.endswith(".yaml"))
if ((filename.startswith("sles") or filename.startswith("centos_7")) and (filename.endswith(".yml") or filename.endswith(".yaml")))
and filename != "common.yml"
]
except Exception as e:
Expand Down
Loading