Open Starefossen opened 7 years ago
Have you tried
pipeline { agent { label 'docker-node' } }
Stil nothing, stuck at There are no nodes with the label ‘docker-node’
😒
You can try a few debug steps. Check the following:
We got a declarative jenkins pipeline working with artifactory and yadp configuration.
Firstly try with static slave as label, then replace with cloud label. Label will be missing because there is no slaves, Cloud API will request new node for label. And then if something fails slave wouldn't be created. Check Cloud statistics
page in global settings.
Try using Netty instead of Jersey in YADP plugin config
Vice versa, jersey is more stable unfortunately :(
Thanks for all the help both of you! I completely removed the cloud and set it up again. Then I ran in to an (unrelated) connection issue with JNLP (probably due to port forwarding / firewalls) and had to get SSH working instead.
I am using a modified version of the jenkins/ssh-slave:latest
(our fork) which has the "correct" uid and gid for the jenkins user to match what is on the host to be able to share workspaces between containers. It also has docker
client cli installed to make the Docker Pipeline Plugin work as well.
I have not yet been able to get the Docker Pipeline Plugin working with Declarative Jenkins Pipelines which means I had to revert back to the old pipeline syntax (for now). Thanks for all the help!
I am using a modified version of the jenkins/ssh-slave:latest (our fork) which has the "correct" uid and gid for the jenkins user to match what is on the host to be able to share workspaces between containers. It also has docker client cli installed to make the Docker Pipeline Plugin work as well.
Never used jenkins-ssh-slave
and other docker images, i can suggest to do own images. It a good question about making user for getting permission for mount. I made experimental dockerShell
step for executing ssh command in container with mounted workspace, maybe it can help future...
Have anyone go this to work with the new Declarative Jenkins Pipelines? I am having a hard time getting Jenkins to receive any cloud provisioning requests with the new syntax.