-
Notifications
You must be signed in to change notification settings - Fork 159
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
Gitops promotion workflows #1043
base: master
Are you sure you want to change the base?
Conversation
"[CI] Staging environment is at http://staging-docs.codefresh.io.s3-website.us-east-1.amazonaws.com/gitops-promotion-workflows/docs/" |
"[CI] Staging environment is at http://staging-docs.codefresh.io.s3-website.us-east-1.amazonaws.com/gitops-promotion-workflows/docs/" |
A Promotion Workflow is run as part of a Promotion Policy, and can be executed before or after the Promotion Action as a Pre-Action or a Post-Action Workflow. The Promotion Action is the action that implements the changes to the environment, for example, commit. | ||
TBD - maybe add examples | ||
|
||
##### Pre-commit dry run validation |
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.
it's not really a dry run. when clicking on "run", it will actually run the Argo Workflow in the cluster. if the workflow has any side-effects (sending a message to slack/email, running any post-action tests, or pre-action validations) - they will actually run, and may fail or succeed, and cause those effects.
when clicking on "run", only the "promotion workflow" itself will run, so if it was pre or post action workflow - the action and the other parts that together create the entire promotion release, will not run.
At the simplest levels, you can display the details from the parameters in notifications. In more advanced scenarios, you can customize the Workflow execution based on specific parameters. | ||
|
||
{: .table .table-bordered .table-hover} | ||
| Parameters | Description | Passed in<br>Pre- or Post-Action Workflow | |
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.
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.
any pre-action promotion workflow should have exactly these arguments:
spec:
arguments:
parameters:
- name: APP_NAMESPACE
- name: APP_NAME
- name: REPO_URL
- name: BRANCH
- name: PATH
any post-action promotion workflow should have exactly these arguments:
spec:
arguments:
parameters:
- name: APP_NAMESPACE
- name: APP_NAME
- name: REPO_URL
- name: BRANCH
- name: PATH
- name: COMMIT_SHA
value: ""
- name: COMMIT_MESSAGE
value: ""
- name: COMMIT_AUTHOR
value: ""
- name: COMMIT_DATE
value: ""
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.
@idan-codefresh - similarly to how we have an annotation of workflow-origin: promotion
, we should enforce an annotation of promotion-stage: pre-action
or promotion-stage: post-action
and according to the value - validate the arguments list to match exactly the requirement. and also - have the drop-downs suggest only the correct wftmpls when selecting a pre or post action
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.
Agree about two separate columns for Pre and Post but md doesn't allow merging cells so will have an icon indication in both
Implemented feedback comments from Dev
"[CI] Staging environment is at http://staging-docs.codefresh.io.s3-website.us-east-1.amazonaws.com/gitops-promotion-workflows/docs/" |
first draft of promotion workflows