Skip to content
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

Add optional built-in substitution of last attempted revision #971

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arikkfir
Copy link

The purpose of this new feature (which is CLI-conditional, and defaults to false in order to preserve compatibility) is to allow to refer to the revision that is currently being applied in the resource manifests, via the standard substitutions mechanism.

The purpose of this new feature (which is CLI-conditional, and defaults
to false in order to preserve compatibility) is to allow to refer to
the revision that is currently being applied in the resource manifests,
via the standard substitutions mechanism.

By enabling the feature, the controller will always add the
FLUX_ARTIFACT_REVISION key to the substitutions map, with the value of
the artifact revision as provided by the source controller.

If, however, the artifact revision matches the following pattern:

    ([^@]+)@sha1:(.+)

then it will also add the following two keys:

- FLUX_ARTIFACT_REF: the 1st group in the pattern, representing the
  branch or ref part for source-control based revisions (e.g. Git)
- FLUX_ARTIFACT_SHA: the 2nd group in the pattern, representing the SHA
  usually in source-control based revisions (e.g. Git).

Signed-off-by: arikkfir <[email protected]>
@arikkfir arikkfir force-pushed the main-add-implicit-subtitutions branch from b131ab0 to 7f527ab Compare September 19, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant