-
Notifications
You must be signed in to change notification settings - Fork 384
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
Setup Review Apps on CPL Gem on ControlPlane #584
Closed
Closed
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
3336b2c
WIP
justin808 203b307
WIP
justin808 bbb994d
WIP
justin808 a94c8a2
WIP
justin808 f1b9767
WIP
justin808 c965188
WIP
justin808 1c6d90b
WIP
justin808 e043485
WIP
justin808 ca10047
provision the appˆ
justin808 0021add
WIP
justin808 0a905bd
WIP
justin808 79ad9d5
Updates for deployment
justin808 34c16b6
Updates for deployment
justin808 c5d3afb
Updates for deployment
justin808 80f4707
Updates for deployment
justin808 25d058f
Updates for deployment
justin808 3895a75
Updates for deployment
justin808 7a67d1a
Updates for deployment
justin808 e1aa3fc
test error handling
justin808 922f68b
Updates for deployment
justin808 bea4da5
chore: remove error test
rameziophobia e00d59a
3.3.4
justin808 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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 |
---|---|---|
@@ -1,8 +1,22 @@ | ||
#!/bin/bash -e | ||
|
||
echo 'Running release_script.sh per controlplane.yml' | ||
|
||
echo 'Run DB migrations' | ||
./bin/rails db:prepare | ||
log() { | ||
echo "[`date +%Y-%m-%d:%H:%M:%S`]: $1" | ||
} | ||
|
||
echo 'Completed release_script.sh per controlplane.yml' | ||
error_exit() { | ||
log "$1" 1>&2 | ||
exit 1 | ||
} | ||
|
||
log 'Running release_script.sh per controlplane.yml' | ||
|
||
if [ -x ./bin/rails ]; then | ||
log 'Run DB migrations' | ||
./bin/rails db:prepare || error_exit "Failed to run DB migrations" | ||
else | ||
error_exit "./bin/rails does not exist or is not executable" | ||
fi | ||
|
||
log 'Completed release_script.sh per controlplane.yml' |
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
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
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,23 @@ | ||
# Org level secrets are used to store sensitive information that is | ||
# shared across multiple apps in the same organization. This is | ||
# useful for storing things like API keys, database credentials, and | ||
# other sensitive information that is shared across multiple apps | ||
# in the same organization. | ||
|
||
# This is how you apply this once (not during CI) | ||
# cpl apply-template secrets -a qa-react-webpack-rails-tutorial --org shakacode-open-source-examples-staging | ||
|
||
kind: secret | ||
name: {{APP_SECRETS}} | ||
type: dictionary | ||
data: | ||
SOME_ENV: "123456" | ||
|
||
--- | ||
|
||
# Policy is needed to allow identities to access secrets | ||
kind: policy | ||
name: {{APP_SECRETS_POLICY}} | ||
targetKind: secret | ||
targetLinks: | ||
- //secret/{{APP_SECRETS}} |
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
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve error handling for API requests.
The current implementation does not handle potential errors from the GitHub API request. Consider adding error handling to ensure robustness.
Here's a suggestion to improve error handling: