Skip to content

Gitops promotion hooks #1277

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

Merged
merged 34 commits into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d483d6e
Update promotion-flow.md
NimRegev Apr 1, 2025
f3db2c4
Update promotion-flow.md
NimRegev Apr 1, 2025
fd9dd47
Add promotion hooks
NimRegev Apr 7, 2025
d7db3b2
Rename and update promotion hooks
NimRegev Apr 7, 2025
f0fb708
Update promotion-hooks.md
NimRegev Apr 9, 2025
0ba8c78
Merge branch 'master' into gitops-auto-promotion-req
NimRegev Apr 9, 2025
6591741
Add promotion hooks to nav yamls
NimRegev Apr 9, 2025
056c5d4
Merge branch 'gitops-auto-promotion-req' of https://github.com/codefr…
NimRegev Apr 9, 2025
4163643
Add sym link for promotion hooks to _gitops collection
NimRegev Apr 9, 2025
897a1d4
Merge branch 'master' into gitops-auto-promotion-req
NimRegev Apr 21, 2025
02e2b0d
Update promotion-hooks.md
NimRegev Apr 23, 2025
c4c7649
Update promotion-hooks.md
NimRegev Apr 23, 2025
7414572
Update content
NimRegev Apr 24, 2025
f610996
Update promotion-hooks.md
NimRegev Apr 24, 2025
3efab63
Remove entities from mapping file
NimRegev Apr 24, 2025
da78597
Merge branch 'master' into gitops-auto-promotion-req
NimRegev Apr 24, 2025
01fac1b
Update
NimRegev Apr 24, 2025
c60f9f3
Merge branch 'gitops-auto-promotion-req' of https://github.com/codefr…
NimRegev Apr 24, 2025
6f7950c
Update diagram
NimRegev Apr 24, 2025
0a485f7
Update promotion-hooks.md
NimRegev Apr 24, 2025
3360c86
Add new articles fro service accounts and promotion contexts
NimRegev Apr 27, 2025
5ceac24
Updates
NimRegev Apr 27, 2025
436a21f
Update content for promotion contexts
NimRegev Apr 28, 2025
f72414d
Update promotion-context-promotion-workflows.md
NimRegev Apr 28, 2025
78fc6b9
Update hook-slack-notification-example.png
NimRegev Apr 28, 2025
d6660b0
Update promotion-context-promotion-workflows.md
NimRegev Apr 28, 2025
27b4fb9
Add promotion context example
NimRegev May 7, 2025
d2253a1
Update overview title
NimRegev May 7, 2025
7528ce9
Update promotion-context-promotion-workflows.md
NimRegev May 7, 2025
ad229ed
Add feedback from review
NimRegev May 11, 2025
56246f9
Update product-releases.md
NimRegev May 13, 2025
b54a271
Merge branch 'master' into gitops-auto-promotion-req
NimRegev May 14, 2025
08f6baa
Add note on early access
NimRegev May 14, 2025
64dfc35
Merge branch 'gitops-auto-promotion-req' of https://github.com/codefr…
NimRegev May 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions _data/argohub-nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,17 @@
- title: Promotion setup guidelines
url: "/create-promotion-sequence"
- title: Promotion Flows
url: "/promotion-flow"
url: "/promotion-flow"
- title: Promotion Policies
url: "/promotion-policy"
- title: Promotion Workflows
url: "/promotion-workflow"
url: "/promotion-workflow"
- title: Service accounts for Promotion Workflows
url: "/service-accounts-promotion-workflows"
- title: Promotion hooks
url: "/promotion-hooks"
- title: Promotion contexts in promotion hooks
url: "/promotion-context-promotion-workflows"
- title: Product promotion settings
url: "/product-promotion-props"
- title: Promotion entity YAMLs
Expand Down
8 changes: 7 additions & 1 deletion _data/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,17 @@
- title: Promotion setup guidelines
url: "/create-promotion-sequence"
- title: Promotion Flows
url: "/promotion-flow"
url: "/promotion-flow"
- title: Promotion Policies
url: "/promotion-policy"
- title: Promotion Workflows
url: "/promotion-workflow"
- title: Service accounts for Promotion Workflows
url: "/service-accounts-promotion-workflows"
- title: Promotion hooks
url: "/promotion-hooks"
- title: Promotion contexts in promotion hooks
url: "/promotion-context-promotion-workflows"
- title: Product promotion settings
url: "/product-promotion-props"
- title: Promotion entity YAMLs
Expand Down
23 changes: 19 additions & 4 deletions _docs/promotions/create-promotion-sequence.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Promotions are a critical part of continuous delivery, enabling you to move chan

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

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


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

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

