Skip to content

Commit

Permalink
test windows publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
luckslovez committed Nov 27, 2023
1 parent 3a36a33 commit daa9bad
Showing 1 changed file with 54 additions and 53 deletions.
107 changes: 54 additions & 53 deletions .github/workflows/merge-to-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,65 +3,66 @@ name: Merge to master
on:
push:
branches:
- test_main
- merge-to-master_publish_win_packages

jobs:
get-release-tag:
name: Publish linux artifacts into s3 bucket
runs-on: ubuntu-latest
outputs:
tag: "tmp-pr-${{ steps.get_pr_number.outputs.result }}"
steps:
- name: Get PR number
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

publish-linux:
name: Publish linux packages to staging and production buckets
needs: get-release-tag
runs-on: ubuntu-latest
steps:
- name: Publish linux packages to staging
uses: newrelic/[email protected]
env:
TAG: ${{ needs.get-release-tag.outputs.tag }}
GPG_MAIL: ${{ secrets.LOGGING_GPG_MAIL }}
GPG_PASSPHRASE: ${{ secrets.OHAI_GPG_PASSPHRASE }}
GPG_PRIVATE_KEY_BASE64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded
AWS_S3_BUCKET_NAME: "nr-downloads-ohai-staging"
AWS_S3_LOCK_BUCKET_NAME: "onhost-ci-lock-staging"
AWS_REGION: "us-east-1"
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}}
repo_name: "newrelic/fluent-bit-package"
schema: "custom"
schema_url: "https://github.com/newrelic/fluent-bit-package/releases/download/${{ env.TAG }}/generated-linux-schema.yaml"
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 }}
tag: "tmp-pr-80"
# tag: "tmp-pr-${{ steps.get_pr_number.outputs.result }}"
# steps:
# - name: Get PR number
# 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
#
# publish-linux:
# name: Publish linux packages to staging and production buckets
# needs: get-release-tag
# runs-on: ubuntu-latest
# steps:
# - name: Publish linux packages to staging
# uses: newrelic/[email protected]
# env:
# TAG: ${{ needs.get-release-tag.outputs.tag }}
# GPG_MAIL: ${{ secrets.LOGGING_GPG_MAIL }}
# GPG_PASSPHRASE: ${{ secrets.OHAI_GPG_PASSPHRASE }}
# GPG_PRIVATE_KEY_BASE64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded
# AWS_S3_BUCKET_NAME: "nr-downloads-ohai-staging"
# AWS_S3_LOCK_BUCKET_NAME: "onhost-ci-lock-staging"
# AWS_REGION: "us-east-1"
# 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}}
# repo_name: "newrelic/fluent-bit-package"
# schema: "custom"
# schema_url: "https://github.com/newrelic/fluent-bit-package/releases/download/${{ env.TAG }}/generated-linux-schema.yaml"
# 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 }}

publish-windows:
name: Publish windows packages to production bucket
Expand Down

0 comments on commit daa9bad

Please sign in to comment.