git - Jenkins: running build does not provision docker slave -


i'm running jenkins 1.609.1 docker-plugin 0.10.0 provision jenkins docker slave. docker 1.0.1 running on ubuntu 14.04.

i've created customized docker images based on evarga/jenkins-slave per instruction on https://wiki.jenkins-ci.org/display/jenkins/docker+plugin ("shortcut : pulling docker image").

in jenkins configuration i've:

  • added "docker" "cloud" area
  • pointed local docker url http://localhost:4243/ , configured docker appropriately (i can run "test connection" , reports "1.0.1")
  • created custom docker (my/jenkins:0.1) image using supervisord run ssh, mysql, postgres, elasticsearch, php , nodejs inside
  • manually running container, can ssh inside user jenkins/jenkins
  • i've given jenkins user inside container password-less sudo rights
  • i've added docker image "docker template" (as above: my/jenkins:0.1) , provided launch method via "docker ssh launcher"

enter image description here

in job configuration:

  • i've checked "docker container"
  • added tag
  • source code connected via git checkout

enter image description here

when run job, git checkout performed, not on slave directly on host:

started user myuser building in workspace /var/lib/jenkins/workspace/project-core  > git rev-parse --is-inside-work-tree # timeout=10 fetching changes remote git repository  > git config remote.origin.url git@github.com:myuser/project-core.git # timeout=10 fetching upstream changes git@github.com:myuser/project-core.git  > git --version # timeout=10 using git_ssh set credentials   > git -c core.askpass=true fetch --tags --progress git@github.com:myuser/project-core.git +refs/heads/*:refs/remotes/origin/*  > git rev-parse refs/remotes/origin/master^{commit} # timeout=10  > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 checking out revision 96dcbc7aa615451448184493c499c14eeb7050cc (refs/remotes/origin/master)  > git config core.sparsecheckout # timeout=10  > git checkout -f 96dcbc7aa615451448184493c499c14eeb7050cc  > git rev-list 1405ab6d96a395e53c80f6d7353e11bea93675bc # timeout=10 finished: success 

there's no sign of trying provision docker slave.

what missing?

i solve answer on jenkinsci-user mailing list:

the "label" added global "docker template" configuration has used in field "restrict project can run" in job configuration.

i mistakenly added jobs "docker container / additional tag add" field.

on sidenote: using docker 1.10.0 which, after fixing above, turned out work setup, got:

error in provisioning; template='dockertemplate{labelstring='jenkins', launcher=com.nirima.jenkins.plugins.docker.launcher.dockercomputersshlauncher@28c3da52, remotefsmapping='', remotefs='/home/jenkins', instancecap=2147483647, mode=normal, retentionstrategy=com.nirima.jenkins.plugins.docker.strategy.dockeronceretentionstrategy@1ccaa52c, numexecutors=1, dockertemplatebase=dockertemplatebase{image=jenkins:0.3}}' com.github.dockerjava.api.internalservererrorexception: cannot start container b35c3d99a13b8b6365cd79a90b9fa65d3b3780b63a5a8d2683853583e81885ee: write /sys/fs/cgroup/cpuset/docker/b35c3d99a13b8b6365cd79a90b9fa65d3b3780b63a5a8d2683853583e81885ee/cpuset.cpus: invalid argument

upgrading latest version, 1.7.1 in case, instantly fixed this.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -