Skip to content

Commit

Permalink
Merge pull request #680 from gaiksaya/release-workflow-patch
Browse files Browse the repository at this point in the history
Change release workflows to use new staging bucket for artifacts
  • Loading branch information
gaiksaya authored Feb 1, 2021
2 parents 3ca32e6 + e3fd164 commit e264bbd
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,21 @@ jobs:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-access-key-id: ${{ secrets.AWS_STAGING_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_STAGING_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Upload Artifacts to S3
shell: bash
run: |
s3_path=s3://artifacts.opendistroforelasticsearch.amazon.com/downloads
aws s3 cp ${{ steps.build_zip.outputs.ARTIFACT_PATH }} $s3_path/kibana-plugins/opendistro-security/opendistroSecurityKibana-${{ steps.plugin_version.outputs.plugin_version }}.zip
aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths '/downloads/*'
s3_prefix="s3://staging.artifacts.opendistroforelasticsearch.amazon.com/snapshots/kibana-plugins/security/"
# Rename
mv ${{ steps.build_zip.outputs.ARTIFACT_PATH }} opendistroSecurityKibana-${{ steps.plugin_version.outputs.plugin_version }}.zip
zip=`ls opendistroSecurityKibana*.zip`
# Inject the build number before the suffix
zip_outfile=`basename ${zip%.zip}-build-${GITHUB_RUN_NUMBER}.zip`
echo "Copying ${zip} to ${s3_prefix}${zip_outfile}"
aws s3 cp --quiet $zip ${s3_prefix}${zip_outfile}

0 comments on commit e264bbd

Please sign in to comment.