Skip to content

Commit e643444

Browse files
authored
Gitops promotion hooks (#1277)
* 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
1 parent d2efdd2 commit e643444

24 files changed

+1007
-116
lines changed

_data/argohub-nav.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,17 @@
255255
- title: Promotion setup guidelines
256256
url: "/create-promotion-sequence"
257257
- title: Promotion Flows
258-
url: "/promotion-flow"
258+
url: "/promotion-flow"
259259
- title: Promotion Policies
260260
url: "/promotion-policy"
261261
- title: Promotion Workflows
262-
url: "/promotion-workflow"
262+
url: "/promotion-workflow"
263+
- title: Service accounts for Promotion Workflows
264+
url: "/service-accounts-promotion-workflows"
265+
- title: Promotion hooks
266+
url: "/promotion-hooks"
267+
- title: Promotion contexts in promotion hooks
268+
url: "/promotion-context-promotion-workflows"
263269
- title: Product promotion settings
264270
url: "/product-promotion-props"
265271
- title: Promotion entity YAMLs

_data/nav.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,17 @@
434434
- title: Promotion setup guidelines
435435
url: "/create-promotion-sequence"
436436
- title: Promotion Flows
437-
url: "/promotion-flow"
437+
url: "/promotion-flow"
438438
- title: Promotion Policies
439439
url: "/promotion-policy"
440440
- title: Promotion Workflows
441441
url: "/promotion-workflow"
442+
- title: Service accounts for Promotion Workflows
443+
url: "/service-accounts-promotion-workflows"
444+
- title: Promotion hooks
445+
url: "/promotion-hooks"
446+
- title: Promotion contexts in promotion hooks
447+
url: "/promotion-context-promotion-workflows"
442448
- title: Product promotion settings
443449
url: "/product-promotion-props"
444450
- title: Promotion entity YAMLs

_docs/promotions/create-promotion-sequence.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Promotions are a critical part of continuous delivery, enabling you to move chan
1414

1515
## Prerequisites
1616
1. [Configuration Runtime]({{site.baseurl}}/docs/installation/gitops/configuration-runtime/)
17-
The Configuration Runtime is a GitOps Runtime that stores promotion-related entities.
17+
The Configuration Runtime is a GitOps Runtime that stores configuration for GitOps promotion entities.
1818
* Designate at least one GitOps Runtime as the Configuration Runtime.
1919
* If no GitOps Runtime has been designated as such, Codefresh assigns one of the existing Runtimes.
2020

@@ -24,10 +24,12 @@ Promotions are a critical part of continuous delivery, enabling you to move chan
2424
1. [User permissions]({{site.baseurl}}/docs/administration/account-user-management/gitops-abac/)
2525
Users need permissions to create Promotion Workflows, configure promotion settings for products, and trigger promotions.
2626

27+
28+
## Setup tasks
2729
1. [Create environments]({{site.baseurl}}/docs/environments/create-manage-environments/#create-environments)
2830
Environments define the starting point and destination of promotions.
2931
A promotion requires at least two environments:
30-
* Trigger environment, the source of the changes being promoted
32+
* Trigger Environment, the source of the changes being promoted
3133
* Target environment, to which to promote the changes
3234

3335
1. [Create applications]({{site.baseurl}}/docs/deployments/gitops/create-application/#create-an-argo-cd-application)
@@ -43,26 +45,39 @@ Promotions are a critical part of continuous delivery, enabling you to move chan
4345

4446
1. [Create Promotion Workflows]({{site.baseurl}}/docs/promotions/promotion-workflow/)
4547
Promotion Workflows (Argo Workflows) automate environment-specific tests and validations before and after promotion.
46-
* Create and use Promotion Workflows to run smoke tests, database validation, and other requirements to verify readiness.
48+
* Create Promotion Workflows to run smoke tests, database validation, and any other requirements to verify readiness of each application in an environment.
49+
50+
1. [Create Promotion Workflows with hooks]({{site.baseurl}}/docs/promotions/promotion-hooks/)
51+
Promotion hooks provide promotion status and custom information for releases and environments during the Promotion Flow.
52+
* Create hooks in Promotion Workflows to implement actions such as Slack notifications
53+
* Define and export promotion contexts in hooks to expose and pass custom parameters such as Jira ID
54+
4755

4856
1. [Define Promotion Policies]({{site.baseurl}}/docs/promotions/promotion-policy/)
4957
Promotion Policies govern promotion behavior for environments enforcing rules, checks, and validations.
5058
* Define policies that combine Promotion Workflows with promotion actions such as commits, pull requests
5159
* The policy mechanism merges relevant settings from global policies according to priority, enforcing automated governance
5260

61+
5362
1. [Create Promotion Flows]({{site.baseurl}}/docs/promotions/promotion-flow/)
5463
Promotion Flows orchestrate the sequence of actions required to move and deploy changes through multiple environments.
5564
* Automatically integrate environments, products, Promotion Workflows, and Promotion Policies into a structured promotion process
65+
* Assign promotion hooks to track release and environment statuses for product releases
5666
* Reuse Promotion Flows across products for consistent and reliable promotions
67+
68+
5769

5870
1. [Customize promotions for products]({{site.baseurl}}/docs/promotions/product-promotion-props/)
5971
After setting up promotion entities, configure additional promotion settings at the product level.
6072
* Promotion Templates to define attributes to be promoted across the product's applications
6173
* Promotion Flows valid for the product and trigger conditions for each flow
6274

75+
## Trigger and monitor promotions
76+
6377
1. [Trigger promotions]({{site.baseurl}}/docs/promotions/trigger-promotions/)
6478
Trigger the promotion manually or automatically.
65-
79+
80+
6681
1. [Monitor promotion releases for products]({{site.baseurl}}/docs/promotions/product-releases/)
6782
Monitor deployment progress as applications move through the promotion sequence.
6883
* Use the Releases feature for products to monitor deployments

_docs/promotions/product-releases.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ toc: true
77

88

99

10-
10+
## Releases for promotions in GitOps
1111
Releases in Codefresh GitOps offer a consolidated view of the deployment lifecycle for a product as it progresses through environments during a promotion. They enable you to track, visualize, and analyze changes from the initial trigger to the final deployment, providing comprehensive insights for all stakeholders.
1212

1313
A release is automatically created whenever a promotion is triggered for a product, either manually or through an automated flow. This ensures every change is documented and linked to its promotion lifecycle, giving teams complete visibility into their deployment processes.
1414

15-
## Releases in GitOps
1615
In the context of GitOps, a release captures the progression of a product as it is promoted through environments. The release reflects the collective state of all environments and workflows involved in deploying a change, from the initial trigger to the final target environment, whether production or another specified target.
1716

1817

@@ -28,7 +27,7 @@ max-width="60%"
2827
%}
2928

3029
### Why Releases matter
31-
Whether you are a product manager or an application developer, Releases offer:
30+
Whether you are a product manager or an application developer, releases offer:
3231
* Lifecycle visualization: Clearly track the deployment lifecycle of a product
3332
* Integrated change list: Access a unified list of changes leading to a deployment
3433
* Deployment status: Monitor ongoing deployments and quickly identify issues
@@ -64,7 +63,7 @@ There are two key aspects of tracking deployments for a product through releases
6463

6564
##### Release promotion flow
6665
Track the release visually to monitor its progression through each phase of the promotion lifecycle across environments.
67-
Specific Release views centralizes all information, allowing you to:
66+
Release views centralizes all information, allowing you to:
6867
* Identify and resolve deployment issues without switching between tools
6968
* Access everything you need to troubleshoot errors in one place.
7069

@@ -82,7 +81,7 @@ Release notes compile changes from various sources into a single view, enabling
8281
See [Analyze change history in Release Notes](#analyze-change-history-in-release-notes).
8382

8483

85-
## View Releases for products
84+
## View releases for products
8685

8786
The Releases tab for a product displays the releases for that product, whether successful or failed.
8887

@@ -145,7 +144,7 @@ max-width="60%"
145144
The header in the Releases page summarizes the change that triggered the promotion, the overall status of the release, and the count of failed, successful, running, and pending environments.
146145

147146
>**NOTE:**
148-
The commit details are always for the trigger environment that initiated the promotion.
147+
The commit details are always for the Trigger Environment that initiated the promotion.
149148

150149
{% include
151150
image.html
@@ -186,8 +185,8 @@ max-width="60%"
186185

187186
## Environments in product releases
188187

189-
The graphical view of the different environments defined in the Promotion Flo allows you to:
190-
* Understand the interconnections between the environments, whether sequential or parallel.
188+
The graphical view of the different environments defined in the Promotion Flow allows you to:
189+
* Understand the interconnections between the environments, whether sequential or parallel
191190
* Visualize the dependencies between environments to see how changes propagate through the deployment process
192191

193192
Each environment is color-coded to indicate the overall status of the promotion for that environment.
@@ -253,8 +252,9 @@ If there is an update that triggers a Pre- or Post-Action Workflow within an env
253252
For example, if an update in the `staging` environment triggers the `echo-pre-action` Pre-Action Workflow, and a later update in the same environment also triggers the same `echo-pre-action` Pre-Action Workflow, the earlier instance is terminated, and the later instance continues to run.
254253

255254

255+
## Promotion Hooks in product release
256+
The **Show/Hide Hooks** toggle button in the Release view displays/hides the [promotion hooks]({{site.baseurl}}/docs/promotions/promotion-hooks/) assigned to the Promotion Flow.
256257

257-
<!--- NIMA: how will it be shown in the releases tab? -->
258258

259259
## Promotion Workflows in product releases
260260

_docs/promotions/promotion-components.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,18 @@ These entities provide additional control and automation, enabling advanced mult
9898
<td>Users with ABAC permissions</td>
9999
<td><a href="https://codefresh.io/docs/docs/products/configure-product-settings/">Promotion settings for products</a></td>
100100
</tr>
101-
<tr>
101+
<tr>
102102
<td><strong>Promotion Workflow</strong></td>
103-
<td>An Argo Workflow which runs tests and validations during promotion for each environment. Promotion Workflows can include smoke tests, rollback mechanisms, database validation checks, performance checks, and more.</td>
103+
<td>An Argo Workflow which runs tests and validations during promotion for each application within an environment. Promotion Workflows can include smoke tests, rollback mechanisms, database validation checks, performance checks, and more.</td>
104104
<td>Users with ABAC permissions</td>
105105
<td><a href="https://codefresh.io/docs/docs/promotions/promotion-workflow/">Promotion Workflows</a></td>
106106
</tr>
107+
<tr>
108+
<td><strong>Promotion hooks</strong></td>
109+
<td>Promotion hooks are configured in Promotion Workflows to run at the start or end of a product release, or at the start or end of promotions in environments. Promotion hooks can include notifications and actions such as sending Slack messages or custom issue-tracking information based on the status of the promotion for release or environment.</td>
110+
<td>Users with ABAC permissions</td>
111+
<td><a href="https://codefresh.io/docs/docs/promotions/promotion-hooks/">Promotion Workflows</a></td>
112+
</tr>
107113
<tr>
108114
<td><strong>Promotion Policy</strong></td>
109115
<td>Defines promotion behavior for environments by combining Promotion Workflows (tests and validations), with the promotion action such as commits or pull requests.</td>

0 commit comments

Comments
 (0)