Kubernetes and docker syntax for jenkins declarative pipeline

46 views
Skip to first unread message

Tristan FAURE

unread,
Mar 5, 2018, 7:08:24 AM3/5/18
to Jenkins Users
Hello all,

we are currently experiencing docker capabilities in jenkins with Jenkinsfile and declarative pipelines using this instruction :
agent {
     docker { image 'node:7-alpine' }
}
 
I try to follow the initiatives around kubernetes and it seems very interesting but what I can see from the github (https://github.com/jenkinsci/kubernetes-plugin) is that the syntax changed to declare the desired POD :
podTemplate(label: label) {
  node(label) {
    stage('Run shell') {
      container('mycontainer') {
        sh 'echo hello world'
      }
    }
  }
}

Can we imagine the future a compability between the first syntax (only the image name) and a deployment on Kubernetes ?

We will not deploy yet a kubernetes cluster and I'm concerned about job compatibility switching from a docker only environment to a kubernetes one.

Regards

Tristan FAURE


Carlos Sanchez

unread,
Mar 5, 2018, 7:27:31 AM3/5/18
to Jenkins Users
You would probably be interested in https://issues.jenkins-ci.org/browse/JENKINS-48050

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/be4fda12-946d-4277-9dc0-e60ee1f1730a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tristan FAURE

unread,
Mar 5, 2018, 7:31:47 AM3/5/18
to Jenkins Users
Thank you very much by this quick answer. I will follow the issue.


Le lundi 5 mars 2018 13:27:31 UTC+1, Carlos Sanchez a écrit :
You would probably be interested in https://issues.jenkins-ci.org/browse/JENKINS-48050
On Mon, Mar 5, 2018 at 1:08 PM, Tristan FAURE <faure....@gmail.com> wrote:
Hello all,

we are currently experiencing docker capabilities in jenkins with Jenkinsfile and declarative pipelines using this instruction :
agent {
     docker { image 'node:7-alpine' }
}
 
I try to follow the initiatives around kubernetes and it seems very interesting but what I can see from the github (https://github.com/jenkinsci/kubernetes-plugin) is that the syntax changed to declare the desired POD :
podTemplate(label: label) {
  node(label) {
    stage('Run shell') {
      container('mycontainer') {
        sh 'echo hello world'
      }
    }
  }
}

Can we imagine the future a compability between the first syntax (only the image name) and a deployment on Kubernetes ?

We will not deploy yet a kubernetes cluster and I'm concerned about job compatibility switching from a docker only environment to a kubernetes one.

Regards

Tristan FAURE


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages