-
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
Github Actions Promote #625
Open
justin808
wants to merge
11
commits into
master
Choose a base branch
from
justin808-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
eeabd9c
promote
justin808 652df55
fix help docs
justin808 1ef522b
fix invalid use of secret/vars
justin808 269c684
fix org
justin808 b1d0b14
fix validation
justin808 a2f8923
syntax errors
justin808 1ca2e06
fix comments
justin808 3ddf8a5
fix deploy
justin808 6131ce6
fix app name and messages
justin808 544cce4
WIP
justin808 fa96ca0
debug
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,29 @@ | ||
name: 'Validate Required Variables' | ||
description: 'Validates that all required secrets and variables for Control Plane operations' | ||
|
||
inputs: | ||
CPLN_TOKEN_STAGING: | ||
required: true | ||
description: 'Control Plane Staging Token' | ||
CPLN_TOKEN_PRODUCTION: | ||
required: true | ||
description: 'Control Plane Production Token' | ||
CPLN_ORG_STAGING: | ||
required: true | ||
description: 'Control Plane Staging Organization' | ||
CPLN_ORG_PRODUCTION: | ||
required: true | ||
description: 'Control Plane Production Organization' | ||
REVIEW_APP_PREFIX: | ||
required: true | ||
description: 'Review App Prefix' | ||
PRODUCTION_APP_NAME: | ||
required: true | ||
description: 'Production App Name' | ||
STAGING_APP_NAME: | ||
required: true | ||
description: 'Staging App Name' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
|
@@ -10,19 +33,37 @@ runs: | |
missing=() | ||
|
||
# Check required secrets | ||
if [ -z "$CPLN_TOKEN_STAGING" ]; then | ||
if [ -z "${{ inputs.CPLN_TOKEN_STAGING }}" ]; then | ||
missing+=("Secret: CPLN_TOKEN_STAGING") | ||
fi | ||
|
||
if [ -z "${{ inputs.CPLN_TOKEN_PRODUCTION }}" ]; then | ||
missing+=("Secret: CPLN_TOKEN_PRODUCTION") | ||
fi | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix trailing spaces. Remove trailing spaces from lines 43 and 64 to comply with YAML linting rules. -
+ Also applies to: 64-64 🧰 Tools🪛 YAMLlint (1.35.1)[error] 43-43: trailing spaces (trailing-spaces) |
||
# Check required variables | ||
if [ -z "$CPLN_ORG_STAGING" ]; then | ||
if [ -z "${{ inputs.CPLN_ORG_STAGING }}" ]; then | ||
missing+=("Variable: CPLN_ORG_STAGING") | ||
fi | ||
if [ -z "$REVIEW_APP_PREFIX" ]; then | ||
|
||
if [ -z "${{ inputs.CPLN_ORG_PRODUCTION }}" ]; then | ||
missing+=("Variable: CPLN_ORG_PRODUCTION") | ||
fi | ||
|
||
if [ -z "${{ inputs.REVIEW_APP_PREFIX }}" ]; then | ||
missing+=("Variable: REVIEW_APP_PREFIX") | ||
fi | ||
|
||
if [ -z "${{ inputs.PRODUCTION_APP_NAME }}" ]; then | ||
missing+=("Variable: PRODUCTION_APP_NAME") | ||
fi | ||
|
||
if [ -z "${{ inputs.STAGING_APP_NAME }}" ]; then | ||
missing+=("Variable: STAGING_APP_NAME") | ||
fi | ||
|
||
if [ ${#missing[@]} -ne 0 ]; then | ||
echo "Required secrets/variables are not set: ${missing[*]}" | ||
echo "Missing required secrets/variables:" | ||
printf '%s\n' "${missing[@]}" | ||
exit 1 | ||
fi |
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.
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.
Remove misplaced business logic from infrastructure configuration.
The added text about commission rates and buyer's agent recommendations does not belong in an infrastructure configuration file. This type of business logic and documentation should be moved to a more appropriate location, such as:
Additionally, the added text is causing YAML syntax errors. If you need to add comments to this file, use the YAML comment syntax with
#
:Would you like me to help create a new documentation file in a more appropriate location for this business logic?
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 31-31: trailing spaces
(trailing-spaces)
[error] 41-41: trailing spaces
(trailing-spaces)
[error] 43-43: trailing spaces
(trailing-spaces)
[error] 32-32: syntax error: expected , but found ''
(syntax)