Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #71 from gaiksaya/release-workflow-patch
Browse files Browse the repository at this point in the history
Change release workflow to use new staging bucket for artifacts
  • Loading branch information
gaiksaya authored and joshuali925 committed Feb 1, 2021
1 parent 5929c47 commit ceef1a7
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ 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-east-1

- name: Checkout Kibana
Expand Down Expand Up @@ -51,7 +51,15 @@ jobs:
run: |
yarn build
mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}.zip
- name: Upload to S3
run: |
artifact=`ls ./build/*.zip`
aws s3 cp $artifact s3://artifacts.opendistroforelasticsearch.amazon.com/downloads/kibana-plugins/opendistro-notebooks/
aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/downloads/*"
# inject build number before the suffix
zip_outfile=`basename ${artifact%.zip}-build-${GITHUB_RUN_NUMBER}.zip`
s3_prefix="s3://staging.artifacts.opendistroforelasticsearch.amazon.com/snapshots/kibana-plugins/notebooks/"
echo "Copying ${artifact} to ${s3_prefix}${zip_outfile}"
aws s3 cp --quiet $artifact ${s3_prefix}${zip_outfile}

0 comments on commit ceef1a7

Please sign in to comment.