Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
NimRegev merged 34 commits intomasterfromgitops-auto-promotion-req
May 14, 2025
Merged

Gitops promotion hooks#1277

NimRegev merged 34 commits intomasterfromgitops-auto-promotion-req
May 14, 2025

Conversation

@NimRegev
Copy link
Contributor

First dart of promotion hooks

@codefresh-git-integration

@codefresh-git-integration

@codefresh-git-integration

@codefresh-git-integration

@codefresh-git-integration

@codefresh-git-integration

export JIRA_ISSUE_BASE_URL="{{inputs.parameters.JIRA_BASE_URL}}"
export JIRA_ISSUE_SOURCE_FIELD="{{inputs.parameters.JIRA_ISSUE_SOURCE_FIELD}}"
PROMOTION_CONTEXT=$(echo "{\"JIRA_ISSUE_URL\": \"${JIRA_ISSUE_BASE_URL}/browse/${JIRA_ISSUE_SOURCE_FIELD}\"}")
echo "$PROMOTION_CONTEXT" > /tmp/promotion-context.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

again here the important part is the output param, need to add it to the example yaml as well

Expose the file with the promotion context as an output parameter to make it available to promotion mechanism.
* Add `PROMOTION_CONTEXT` as the `name` to `outputs.parameters`. _The name must not be changed_.
* Add the `globalName` attribute to make it available globally. The value must be identical to the name of the promotion context.
* `valueFrom` attribute to reference the file path

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

potentially they can take it wherever they want from

Edits after feedback from Dev
@codefresh-git-integration

Added draft diagram for promotion context behavior and content updates
@codefresh-git-integration

@codefresh-git-integration

@codefresh-git-integration

@codefresh-git-integration

@codefresh-git-integration

Added walkthrough example for promotion context
@codefresh-git-integration

@codefresh-git-integration

@codefresh-git-integration

@codefresh-git-integration

Copy link
Contributor

@scme0scme0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Just one minor comment from me. Looks good!

Added example template to define promotion context and use in  promotion hook
@codefresh-git-integration

@codefresh-git-integration

1 similar comment
@codefresh-git-integration

* **Use a custom service account**
Use your own service account, and bind it to the default service role, `cf-default-promotion-workflows-role`.

## Example of service account and service role
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Example of a Service Account and a Role

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Same as above; fixed the role but leaving in lowercase

Explore examples in [Codefresh Hub for Argo](https://codefresh.io/argohub/){:target="\_blank"}.

##### Arguments in promotion hooks
A default set of arguments are available to all Promotion Workflows with hooksd. See [Default arguments in Promotion Workflows with hooks](#default-arguments-for-promotion-hooks).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

hooksd --> hooks

Explore examples in [Codefresh Hub for Argo](https://codefresh.io/argohub/){:target="\_blank"}.

##### Arguments in promotion hooks
A default set of arguments are available to all Promotion Workflows with hooksd. See [Default arguments in Promotion Workflows with hooks](#default-arguments-for-promotion-hooks).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This link:
[Default arguments in Promotion Workflows with hooks](#default-arguments-for-promotion-hooks).
doesn't work for me


The table lists key differences between Promotion Workflows containing hooks and Promotion (Pre- and Post-Action) Workflows.

| **Feature** | **Promotion Hooks in Workflows** | **Pre- and Post-Action Workflows** |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think that if we're making reference to "Pre- and Post-Action Workflows", then the second column should be "Promotion Hooks Workflows" (without thein)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yes, I had that in the beginning but changed it later. I think I'll add a heading Promotion Workflows and then two column headings below Promotion Hooks and Pre-and Post-Action

Implemented feedback from Francisco's review
@codefresh-git-integration

@codefresh-git-integration

@codefresh-git-integration

@codefresh-git-integration

@NimRegevNimRegev merged commite643444 intomasterMay 14, 2025
1 check passed
@NimRegevNimRegev deleted the gitops-auto-promotion-req branchMay 14, 2025 08:52
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@francisco-cocozzafrancisco-cocozzafrancisco-cocozza left review comments

@kim-codefreshkim-codefreshkim-codefresh left review comments

@scme0scme0scme0 approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@NimRegev@francisco-cocozza@kim-codefresh@scme0

[8]ページ先頭

©2009-2025 Movatter.jp