-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add invalidation command (#322)
* feat: add invalidation command * fix: checks * fix: enable prerelease * fix: install optional packages * fix: version * fix: disable git push * fix: issues
- Loading branch information
Showing
3 changed files
with
47 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
parameters: | ||
step_name: | ||
description: Name of the step | ||
type: string | ||
default: Invalidate Cloudfront Distribution | ||
cloudfron_distribution_id: | ||
description: AWS Cloudfront Distribution ID | ||
type: string | ||
paths: | ||
description: Paths to invalidate | ||
type: string | ||
steps: | ||
- run: | ||
name: << parameters.step_name >> | ||
environment: | ||
DISTRIBUTION: << parameters.cloudfron_distribution_id >> | ||
PATHS: << parameters.paths >> | ||
command: <<include(scripts/aws/invalidate_cloudfront_distribution.sh)>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,10 @@ parameters: | |
description: The executor used to run this job | ||
type: executor | ||
default: node-executor | ||
prerelease: | ||
description: Creates a prerelease | ||
type: boolean | ||
default: false | ||
steps: | ||
- add_ssh_keys: | ||
fingerprints: | ||
|
@@ -73,20 +77,35 @@ steps: | |
- run: | ||
name: Release Monorepo | ||
command: |- | ||
SENTRY_PROJECT=<< parameters.sentry_project >> HUSKY=0 npx [email protected] publish \ | ||
--message "<< parameters.commit_message >>" --yes \ | ||
--conventional-commits --no-verify-access << parameters.publish_args >> | ||
PRERELEASE="<< parameters.prerelease >>" | ||
if [ "$PRERELEASE" = "true" ]; then | ||
SENTRY_PROJECT=<< parameters.sentry_project >> HUSKY=0 npx [email protected] publish prerelease \ | ||
--message "<< parameters.commit_message >>" --yes \ | ||
--no-push --no-git-tag-version --canary \ | ||
--conventional-commits --no-verify-access << parameters.publish_args >> | ||
else | ||
SENTRY_PROJECT=<< parameters.sentry_project >> HUSKY=0 npx [email protected] publish \ | ||
--message "<< parameters.commit_message >>" --yes \ | ||
--conventional-commits --no-verify-access << parameters.publish_args >> | ||
fi | ||
- when: | ||
condition: | ||
equal: ["lite", << parameters.release_engine >>] | ||
steps: | ||
- run: | ||
name: Release Monorepo | ||
command: |- | ||
SENTRY_PROJECT=<< parameters.sentry_project >> HUSKY=0 npx --package @lerna-lite/[email protected] lerna publish \ | ||
--message "<< parameters.commit_message >>" --yes \ | ||
--conventional-commits --no-verify-access << parameters.publish_args >> | ||
PRERELEASE="<< parameters.prerelease >>" | ||
if [ "$PRERELEASE" = "true" ]; then | ||
SENTRY_PROJECT=<< parameters.sentry_project >> HUSKY=0 npx --package @lerna-lite/[email protected] lerna publish prerelease \ | ||
--message "<< parameters.commit_message >>" --yes \ | ||
--no-push --no-git-tag-version --canary \ | ||
--conventional-commits --no-verify-access << parameters.publish_args >> | ||
else | ||
SENTRY_PROJECT=<< parameters.sentry_project >> HUSKY=0 npx --package @lerna-lite/[email protected] lerna publish \ | ||
--message "<< parameters.commit_message >>" --yes \ | ||
--conventional-commits --no-verify-access << parameters.publish_args >> | ||
fi | ||
- when: | ||
condition: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
aws cloudfront create-invalidation --distribution-id "$DISTRIBUTION" --paths "$PATHS" |