Skip to content
Draft
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
21 changes: 14 additions & 7 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
runs-on: ubuntu-latest
outputs:
pre_release_name: ${{ steps.set_vars.outputs.pre_release_name }}
nr_fb_output_plugin_version: ${{ steps.set_vars.outputs.nr_fb_output_plugin_version }}
nr_fb_output_plugin_tag: ${{ steps.set_vars.outputs.nr_fb_output_plugin_tag }}
sles_matrix: ${{ steps.set-matrices.outputs.sles_matrix }}
linux_and_windows_matrix: ${{ steps.set-matrices.outputs.linux_and_windows_matrix }}
linux_and_windows_unique_target_package : ${{ steps.set-matrices.outputs.linux_and_windows_unique_target_package }}
Expand All @@ -29,13 +31,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

# This is a workaround required to pass environment variables to the run_e2e_tests workflow
# See: https://stackoverflow.com/a/73305536 and https://github.com/orgs/community/discussions/26671#discussioncomment-3252793
- name: Make dynamically-generated env variables available to be passed down to reusable workflows
id: set_vars
run: |
echo "pre_release_name=$PRE_RELEASE_NAME" >> $GITHUB_OUTPUT

- name: (Re)create pre-release
run: |
pre_release_exists=$(gh release view $PRE_RELEASE_NAME &>/dev/null && echo "true" || echo "false")
Expand Down Expand Up @@ -75,6 +70,16 @@ jobs:
gh release upload ${{ env.PRE_RELEASE_NAME }} versions/linuxAndWindowsMatrix.json --repo newrelic/fluent-bit-package
gh release upload ${{ env.PRE_RELEASE_NAME }} versions/slesMatrix.json --repo newrelic/fluent-bit-package

# Extract plugin version and tag from the generated matrix (they're defined in common.yml and merged into all entries)
- name: Extract plugin configuration from matrix
id: set_vars
run: |
echo "pre_release_name=$PRE_RELEASE_NAME" >> $GITHUB_OUTPUT
nr_fb_output_plugin_version=$(cat versions/linuxAndWindowsMatrix.json | jq -r '.[0].nrFbOutputPluginVersion')
nr_fb_output_plugin_tag=$(cat versions/linuxAndWindowsMatrix.json | jq -r '.[0].nrFbOutputPluginTag')
echo "nr_fb_output_plugin_version=${nr_fb_output_plugin_version}" >> $GITHUB_OUTPUT
echo "nr_fb_output_plugin_tag=${nr_fb_output_plugin_tag}" >> $GITHUB_OUTPUT

- name: Compute and upload schemas
run: |
make schemas/generateSchemas;
Expand Down Expand Up @@ -168,6 +173,8 @@ jobs:
sles_matrix: ${{ needs.setup_environment.outputs.sles_matrix }}
pre_release_name: ${{ needs.setup_environment.outputs.pre_release_name }}
windows_matrix: ${{ needs.setup_environment.outputs.windows_matrix }}
nr_fb_output_plugin_version: ${{ needs.setup_environment.outputs.nr_fb_output_plugin_version }}
nr_fb_output_plugin_tag: ${{ needs.setup_environment.outputs.nr_fb_output_plugin_tag }}
secrets: inherit

publish_linux_to_staging:
Expand Down
34 changes: 25 additions & 9 deletions .github/workflows/run_prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ on:
required: false
default: test-report-windows-prerelease.xml
type: string
nr_fb_output_plugin_version:
description: Version/tag of the newrelic-fluent-bit-output plugin to test. Must be provided from versions/common.yml (nrFbOutputPluginVersion)
required: true
type: string
nr_fb_output_plugin_tag:
description: GitHub release tag for the newrelic-fluent-bit-output plugin. Must be provided from versions/common.yml (nrFbOutputPluginTag)
required: true
type: string
workflow_dispatch:
inputs:
gh_release_name:
Expand Down Expand Up @@ -80,6 +88,14 @@ on:
required: false
default: test-report-windows-prerelease.xml
type: string
nr_fb_output_plugin_version:
description: Version/tag of the newrelic-fluent-bit-output plugin to test. Must be provided from versions/common.yml (nrFbOutputPluginVersion)
required: true
type: string
nr_fb_output_plugin_tag:
description: GitHub release tag for the newrelic-fluent-bit-output plugin. Must be provided from versions/common.yml (nrFbOutputPluginTag)
required: true
type: string

# So that only one test suite will be run simultaneously against a given GH release. This ensures that there will not
# be multiple runners accessing the same Terraform state at the same time. Note that we need to set this lock here as well
Expand Down Expand Up @@ -162,17 +178,17 @@ jobs:
&& (needs.tear_down_suse.result == 'success' || needs.tear_down_suse.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 }}"
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 }} NR_FB_OUTPUT_PLUGIN_VERSION=${{ inputs.nr_fb_output_plugin_version }} NR_FB_OUTPUT_PLUGIN_TAG=${{ inputs.nr_fb_output_plugin_tag }}"
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
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 }} NR_FB_OUTPUT_PLUGIN_VERSION=${{ inputs.nr_fb_output_plugin_version }} NR_FB_OUTPUT_PLUGIN_TAG=${{ inputs.nr_fb_output_plugin_tag }}"
secrets: inherit

report_linux_test_results:
name: Report results linux
Expand Down
8 changes: 4 additions & 4 deletions ansible/provision-and-execute-tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ include ../Ansible.common.mk

.PHONY: prerelease
prerelease: dependencies prepare-inventory
ansible-playbook $(ANSIBLE_FOLDER)/playbook-provision-prerelease.yml -i $(ANSIBLE_INVENTORY)
ansible-playbook $(ANSIBLE_FOLDER)/playbook-provision-prerelease.yml -i $(ANSIBLE_INVENTORY) $(if $(NR_FB_OUTPUT_PLUGIN_VERSION),-e nr_fb_output_plugin_version=$(NR_FB_OUTPUT_PLUGIN_VERSION)) $(if $(NR_FB_OUTPUT_PLUGIN_TAG),-e plugin_tag=$(NR_FB_OUTPUT_PLUGIN_TAG))
ansible-playbook $(ANSIBLE_FOLDER)/playbook-run-tests.yml -i $(ANSIBLE_INVENTORY)
ansible-playbook $(ANSIBLE_FOLDER)/playbook-windows.yml -i $(ANSIBLE_INVENTORY)
ansible-playbook $(ANSIBLE_FOLDER)/playbook-windows.yml -i $(ANSIBLE_INVENTORY) $(if $(NR_FB_OUTPUT_PLUGIN_VERSION),-e nr_fb_output_plugin_version=$(NR_FB_OUTPUT_PLUGIN_VERSION)) $(if $(NR_FB_OUTPUT_PLUGIN_TAG),-e plugin_tag=$(NR_FB_OUTPUT_PLUGIN_TAG))
ansible-playbook $(ANSIBLE_FOLDER)/playbook-merge-results.yml -i $(ANSIBLE_INVENTORY)


.PHONY: prerelease-linux
prerelease-linux: dependencies prepare-inventory
ansible-playbook $(ANSIBLE_FOLDER)/playbook-provision-prerelease.yml -i $(ANSIBLE_INVENTORY)
ansible-playbook $(ANSIBLE_FOLDER)/playbook-provision-prerelease.yml -i $(ANSIBLE_INVENTORY) $(if $(NR_FB_OUTPUT_PLUGIN_VERSION),-e nr_fb_output_plugin_version=$(NR_FB_OUTPUT_PLUGIN_VERSION)) $(if $(NR_FB_OUTPUT_PLUGIN_TAG),-e plugin_tag=$(NR_FB_OUTPUT_PLUGIN_TAG))
ansible-playbook $(ANSIBLE_FOLDER)/playbook-run-tests.yml -i $(ANSIBLE_INVENTORY)
ansible-playbook $(ANSIBLE_FOLDER)/playbook-merge-results.yml -i $(ANSIBLE_INVENTORY)


.PHONY: prerelease-windows
prerelease-windows: dependencies prepare-inventory
ansible-playbook $(ANSIBLE_FOLDER)/playbook-windows.yml -i $(ANSIBLE_INVENTORY)
ansible-playbook $(ANSIBLE_FOLDER)/playbook-windows.yml -i $(ANSIBLE_INVENTORY) $(if $(NR_FB_OUTPUT_PLUGIN_VERSION),-e nr_fb_output_plugin_version=$(NR_FB_OUTPUT_PLUGIN_VERSION)) $(if $(NR_FB_OUTPUT_PLUGIN_TAG),-e plugin_tag=$(NR_FB_OUTPUT_PLUGIN_TAG))
ansible-playbook $(ANSIBLE_FOLDER)/playbook-merge-results.yml -i $(ANSIBLE_INVENTORY)

.PHONY: staging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
os_distro: "{{ tags.os_distro }}"
os_version: "{{ tags.os_version }}"
arch: "{{ tags.arch }}"
nr_fb_output_plugin_version: 1.19.2
# Value set in versions/common.yml (nrFbOutputPluginVersion) and can be overridden via extra vars (-e nr_fb_output_plugin_version=<version>)
nr_fb_output_plugin_version: "{{ nr_fb_output_plugin_version }}"
# The following vars are injected in the fargate task env
new_relic_api_key: "{{ lookup('ansible.builtin.env', 'NEW_RELIC_API_KEY') }}"
new_relic_account_id: "{{ lookup('ansible.builtin.env', 'NEW_RELIC_ACCOUNT_ID') }}"
Expand Down
3 changes: 2 additions & 1 deletion ansible/provision-and-execute-tests/playbook-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@

node_path: 'C:\Program Files\nodejs\'

