-
Notifications
You must be signed in to change notification settings - Fork 64
chore(pipeline) switch to podTemplate instead of label to use the new node pool #1969
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
Changes from all commits
ec5b8aa
c4c29c0
b9f7528
9e1e5c8
cef5406
898c8f2
4b8f27d
c77981b
5ad98f2
baba2ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,50 @@ | ||||
| --- | ||||
| apiVersion: "v1" | ||||
| kind: "Pod" | ||||
| spec: | ||||
| containers: | ||||
| - name: jnlp | ||||
| image: jenkinsciinfra/jenkins-agent-ubuntu-22.04@sha256:0f007bec7835b0b7e383d12eac4f860af9fa9b35d53159f67348770f97d55ce6 | ||||
| command: | ||||
| - "/usr/local/bin/jenkins-agent" | ||||
| env: | ||||
| - name: "PATH" | ||||
| value: "/opt/jdk-11/bin:/home/jenkins/.asdf/shims:/home/jenkins/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" | ||||
| - name: "ARTIFACT_CACHING_PROXY_PROVIDER" | ||||
| value: "aws" | ||||
| - name: "JENKINS_AGENT_WORKDIR" | ||||
| value: "/home/jenkins/agent" | ||||
| - name: "JENKINS_JAVA_OPTS" | ||||
| value: "-XX:+PrintCommandLineFlags" | ||||
| - name: "JENKINS_JAVA_BIN" | ||||
| value: "/opt/jdk-11/bin/java" | ||||
| resources: | ||||
| limits: | ||||
| memory: "8Gi" | ||||
| cpu: "4" | ||||
dduportal marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
| requests: | ||||
| memory: "8Gi" | ||||
| cpu: "4" | ||||
dduportal marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
| securityContext: | ||||
| privileged: false | ||||
| volumeMounts: | ||||
| - mountPath: "/home/jenkins/.m2/repository" | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should not be used, given Line 20 in 57116da
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a "copy-and-paste" of the pod yaml from the existing config defined by the admins of ci.jenkins.io. I would want to stick to this realit y as close as possible. |
||||
| name: "volume-1" | ||||
| readOnly: false | ||||
| - mountPath: "/tmp" | ||||
| name: "volume-0" | ||||
| readOnly: false | ||||
| volumes: | ||||
| - emptyDir: | ||||
| medium: "Memory" | ||||
| name: "volume-0" | ||||
| - emptyDir: | ||||
| medium: "" | ||||
| name: "volume-1" | ||||
| nodeSelector: | ||||
| ci.jenkins.io/agents-density: 23 | ||||
| tolerations: | ||||
| - key: "ci.jenkins.io/bom" | ||||
| operator: "Equal" | ||||
| value: "true" | ||||
| effect: "NoSchedule" | ||||
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.
Does this get overridden?
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.
What do you mean?
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.
IIUC
bom/Jenkinsfile
Line 18 in 57116da
Uh oh!
There was an error while loading. Please reload this page.
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.
We're setting this
ARTIFACT_CACHING_PROXY_PROVIDERvariable value in every agent (except the Azure VM agents as it's not possible to set an env var on them AFAIK) in our infrastructure as code definitions.This variable is then used in the
infra.withArtifactCachingProxyfunction to determine which acp provider to use.This variable is not set in the pipeline library.
Putting it in this podTemplate allows the correct selection of the AWS acp provider, without it it would default to the Azure one. (cf https://github.com/jenkins-infra/pipeline-library/blob/9e0f0a2f09a7c91b26824e706a8963598b685742/vars/infra.groovy#L101)