-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 Jenkins X agent to the configuration #13199
Conversation
/assign @fejta |
@@ -1226,7 +1226,8 @@ func validateAgent(v JobBase, podNamespace string) error { | |||
b := string(prowapi.KnativeBuildAgent) | |||
j := string(prowapi.JenkinsAgent) | |||
p := string(prowapi.TektonAgent) | |||
agents := sets.NewString(k, b, j, p) | |||
x := string(prowapi.JenkinsXAgent) | |||
agents := sets.NewString(k, b, j, p, x) |
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.
I would expect more validation here -- should not have a podspec, etc ...
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.
@stevekuznetsov Jenkins X does not require the PodSpec
because every project has a build definition which is stored in the project repository. As an example, you can have a look at this pipeline definition: https://github.com/jenkins-x/jx/blob/master/jenkins-x.yml
Jenkins X is mainly using the Refs
and ExtraRefs
from ProwJobSpec
. Given this, I don't think that the config requires extra validation at this point.
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.
I think his point is that we should validate that if the agent is JenkinsXAgent that it does not define a podspec?
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.
That's good point! I added some checks to validate that no spec
, build_spec
or pipeline_rus_spec
is defined for jenkins-x
agent.
Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
… in config for jenkins-x agent Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
LGTM label has been added. Git tree hash: eee87d0f9c202e364e5e2773a1f948cd50ba4f42
|
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.
I am not suuuuuper on board with having an agent type without an impl behind it. Can't the JenkinsX system use their own CRD?
TektonAgent = "tekton-pipeline" | ||
TektonAgent ProwJobAgent = "tekton-pipeline" | ||
// JenkinsXAgent means prow will schedule the jobs via JenkinsX pipeline. | ||
JenkinsXAgent ProwJobAgent = "jenkins-x" |
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.
So how does this actually end up working? Some proprietary controller that looks at ProwJobs in the cluster?
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.
That's more or less the size of it, but it won't be proprietary! :) Basically we'll be using a freestanding version (i.e. outside the prow tree, in its own repo) of the pipeline controller that Cosmin built at prow/cmd/pipeline
, which will allow us to encapsulate the customizations we need without interfering with what you folks are doing upstream.
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.
/hold
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ccojocar, fejta, matthyx The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thinking this over another time instead of asking y'all to check in every type of agent you come up with, why don't we do this:
I don't really think that every time JenkinsX or OpenShift or whoever invents a new type of controller to integrate with ProwJobs we should expects devs to jump in and update a list of magic strings, that seems annoying at best. If we just tolerate unrelated agents we can allow development for those to happen entirely out of band, right? |
This is not required anymore. I am going to close it. Thanks @wbrefvem for contributing a more generic solution. |
I am adding the Jenkins X agent to the configuration as agreed in #11888 and in the design document review. This will allow us to use our custom pipeline controller to trigger Jenkins X pipeline execution. This controller is planned to be maintained by Jenkins X team in a stand-alone repository.
cc @fejta @cjwagner @wbrefvem @abayer