[JIRA] (JENKINS-49063) Jenkins on Docker (LTS) running locally cannot build Pipelines from local repos

2 views
Skip to first unread message

gtirloni@ret.cx (JIRA)

unread,
Jul 11, 2018, 12:53:01 PM7/11/18
to jenkinsc...@googlegroups.com
Giovanni Tirloni commented on Bug JENKINS-49063
 
Re: Jenkins on Docker (LTS) running locally cannot build Pipelines from local repos

Is this really fixed? Or am I looking at a different issue here?

Jenkins 2.121.1 (running as a systemd unit on master and a remote build node through SSH Slave plugin)
Docker Pipeline plugin 1.17 (released in May 2018)
 

pipeline {
    agent { dockerfile true }    stages {
        stage('Test') {
            steps {
                sh 'cd /app && npm test'
            }
        }
    }
} 

And then the test stage doesn't run inside the Docker container that was started:

[Pipeline] withDockerContainer
ci-node does not seem to be running inside a container
$ docker run -t -d -u 1020:1020 -w /home/jenkins/workspace/gpii-express_PR-7-something -v /home/jenkins/workspace/gpii-express_PR-7-something:/home/jenkins/workspace/gpii-express_PR-7-something:rw,z -v /home/jenkins/workspace/gpii-express_PR-7-something@tmp:/home/jenkins/workspace/gpii-express_PR-7-something@tmp:rw,z -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 ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** 1d0c4aca5306042f527e42c2e15dd885f78a0ac3 cat
$ docker top 9d555195979c311991213dbcc0ef367c66b86972ba8deeb44322b122b2c02c41 -eo pid,comm
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Test)
[Pipeline] sh
[gpii-express_PR-7-something] Running shell script
+ cd /app
+ npm test
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

gtirloni@ret.cx (JIRA)

unread,
Jul 11, 2018, 12:54:02 PM7/11/18
to jenkinsc...@googlegroups.com
Giovanni Tirloni edited a comment on Bug JENKINS-49063
Is this really fixed? Or am I looking at a different issue here?

Jenkins 2.121.1 (running as a systemd unit on master and a remote build node through SSH Slave plugin)
Docker Pipeline plugin 1.17 (released in May 2018)
 
{noformat}

pipeline {
    agent { dockerfile true }    stages {
        stage('Test') {
            steps {
                sh 'cd /app && npm test'
            }
        }
    }
} {noformat}


And then the test stage doesn't run inside the Docker container that was started:

{noformat}

[Pipeline] withDockerContainer
ci-node does not seem to be running inside a container
$ docker run -t -d -u 1020:1020 -w /home/jenkins/workspace/gpii-express_PR-7-something -v /home/jenkins/workspace/gpii-express_PR-7-something:/home/jenkins/workspace/gpii-express_PR-7-something:rw,z -v /home/jenkins/workspace/gpii-express_PR-7-something@tmp:/home/jenkins/workspace/gpii-express_PR-7-something@tmp:rw,z -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 ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** 1d0c4aca5306042f527e42c2e15dd885f78a0ac3 cat
$ docker top 9d555195979c311991213dbcc0ef367c66b86972ba8deeb44322b122b2c02c41 -eo pid,comm
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Test)
[Pipeline] sh
[gpii-express_PR-7-something] Running shell script
+ cd /app
+ npm test

> gpii-e...@1.0.15 pretest /app
> node node_modules/rimraf/rimraf coverage/* reports/*


> gpii-e...@1.0.15 test /app
> node node_modules/istanbul/lib/cli.js cover tests/all-tests.js --print summary

/app/node_modules/mkdirp/index.js:90
                    throw err0;
                    ^

Error: EACCES: permission denied, mkdir '/app/reports'
    at Object.mkdirSync (fs.js:738:3)
    at Function.sync (/app/node_modules/mkdirp/index.js:71:13)
    at Object.run (/app/node_modules/istanbul/lib/command/common/run-with-cover.js:129:16)
    at CoverCommand.run (/app/node_modules/istanbul/lib/command/cover.js:27:22)
    at runCommand (/app/node_modules/istanbul/lib/cli.js:83:19)
    at runToCompletion (/app/node_modules/istanbul/lib/cli.js:87:5)
    at Object.<anonymous> (/app/node_modules/istanbul/lib/cli.js:93:5)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
npm ERR! Test failed.  See above for more details.
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
$ docker stop --time=1 9d555195979c311991213dbcc0ef367c66b86972ba8deeb44322b122b2c02c41
$ docker rm -f 9d555195979c311991213dbcc0ef367c66b86972ba8deeb44322b122b2c02c41
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
{noformat}

gtirloni@ret.cx (JIRA)

unread,
Jul 11, 2018, 12:55:04 PM7/11/18
to jenkinsc...@googlegroups.com


Running the Docker image that Jenkins built works just fine:

{noformat}
$ docker run --rm -ti 1d0c4aca5306042f527e42c2e15dd885f78a0ac3 /bin/sh
/app $ npm test


> gpii-e...@1.0.15 pretest /app
> node node_modules/rimraf/rimraf coverage/* reports/*


> gpii-e...@1.0.15 test /app
> node node_modules/istanbul/lib/cli.js cover tests/all-tests.js --print summary
...
16:53:58.388:  jq: ***************
16:53:58.388:  jq: All tests concluded: 167/167 total passed in 15718ms - PASS
16:53:58.389:  jq: ***************
/app $ exit
{noformat}

gtirloni@ret.cx (JIRA)

unread,
Jul 11, 2018, 12:58:03 PM7/11/18
to jenkinsc...@googlegroups.com
Giovanni Tirloni edited a comment on Bug JENKINS-49063
Is this really fixed? Or am I looking at a different issue here?

Jenkins 2.121.1 (running as a systemd unit on master and a remote build node through SSH Slave plugin)
Docker Pipeline plugin 1.17 (released in May 2018)
Docker CE 18.03 running on CentOS 7.5

edrodnav@gmail.com (JIRA)

unread,
Sep 19, 2018, 4:31:01 PM9/19/18
to jenkinsc...@googlegroups.com

Is this fixed? I'm still seeing the same issue as well.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

sadzeih@gmail.com (JIRA)

unread,
May 29, 2019, 9:57:03 AM5/29/19
to jenkinsc...@googlegroups.com

This issue is still happening for us too with the jenkins helm chart and docker pipeline plugin

Reply all
Reply to author
Forward
0 new messages