nr_fb_output_plugin_version: '1.19.2'
# Value set in versions/common.yml (nrFbOutputPluginVersion) and can be overridden via extra vars (-e nr_fb_output_plugin_version=<version>)
nr_fb_output_plugin_version: "{{ nr_fb_output_plugin_version }}"
environment:
NEW_RELIC_API_KEY: "{{ new_relic_api_key }}"
NEW_RELIC_ACCOUNT_ID: "{{ new_relic_account_id }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
infra_agent_config_file_absolute_path: /etc/newrelic-infra.yml
nr_fb_output_file_extension: 'so'
nr_fb_output_plugin_artifact: 'out_newrelic-linux-{{ plugin_arch }}-{{ plugin_version }}.{{ nr_fb_output_file_extension }}'
nr_fb_output_plugin_url: "https://github.com/newrelic/newrelic-fluent-bit-output/releases/download/v{{ plugin_version }}/{{ nr_fb_output_plugin_artifact }}"
nr_fb_output_plugin_download_file_path: "/tmp/out_newrelic.{{ nr_fb_output_file_extension }}'"
# For standard releases, plugin_version is like "1.19.2" and tag is "v1.19.2"
# For custom/beta releases, plugin_version includes the full artifact name like "newrelic-fluent-bit-output-3.3.1-beta-rhel8-test"
# and the tag should be set via plugin_tag variable (defaults to "v{{ plugin_version }}" for backwards compatibility)
nr_fb_output_plugin_tag: "{{ plugin_tag | default('v' + plugin_version) }}"
nr_fb_output_plugin_url: "https://github.com/newrelic/newrelic-fluent-bit-output/releases/download/{{ nr_fb_output_plugin_tag }}/{{ nr_fb_output_plugin_artifact }}"
nr_fb_output_plugin_download_file_path: "/tmp/out_newrelic.{{ nr_fb_output_file_extension }}"
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
infra_agent_config_file_absolute_path: C:\Program Files\New Relic\newrelic-infra\newrelic-infra.yml
nr_fb_output_file_extension: 'dll'
nr_fb_output_plugin_artifact: 'out_newrelic-windows-{{ plugin_arch }}-{{ plugin_version }}.{{ nr_fb_output_file_extension }}'
nr_fb_output_plugin_url: "https://github.com/newrelic/newrelic-fluent-bit-output/releases/download/v{{ plugin_version }}/{{ nr_fb_output_plugin_artifact }}"
# For standard releases, plugin_version is like "1.19.2" and tag is "v1.19.2"
# For custom/beta releases, plugin_version includes the full artifact name like "newrelic-fluent-bit-output-3.3.1-beta-rhel8-test"
# and the tag should be set via plugin_tag variable (defaults to "v{{ plugin_version }}" for backwards compatibility)
nr_fb_output_plugin_tag: "{{ plugin_tag | default('v' + plugin_version) }}"
nr_fb_output_plugin_url: "https://github.com/newrelic/newrelic-fluent-bit-output/releases/download/{{ nr_fb_output_plugin_tag }}/{{ nr_fb_output_plugin_artifact }}"
nr_fb_output_plugin_download_file_path: 'C:\Windows\Temp\out_newrelic.{{ nr_fb_output_file_extension }}'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 6 additions & 1 deletion versions/common.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
fbVersion: 4.2.0
fbVersion: 4.2.2

# New Relic Fluent Bit Output Plugin Configuration
# These values are used during E2E testing to download and test a specific version of the NR output plugin
nrFbOutputPluginVersion: 3.3.1-beta-rhel8-test
nrFbOutputPluginTag: v3.3.1-beta-rhel8-test

# 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
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion versions/sles_15.4.ymlx → versions/sles_15.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ osDistro: sles
osVersion: 15.4
packages:
- arch: x86_64
ami: ami-054bba390120adf1d
ami: ami-0c00d482c766145ab
2 changes: 1 addition & 1 deletion versions/sles_15.5.ymlx → versions/sles_15.5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ osDistro: sles
osVersion: 15.5
packages:
- arch: x86_64
ami: ami-0b7de87a082366f50
ami: ami-0ee05215c07f1b8cd
5 changes: 5 additions & 0 deletions versions/sles_15.6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
osDistro: sles
osVersion: 15.6
packages:
- arch: x86_64
ami: ami-06efc45c7e3e16e77
5 changes: 5 additions & 0 deletions versions/sles_15.7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
osDistro: sles
osVersion: 15.7
packages:
- arch: x86_64
ami: ami-0f409b75e8c70d0e4
2 changes: 1 addition & 1 deletion versions/strategyMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def list_distro_files():
return [
filename
for filename in os.listdir(".")
if ((filename.endswith(".yml") or filename.endswith(".yaml")) and not filename.startswith("windows"))
if (filename.endswith(".yml") or filename.endswith(".yaml"))
and filename != "common.yml"
]
except Exception as e:
Expand Down
File renamed without changes.
File renamed without changes.