1. [Create Promotion Workflows]({{site.baseurl}}/docs/promotions/promotion-workflow/)
Promotion Workflows (Argo Workflows) automate environment-specific tests and validations before and after promotion.
* Create and use Promotion Workflows to run smoke tests, database validation, and other requirements to verify readiness.
* Create Promotion Workflows to run smoke tests, database validation, and any other requirements to verify readiness of each application in an environment.

1. [Create Promotion Workflows with hooks]({{site.baseurl}}/docs/promotions/promotion-hooks/)
Promotion hooks provide promotion status and custom information for releases and environments during the Promotion Flow.
* Create hooks in Promotion Workflows to implement actions such as Slack notifications
* Define and export promotion contexts in hooks to expose and pass custom parameters such as Jira ID


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


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



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

## Trigger and monitor promotions

1. [Trigger promotions]({{site.baseurl}}/docs/promotions/trigger-promotions/)
Trigger the promotion manually or automatically.



1. [Monitor promotion releases for products]({{site.baseurl}}/docs/promotions/product-releases/)
Monitor deployment progress as applications move through the promotion sequence.
* Use the Releases feature for products to monitor deployments
Expand Down
18 changes: 9 additions & 9 deletions _docs/promotions/product-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ toc: true




## Releases for promotions in GitOps
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.

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.

## Releases in GitOps
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.


Expand All @@ -28,7 +27,7 @@ max-width="60%"
%}

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

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

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


## View Releases for products
## View releases for products

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

Expand Down Expand Up @@ -145,7 +144,7 @@ max-width="60%"
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.

>**NOTE:**
The commit details are always for the trigger environment that initiated the promotion.
The commit details are always for the Trigger Environment that initiated the promotion.

{% include
image.html
Expand Down Expand Up @@ -186,8 +185,8 @@ max-width="60%"

## Environments in product releases

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

Each environment is color-coded to indicate the overall status of the promotion for that environment.
Expand Down Expand Up @@ -253,8 +252,9 @@ If there is an update that triggers a Pre- or Post-Action Workflow within an env
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.


## Promotion Hooks in product release
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.

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

## Promotion Workflows in product releases

Expand Down
10 changes: 8 additions & 2 deletions _docs/promotions/promotion-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,18 @@ These entities provide additional control and automation, enabling advanced mult
<td>Users with ABAC permissions</td>
<td><a href="https://codefresh.io/docs/docs/products/configure-product-settings/">Promotion settings for products</a></td>
</tr>
<tr>
<tr>
<td><strong>Promotion Workflow</strong></td>
<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>
<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>
<td>Users with ABAC permissions</td>
<td><a href="https://codefresh.io/docs/docs/promotions/promotion-workflow/">Promotion Workflows</a></td>
</tr>
<tr>
<td><strong>Promotion hooks</strong></td>
<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>
<td>Users with ABAC permissions</td>
<td><a href="https://codefresh.io/docs/docs/promotions/promotion-hooks/">Promotion Workflows</a></td>
</tr>
<tr>
<td><strong>Promotion Policy</strong></td>
<td>Defines promotion behavior for environments by combining Promotion Workflows (tests and validations), with the promotion action such as commits or pull requests.</td>
Expand Down
Loading