-
Notifications
You must be signed in to change notification settings - Fork 17
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 new DevOps agent for Golang 1.16 #32
Conversation
Signed-off-by: John Niang <johnniang@fastmail.com>
/kind feature |
/cc @kubesphere-sigs/sig-devops |
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've left some comments here, nice Job
@@ -427,6 +427,9 @@ Agent: | |||
Golang: | |||
Image: builder-go | |||
Tag: v3.1.0 | |||
golang16: |
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.
golang16 --> Golang16
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.
Thanks for you patient review!
In fact, helm recommends that variable name should begin with a lowercase letter, and words should be separated with camelcase, please see https://helm.sh/docs/chart_best_practices/values/.
Meanwhile, we have plan to refine other variable names in Jenkins charts, please see issue #26 I've submitted before.
But now, I agree with you to keep the naming style of variable name same with others. I will change them later, and thank you for pointing out this again.
idleMinutes: 0 | ||
containers: | ||
- name: "go" | ||
image: "{{ .Values.Agent.Builder.Registry }}/{{ .Values.Agent.Builder.golang16.image }}:{{ .Values.Agent.Builder.golang16.tag }}{{ template "jenkins.agent.variant" . }}" |
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.
golang16 -- > Golang16
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.
/lgtm
I have tested manually. The Jenkinsfile is:
pipeline {
agent {
label 'go16'
}
stages{
stage('test'){
steps{
container('go') {
sh 'go version'
}
}
}
}
}
Test output:
Running on go16-3w3t7 in /home/jenkins/agent/workspace/my-devops-projectwgvcm/test
[Pipeline] {
[Pipeline] stage
[Pipeline] { (test)
[Pipeline] container
[Pipeline] {
[Pipeline] sh
+ go version
go version go1.16.8 linux/amd64
[Pipeline] }
[Pipeline] // container
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS
What this PR dose?
Add a new pod template for Golang 1.16.
Why we need it?
Please see #28.
Which issue dose this PR fix?
Fix #28
How to test?
Pipeline script example: