Closed magsallen closed 4 years ago
I've refactored this based on comments in https://github.com/Financial-Times/next-ci-shared-helpers/pull/22
Page Kit builds will now call the aws-cli install and configure steps via separate helpers and to pass the required aws keys as arguments to the configure step.
I have tested this by copying the below into my app's Makefile
:
deploy-test:
@if [ -e public/manifest.json ]; then \
if [ -e .circleci/shared-helpers ]; then \
.circleci/shared-helpers/helper-configure-awscli $(aws_access_hashed_assets) $(aws_secret_hashed_assets) \
&& .circleci/shared-helpers/helper-upload-assets-to-s3 public hashed-assets/page-kit-test; \
else \
echo "Could not find the shared-helpers directory"; \
fi \
else \
echo "Could not find a manifest.json"; \
fi
Then running:
$ git clone --depth 1 git@github.com:Financial-Times/next-ci-shared-helpers.git .circleci/shared-helpers
$ make deploy-test
A few things I noticed:
sudo
which created an interactive prompt... do we know what the deal is with sudo
on CI?;
and &&
Refactors the deploy assets command in n-gage to remove the dependency on n-heroku-tools for apps which are using Page Kit
PR to add the aws-cli helpers PR to add the upload assets to S3 helper
Related issue on Page Kit: https://github.com/Financial-Times/next-ci-shared-helpers/issues/21