-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41584ad
commit ee0ee73
Showing
4 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Merge to master | ||
|
||
on: | ||
push: | ||
branches: | ||
- test_main | ||
|
||
jobs: | ||
cd: | ||
name: Promote pre-release to release and publish artifacts to production repositories | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/github-script@v6 | ||
id: get_pr_number | ||
with: | ||
script: | | ||
return ( | ||
await github.rest.repos.listPullRequestsAssociatedWithCommit({ | ||
commit_sha: context.sha, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
}) | ||
).data[0].number; | ||
result-encoding: string | ||
|
||
- name: Download windows packages | ||
run: | | ||
gh release download ${{ steps.get_pr_number.outputs.result }} --pattern 'fb-windows-*.zip' | ||
- name: Publish assets to windows S3 | ||
uses: newrelic/[email protected] | ||
env: | ||
TAG: ${{ github.event.inputs.tag }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.OHAI_AWS_ACCESS_KEY_ID_STAGING }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.OHAI_AWS_SECRET_ACCESS_KEY_STAGING }} | ||
AWS_ROLE_ARN: ${{ secrets.OHAI_AWS_ROLE_ARN_STAGING }} | ||
AWS_ROLE_SESSION_NAME: ${{ secrets.OHAI_AWS_ROLE_SESSION_NAME_STAGING }} | ||
with: | ||
tag: ${{env.TAG}} | ||
app_name: ${{env.FB_PACKAGE_NAME}} | ||
repo_name: "newrelic/fluent-bit-package" | ||
schema: "custom" | ||
schema_url: "https://raw.githubusercontent.com/newrelic/fluent-bit-package/main/schemas/fb-linux.yml" | ||
aws_access_key_id: ${{ env.AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ env.AWS_SECRET_ACCESS_KEY }} | ||
aws_s3_bucket_name: ${{ env.AWS_S3_BUCKET_NAME }} | ||
aws_s3_lock_bucket_name: ${{ env.AWS_S3_LOCK_BUCKET_NAME }} | ||
access_point_host: "staging" | ||
run_id: ${{ github.run_id }} | ||
aws_region: ${{ env.AWS_REGION }} | ||
aws_role_session_name: ${{ env.AWS_ROLE_SESSION_NAME }} | ||
aws_role_arn: ${{ env.AWS_ROLE_ARN }} | ||
# used for signing package stuff | ||
gpg_passphrase: ${{ env.GPG_PASSPHRASE }} | ||
gpg_private_key_base64: ${{ env.GPG_PRIVATE_KEY_BASE64 }} | ||
|
||
run_e2e_tests: | ||
needs: [ setup_environment, sign_suse_packages, upload_official_packages_to_prerelease ] | ||
name: Run E2E tests | ||
uses: ./.github/workflows/run_e2e_tests.yml | ||
with: | ||
gh_release_name: ${{ needs.setup_environment.outputs.pre_release_name }} | ||
infra_agent_version: latest | ||
secrets: inherit | ||
|
||
provision_and_execute_tests: | ||
name: Provision instances and run tests | ||
needs: spin_up_test_executor_instances | ||
uses: ./.github/workflows/run_task.yml | ||
with: | ||
container_make_target: "ansible/provision-and-execute-tests PR_NUMBER=${{ github.event.pull_request.number }}" | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.DEFAULT_GOAL := generateSchemas | ||
|
||
.PHONY: generateSchemas | ||
generateSchemas: | ||
python3 schema.linux.py > generated-linux-schema.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import json | ||
|
||
if __name__ == '__main__': | ||
matrix = open('../versions/strategyMatrix.json') | ||
matrixData = json.load(matrix) | ||
schemaObjectArray = [] | ||
for item in matrixData: | ||
if item['osDistro'] != 'windows-server': | ||
type = item['nrPackageUrl'].split('/')[5] | ||
arch = 'amd64' if (item['arch'] == 'x86_64' or 'amd64') else 'arm64' | ||
schemaObject = { | ||
'src': item['targetPackageName'], | ||
'arch': [ | ||
item['arch'] | ||
], | ||
'uploads': [ | ||
{ | ||
'type': type, | ||
'src_repo': '{access_point_host}/infrastructure_agent/linux/' + type, | ||
'dest': '{dest_prefix}linux/' + type + '/', | ||
'os_version': [ | ||
item['osVersion'] | ||
] | ||
} | ||
] | ||
} | ||
schemaObjectArray.append(schemaObject) | ||
|
||
print(schemaObjectArray) | ||
matrix.close() |