Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add publish to s3 fips task #93

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
39 changes: 39 additions & 0 deletions .github/workflows/reusable_on_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ on:
type: string
required: false
default: ""
upload_fips_packages:
description: Defines if the FIPS packages should be uploaded to S3
type: boolean
required: false
default: false
publish_schema_fips:
description: Defines the schema for the publish_action for FIPS packages.
type: string
required: false
default: "ohi-fips"
publish_schema_url_fips:
description: Defines the schema_url for the publish_action for FIPS packages (it requires publish_schema_fips='custom')
type: string
required: false
default: ""

secrets: # uppercase secrets to match the already defined organization secrets
OHAI_AWS_ROLE_ARN_PRODUCTION:
Expand Down Expand Up @@ -84,6 +99,30 @@ jobs:
# used for signing package stuff
gpg_passphrase: ${{ secrets.OHAI_GPG_PASSPHRASE }}
gpg_private_key_base64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }}
- name: Publish to S3 action - fips
if: ${{ inputs.upload_fips_packages }}
uses: newrelic/infrastructure-publish-action@v1
with:
# lock enabled
disable_lock: false
run_id: ${{ github.run_id }}
tag: ${{ inputs.tag }}
app_name: "nri-${{ inputs.integration }}"
repo_name: ${{ github.event.repository.full_name }}
access_point_host: "production"
schema: ${{ inputs.publish_schema_fips }}
schema_url: ${{ inputs.publish_schema_url_fips }}
aws_region: "us-east-1"
aws_role_arn: ${{ secrets.OHAI_AWS_ROLE_ARN_PRODUCTION }}
aws_role_session_name: ${{ secrets.OHAI_AWS_ROLE_SESSION_NAME_PRODUCTION }}
aws_access_key_id: ${{ secrets.OHAI_AWS_ACCESS_KEY_ID_PRODUCTION }}
aws_secret_access_key: ${{ secrets.OHAI_AWS_SECRET_ACCESS_KEY_PRODUCTION }}
aws_s3_bucket_name: "nr-downloads-main"
# used for locking in case of concurrent releases
aws_s3_lock_bucket_name: "onhost-ci-lock"
# used for signing package stuff
gpg_passphrase: ${{ secrets.OHAI_GPG_PASSPHRASE }}
gpg_private_key_base64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }}
- name: Test package from prod repo
if: ${{ inputs.test_package }}
uses: newrelic/integrations-pkg-test-action/linux@v1
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/reusable_pre_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ on:
type: string
required: false
default: ""
upload_fips_packages:
description: Defines if the FIPS packages should be uploaded to S3
type: boolean
required: false
default: false
publish_schema_fips:
description: Defines the schema for the publish_action for FIPS packages.
type: string
required: false
default: "ohi-fips"
publish_schema_url_fips:
description: Defines the schema_url for the publish_action for FIPS packages (it requires publish_schema_fips='custom')
type: string
required: false
default: ""
run_integration_nix:
required: false
type: boolean
Expand Down Expand Up @@ -214,6 +229,29 @@ jobs:
# used for signing package stuff
gpg_passphrase: ${{ secrets.OHAI_GPG_PASSPHRASE }}
gpg_private_key_base64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }}
- name: Publish to S3 action - fips
if: ${{ inputs.upload_fips_packages }}
uses: newrelic/infrastructure-publish-action@v1
with:
disable_lock: false
run_id: ${{ github.run_id }}
tag: ${{ inputs.tag }}
app_name: "nri-${{ inputs.integration }}-fips"
repo_name: ${{ github.event.repository.full_name }}
access_point_host: "staging"
schema: ${{ inputs.publish_schema_fips }}
schema_url: ${{ inputs.publish_schema_url_fips }}
aws_region: "us-east-1"
aws_role_arn: ${{ secrets.OHAI_AWS_ROLE_ARN_STAGING }}
aws_role_session_name: ${{ secrets.OHAI_AWS_ROLE_SESSION_NAME_STAGING }}
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"
dest_prefix: ${{ inputs.dest_prefix }}
# used for signing package stuff
gpg_passphrase: ${{ secrets.OHAI_GPG_PASSPHRASE }}
gpg_private_key_base64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }}
- name: Test package from Staging repo
if: ${{ inputs.test_package }}
uses: newrelic/integrations-pkg-test-action/linux@v1
Expand Down
Loading