Skip to content

Commit 57755b6

Browse files
authored
Gitops auto promotion req (#1316)
* Update promotion-flow.md * Update promotion-flow.md * Add promotion hooks * Rename and update promotion hooks * Update promotion-hooks.md * Add promotion hooks to nav yamls * Add sym link for promotion hooks to _gitops collection * Update promotion-hooks.md * Update promotion-hooks.md Edits after feedback from Dev * Update content Added draft diagram for promotion context behavior and content updates * Update promotion-hooks.md * Remove entities from mapping file * Update * Update diagram * Update promotion-hooks.md * Add new articles fro service accounts and promotion contexts * Updates * Update content for promotion contexts Added walkthrough example for promotion context * Update promotion-context-promotion-workflows.md * Update hook-slack-notification-example.png * Update promotion-context-promotion-workflows.md * Add promotion context example Added example template to define promotion context and use in promotion hook * Update overview title * Update promotion-context-promotion-workflows.md * Add feedback from review Implemented feedback from Francisco's review * Update product-releases.md * Add note on early access Added note on early access availability for publish * Fix links Fixed links after self-review
1 parent e643444 commit 57755b6

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

_data/argohub-home-content.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
- title: Promotion building blocks
8888
localurl: /gitops/promotions/promotion-components/
8989
- title: Promotion setup guidelines
90-
localurl: /gitops/promotions/create-promotion-sequence/
90+
localurl: /gitops/promotions/create-promotion-sequence/
9191
- title: YAML specs
9292
localurl: /gitops/promotions/yaml/
9393
- title: Triggering promotions

_data/argohub-nav.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@
260260
url: "/promotion-policy"
261261
- title: Promotion Workflows
262262
url: "/promotion-workflow"
263-
- title: Service accounts for Promotion Workflows
264-
url: "/service-accounts-promotion-workflows"
265263
- title: Promotion hooks
266-
url: "/promotion-hooks"
264+
url: "/promotion-hooks"
265+
- title: Service accounts for Promotion Workflows
266+
url: "/service-accounts-promotion-workflows"
267267
- title: Promotion contexts in promotion hooks
268268
url: "/promotion-context-promotion-workflows"
269269
- title: Product promotion settings

_docs/promotions/promotion-context-promotion-workflows.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ A **promotion context** is a user-defined JSON object that allows you to pass cu
2323
Defining a promotion context with the custom parameters and then **exporting the context** makes these custom values available to all subsequent hooks in the same Promotion Flow. Each hook can access and use the values from the promotion context as needed.
2424
Using promotion contexts enables scenarios like notifying specific Slack channels or linking Jira tickets to releases. See [How promotion context works during execution](#how-promotion-context-works-during-execution).
2525

26-
To see a practical example, follow the [Walkthrough: Using promotion hooks in Promotion Flows to handle promotion failures](#walkthough-using-promotion-hooks-in-promotion-flows-to-handle-promotion-failures), where you create different Promotion Workflows with hooks, define a promotion context in a workflow, and assign hooks at different stages of the Promotion Flow.
26+
To see a practical example, follow the [Walkthrough: Using promotion hooks in Promotion Flows to handle promotion failures](#walkthrough-using-promotion-hooks-in-promotion-flows-to-handle-promotion-failures), where you create different Promotion Workflows with hooks, define a promotion context in a workflow, and assign hooks at different stages of the Promotion Flow.
27+
2728

2829

2930
## Creating and exporting a promotion context

_docs/promotions/promotion-hooks.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ See [Assigning promotion hooks in Promotion Flows](#assigning-promotion-hooks-in
5757
Explore examples in [Codefresh Hub for Argo](https://codefresh.io/argohub/){:target="\_blank"}.
5858

5959
##### Arguments in promotion hooks
60-
A default set of arguments are available to all Promotion Workflows with hooks. See [Default arguments in Promotion Workflows with hooks](#default-arguments-for-promotion-hooks).
60+
A default set of arguments are available to all Promotion Workflows with hooks. See [Default arguments in Promotion Workflows with hooks](#default-arguments-in-promotion-workflows-with-hooks).
61+
6162

6263
## Promotion hooks vs. Pre- and Post-Action Promotion Workflows
6364

@@ -97,7 +98,9 @@ The table below describes the default arguments that are replaced with values th
9798
|`FAILED_ENVIRONMENTS` | The environment or environments which failed in the release with this information: {::nomarkdown}<ul><li><b>Name</b>: The name of the environment that failed to complete the release. For example, production</li><li><b>Status</b>: The release or promotion status for the environment. Can be one of the following: <ul><li>Successful</li><li>Running</li><li>Suspended</li><li>Failed</li><li>Terminated</li></ul></li><li><b>Error-message</b>: The system-generated error message identifying the reason for the failed promotion. For example, <code class="highlighter-rouge">Product release was automatically terminated because the workflow state remained unknown</code>. {:/}| OnFailed hooks only |
9899

99100
## Promotion contexts in Promotion Workflows with hooks
100-
In a Promotion Flow, hooks may need custom parameters beyond the default ones available to the promotion mechanism. Because promotion hooks run within GitOps Runtimes in your own clusters, they do not automatically have access to these custom internal parameters. To pass custom values like Jira ticket IDs, approver names, or Slack channel information between hooks in the same Promotion Flow, you must define and export a promotion context. For details, see [Creating and exporting a promotion context](#creating-and-exporting-a-promotion-context).
101+
102+
In a Promotion Flow, hooks may need custom parameters beyond the default ones available to the promotion mechanism. Because promotion hooks run within GitOps Runtimes in your own clusters, they do not automatically have access to these custom internal parameters. To pass custom values like Jira ticket IDs, approver names, or Slack channel information between hooks in the same Promotion Flow, you must define and export a promotion context. For details, see [Promotion contexts in promotion hooks]({{site.baseurl}}/docs/promotions/promotion-context-promotion-workflows/).
103+
101104

102105

103106
## Service accounts for promotion hooks
@@ -293,6 +296,8 @@ You cannot assign a Promotion Hook Workflow to the Trigger Environment itself.
293296

294297
## Related articles
295298
[Configure Promotion Flows]({{site.baseurl}}/docs/promotions/promotion-flow/)
299+
[Promotion contexts in promotion hooks]({{site.baseurl}}/docs/promotions/promotion-context-promotion-workflows/)
300+
[Service accounts for Promotion Workflows]({{site.baseurl}}/docs/promotions/service-accounts-promotion-workflows/)
296301
[Configure Promotion Workflows]({{site.baseurl}}/docs/promotions/promotion-workflow/)
297302
[Promotion Flow YAML]({{site.baseurl}}/docs/promotions/yaml/promotion-flow-crd/)
298303
[Tracking product releases]({{site.baseurl}}/docs/promotions/product-releases/)

0 commit comments

Comments
 (0)