Jenkinsfile syntax to change pipeline default docker run command

2018-09-13 Thread hce h
Hi,

I successfully run following docker command locally:

docker run -it -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static 
arm32v7/debian:jessie /bin/bash

But Jenkins has a default docker run command in the pipleline:

docker run -t -d -u 1000:1000 -w 
/var/jenkins_home/workspace/jenkinsbuild-GKBECTLK5VFZTEERVIZTJXC7I72XPCA26MJCHUVG63SOLTV6KNUA
 
--volumes-from 
f8ef7502d1b87996312d6a5fc40804a0f998179adcd627265cd6e5449f2a17af -e 
 -e  -e  -e  -e  -e  -e 
 -e  -e  -e  -e  -e  -e 
 -e  -e  -e  -e  -e  -e 
 -e  -e  -e  -e  -e  -e 
 -e  --entrypoint cat builddockerimage

How can I change the Jenkins docker run default command to add "-v 
/usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static"? To give the background 
reason why I need to add qemu is because Jenkins failed to run shell 
/bin/sh or /bin/bash in ARM Docker Image. Are there any Jenkins plubin to 
fix the pipleline to run ARM Docker Image?

Thank you


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/deda02f0-ee0a-441c-a501-6cd396d5de73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


inside() sh does not work for armhf Docker image

2018-09-12 Thread hce h
Hi,

If I run Jenkinsfile for debian Docker container, it would work fine, it 
could call inside() without error, but it could not run inside() for armhf 
Docker container. Any insight what was going on for armhf docker container?

Some online comments said because armhf did not support sh, it could only 
support bash, but I could not make it work even change the following 
inside():

arm.inside() {
sh '''#!/bin/bash -l
 echo "hello"
 }'''


The Jenkings log:
...

Jenkins seems to be running inside container 
.

debian_build-GKBECTLK5VFZTEERVIZTJXC7I72XPCA26MJCHUVG63SOLTV6KNUA] Running 
shell script
Error response from daemon: Container 
86aab2c121c676bfa21cc80a1128a6418d9c22d866378787ea4e75de3685fc84 is not running
process apparently never started in 
/var/jenkins_home/workspace/debian_build-GKBECTLK5VFZTEERVIZTJXC7I72XPCA26MJCHUVG63SOLTV6KNUA@tmp/durable-aff57d54[Pipeline]
 }$ docker stop --time=1 
86aab2c121c676bfa21cc80a1128a6418d9c22d866378787ea4e75de3685fc84
$ docker rm -f 
86aab2c121c676bfa21cc80a1128a6418d9c22d866378787ea4e75de3685fc84[Pipeline] // 
withDockerContainer[Pipeline] echoFailed in build stage

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c57f500b-f3bc-4b5e-97e4-1b5d0edf6f7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.