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

Prow support for triggering jobs based on tag changes #5962

Closed
perotinus opened this issue Dec 14, 2017 · 17 comments
Closed

Prow support for triggering jobs based on tag changes #5962

perotinus opened this issue Dec 14, 2017 · 17 comments
Assignees
Labels
area/prow Issues or PRs related to prow kind/feature Categorizes issue or PR as related to a new feature.

Comments

@perotinus
Copy link
Contributor

It would be useful to the cluster-registry if Prow could support triggering jobs based on GitHub CreateEvent"s.

Concrete use case: I would like to be able to do cluster-registry releases without having to run tools locally on my machine, based on tags created by a GitHub release. If Prow can respond to GitHub CreateEvents, then creating the tag can run the release process/upload binaries/etc. without requiring the person. This allows releases to be done by people who may not have write access to the GCP project that hosts the binaries, simply by creating a

Subnote: it might be useful to know if a tag is verified, and to only start a release based on a verified, signed tag. cf https://help.github.com/articles/signing-tags-using-gpg/

@BenTheElder
Copy link
Member

Also CC @Kargakis @stevekuznetsov @sebastienvas for potentially interested parties.

As discussed on slack probably the most tricky part to supporting tag-triggered-jobs is deciding how we want the config to look.

I'm not sure about the GPG checking details wit github but this also sounds potentially useful

/area prow
/kind feature

@k8s-ci-robot k8s-ci-robot added area/prow Issues or PRs related to prow kind/feature Categorizes issue or PR as related to a new feature. labels Dec 14, 2017
@stevekuznetsov
Copy link
Contributor

If we want to use these jobs for building and pushing releases we should probably get a trusted build cluster up and running otherwise your ProwJob running on a new tag won't have the credentials to do anything meaningful with whatever it builds.

@BenTheElder
Copy link
Member

Yeah, it would be preferable to have #5848 first. We definitely plan to implement that one though.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 15, 2018
@BenTheElder
Copy link
Member

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 15, 2018
@cjwagner
Copy link
Member

Triggering jobs as a result of tags is something that sig-service-catalog is trying to do.
@n3wscott

@BenTheElder
Copy link
Member

this sort of thing would be a lot more straightforward to add if we decoupled job definitions and triggering
cc @stevekuznetsov @krzyzacy

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 23, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 22, 2018
@BenTheElder
Copy link
Member

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Aug 23, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 21, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Dec 21, 2018
@fejta
Copy link
Contributor

fejta commented Dec 21, 2018

Note that you can create a sequence of activity based on merge events, which we do in order to have prow update itself: https://testgrid.k8s.io/sig-testing-prow

  1. postsubmit job to build and push all images on each commit
  2. periodic job to create a new PR that upgrades the committed resources' image tags to the latest release from (1)
  3. postsubmit job to deploy the committed resources to kubernetes each commit (which will apply the specified change during (2)

@BenTheElder
Copy link
Member

this would be nice to have for github releases though to further automate publishing of tagged/named release versions, the main reason we can't implement this is how cludgey the triggering logic is now :(

this should basically just be a post-submit triggered on tags being pushed.

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Dec 21, 2018
@fejta fejta changed the title Prow support for triggering jobs based on GitHub "Create" events Prow support for triggering jobs based on tag changes Dec 21, 2018
@BenTheElder
Copy link
Member

see this thread: #10802 (comment)

@BenTheElder BenTheElder removed their assignment Mar 16, 2019
@cjwagner
Copy link
Member

So we already (inadvertently) support triggering jobs based on tag changes by using a postsubmit job with a branch regexp matching refs/tags/<tag-name>?
That is an interesting find and a pleasant surprise. I think that means we can close this issue.

@zhouhaibing089
Copy link
Contributor

zhouhaibing089 commented Jul 13, 2020

So we already (inadvertently) support triggering jobs based on tag changes by using a postsubmit job with a branch regexp matching refs/tags/?

I think refs/tags/ is trimmed in this change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prow Issues or PRs related to prow kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

8 participants