-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add default envs in ScriptRunStage: SR_TRIGGERED_COMMANDER, SR_IS_ROL…
…LBACK (#5464) * Add TriggeredCommandar Signed-off-by: t-kikuc <[email protected]> * add isRollback Signed-off-by: t-kikuc <[email protected]> * update docs Signed-off-by: t-kikuc <[email protected]> * fix name->id Signed-off-by: t-kikuc <[email protected]> * fix env name Signed-off-by: t-kikuc <[email protected]> * fix: specify isRollback since deployment.Status is always Planned Signed-off-by: t-kikuc <[email protected]> * fix typo Signed-off-by: t-kikuc <[email protected]> * Add case of `pipectl sync` Signed-off-by: t-kikuc <[email protected]> --------- Signed-off-by: t-kikuc <[email protected]>
- Loading branch information
Showing
4 changed files
with
16 additions
and
4 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 |
---|---|---|
|
@@ -108,10 +108,12 @@ You can use the envrionment values related to the deployment. | |
|SR_APPLICATION_NAME| The application name | example | | ||
|SR_TRIGGERED_AT| The timestamp when the deployment is triggered | 1719571113 | | ||
|SR_TRIGGERED_COMMIT_HASH| The commit hash that triggered the deployment | 2bf969a3dad043aaf8ae6419943255e49377da0d | | ||
|SR_TRIGGERED_COMMANDER| The ID of user who triggered the deployment via UI. This is APIKey's ID if it was triggered via `pipectl sync`. This is empty if it was triggered by your piped. | userid | | ||
|SR_REPOSITORY_URL| The repository url configured in the piped config | [email protected]:org/repo.git, https://github.com/org/repo | | ||
|SR_SUMMARY| The summary of the deployment | Sync with the specified pipeline because piped received a command from user via web console or pipectl| | ||
|SR_CONTEXT_RAW| The json encoded string of above values | {"deploymentID":"877625fc-196a-40f9-b6a9-99decd5494a0","applicationID":"8d7609e0-9ff6-4dc7-a5ac-39660768606a","applicationName":"example","triggeredAt":1719571113,"triggeredCommitHash":"2bf969a3dad043aaf8ae6419943255e49377da0d","repositoryURL":"[email protected]:org/repo.git","labels":{"env":"example","team":"product"}} | | ||
|SR_LABELS_XXX| The label attached to the deployment. The env name depends on the label name. For example, if a deployment has the labels `env:prd` and `team:server`, `SR_LABELS_ENV` and `SR_LABELS_TEAM` are registered. | prd, server | | ||
|SR_IS_ROLLBACK| This is `true` if the deployment is rollbacking. Otherwise, this is `false`. | false | | ||
### Use `SR_CONTEXT_RAW` with jq | ||
|
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