You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
As a testkube test author,
In order to get feedback on changes to my test content when I commit and push them in git
I need to be able to configure a TestTrigger against a TestSource
Describe the solution you'd like
apiVersion: tests.testkube.io/v1kind: TestTriggermetadata:
name: Kubernetes object namenamespace: Kubernetes object namespacespec:
source: # trigger test based on changes to TestSourcekind: TestSource# Any commits that contain the string [ci skip] will be ignored. This allows you to commit to your repository without triggering a new version.name: my-git-repopaths: # Optional. If specified (as a list of glob patterns), only changes to the specified files will trigger ignore_paths: # Optional. The inverse of paths; changes to the specified files are ignored.tag_filter: # Optional. If specified, the resource will only trigger when new commits that have a tag matching the expression that have been made against the branch. Patterns are [glob(7)](http://man7.org/linux/man-pages/man7/glob.7.html) compatible (as in, bash compatible).tag_regex: # Optional. If specified, the resource will only detect commits that have a tag matching the expression that have been made against the branch. Patterns are [grep](https://www.gnu.org/software/grep/manual/grep.html) compatible (extended matching enabled, matches entire lines only). Ignored if tag_filter is also specified.
Note that the paths, ignore_paths, tag_filter and tag_regexp are inspired from similar triggers in https://github.com/concourse/git-resource built upon long year of CI/CD experience, including triggering tests from git changes
Note the tag_filter and tag_regexp would require an additional field on the TestSource resource:
fetch_tags: Optional. If true the flag --tags will be used to fetch all tags in the repository. If false no tags will be fetched.
Meta data about the conditions that Triggered the test is mounted in /triggers
.git/committer: For committer notification on failed builds. This special file .git/committer which is populated with the email address of the author of the last commit. This can be used together with an email resource like [mdomke/concourse-email-resource](https://github.com/mdomke/concourse-email-resource) to notify the committer in an on_failure step.
.git/ref: Version reference detected and checked out. It will usually contain the commit SHA-1 ref, but also the detected tag name when using tag_filter or tag_regex.
.git/short_ref: Short (first seven characters) of the .git/ref. Can be templated with short_ref_format parameter.
.git/commit_message: For publishing the Git commit message on successful builds.
.git/commit_timestamp: For tagging builds with a timestamp.
.git/describe_ref: Version reference detected and checked out. Can be templated with describe_ref_options parameter. By default, it will contain the <latest annoted git tag>-<the number of commit since the tag>-g<short_ref> (eg. v1.6.2-1-g13dfd7b). If the repo was never tagged before, this falls back to a short commit SHA-1 ref.
Describe alternatives you've considered
Writing a new TestKube flux controller as suggested in #3026 to trigger TestKube tests based on Flux Source controller notifications. This would also solve the issue to trigger upon Flux kustomization changes #3712
Is your feature request related to a problem? Please describe.
As a testkube test author,
In order to get feedback on changes to my test content when I commit and push them in git
I need to be able to configure a TestTrigger against a TestSource
Describe the solution you'd like
Note that the paths, ignore_paths, tag_filter and tag_regexp are inspired from similar triggers in https://github.com/concourse/git-resource built upon long year of CI/CD experience, including triggering tests from git changes
Note the tag_filter and tag_regexp would require an additional field on the TestSource resource:
Meta data about the conditions that Triggered the test is mounted in /triggers
Specifically the TestSource last change is available in
/trigger/source
similar to https://github.com/concourse/git-resource#additional-files-populatedDescribe alternatives you've considered
Writing a new TestKube flux controller as suggested in #3026 to trigger TestKube tests based on Flux Source controller notifications. This would also solve the issue to trigger upon Flux kustomization changes #3712
This would leverage Flux GitRepository https://github.com/fluxcd/source-controller/blob/main/docs/spec/v1/gitrepositories.md might speed up implementation of this feature
Flux GitRepository properly supports the path/excludePath feature above, plus inclusion of nested git repos, optimized git clones, submodules, etc...
Support for tag rexgexp is being discussed in fluxcd/source-controller#341
The text was updated successfully, but these errors were encountered: