there is no POM in this directory

2018-01-23 Thread niraj vara
Hi

I have configure the maven with jenkins. I am using git for source code.  
but when I run the build I am getting this error. 

[ERROR] The goal you specified requires a project to execute but there is 
no POM in this directory (/var/lib/jenkins/workspace/case1). Please verify 
you invoked Maven from the correct directory. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, 
please read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException


Please guide how to solve this error. I have been trying since last 2-3 
days but not able to solve so at last I have posted here.

-- 
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/05c89d95-4499-41e6-81dd-32cdd761271d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins REST API

2018-01-23 Thread Mark Waite
https://stackoverflow.com/questions/25661362/where-can-i-find-jenkins-restful-api-reference

https://wiki.jenkins.io/display/JENKINS/Remote+access+API

Mark Waite

On Tue, Jan 23, 2018 at 8:26 PM  wrote:

> Jenkins Experts -
>
> I want to target the Jenkins REST API for some automation.  Is there a
> site that lists ALL API's?
>
> Example:
>
> Get - http:///job//lastBuild/api/json
> Post - http:///job//build
>
> Cheers
>
> --
> 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/f115be66-0854-4baa-ab7e-8c0623d45d93%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAO49JtFtZXQZRvJSJsfP5Fk5YGZL6XxKNNHFHOrhrnHnQ7pkPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins REST API

2018-01-23 Thread collinsfamilychromebook
Jenkins Experts -

I want to target the Jenkins REST API for some automation.  Is there a site 
that lists ALL API's?

Example:

Get - http:///job//lastBuild/api/json
Post - http:///job//build

Cheers

-- 
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/f115be66-0854-4baa-ab7e-8c0623d45d93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Use 'input' in a non-blocking way

2018-01-23 Thread Sean Liu
Hi,

I am trying to setup a cd pipeline with Jenkins recently, and 'input' is 
used for manual approval  in the pipeline, but it seems that 'input' blocks 
the executor and won't free the executor util the build is manually 
approved or cancelled, the pipeline is something like this:

pipeline {
  agent any

  stages {
stage('build docker container') {
  steps {
sh 'docker-compose build'
sh 'docker-compose run start_dependencies'
  }
}

stage('prepare database') {
  steps {
sh 'docker-compose run --rm rails bundle exec rails db:create'
sh 'docker-compose run --rm rails bundle exec rails db:migrate'
  }
}

stage('coding style check') {
  steps {
sh 'docker-compose run --rm rails bundle exec rubocop'
  }
}

stage('automated tests') {
  steps {
sh 'docker-compose run --rm rails bundle exec rspec'
  }
}


stage('deploy to staging') {
  when {
branch "master"
  }
  
  steps {
input 'deploy to staging?'
lock(resource: 'staging-server', inversePrecedence: true) {
  sshagent (credentials: ['a99a855d-e3c8-484c-82ce-f9f6f0fd0ffc']) {
sh 'docker-compose run -u $(id -u $USER):$(id -g $USER) -v 
/var/lib/jenkins:/var/lib/jenkins -v /etc/group:/etc/group:ro -v 
/etc/passwd:/etc/passwd:ro -v $SSH_AUTH_SOCK:/ssh-agent -e 
SSH_AUTH_SOCK=/ssh-agent -e COMMIT=$GIT_COMMIT --rm rails bundle exec mina 
staging deploy'
  }
}
  }
}


  }

  post {
always {
  sh 'docker-compose kill'
  sh 'docker-compose rm -fv'
}
  }
}Enter code here...

I tried to pull the 'input' statement out of 'deploy to staging' like this:

stage('approve for deploying to staging') {
  steps {
input 'deploy to staging?'
  }
}

it still doesn't work, is there a way to use 'input' in a non-blocking way?

Thanks!


-- 
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/56c14f9a-879c-4aeb-b9f4-6b636ba7e1f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: A recent change (or bug) in either Docker and/or Jenkins is breaking most tutorials in the Jenkins User Documentation.

2018-01-23 Thread Giles Gaskell
Hi everyone,

Just a quick follow-up ...

It's possible that this issue may have resulted from recent changes in 
Docker behavior (i.e. in recent Docker versions) which were no longer being 
handled correctly by the Jenkins Docker Pipeline plugin.

Once this PR (https://github.com/jenkinsci/docker-workflow-plugin/pull/128) 
is merged and a new version of this plugin released, then these tutorials 
should start working again (as documented).

Cheers,
Giles.

On Wednesday, January 24, 2018 at 12:10:09 PM UTC+11, Giles Gaskell wrote:
>
> Thanks so much for all the sleuthing work Damien - you've hit the nail on 
> the head with this one.
>
> Cheers,
> Giles.
>
> On 24 January 2018 at 00:43, Damien Duportal  
> wrote:
>
>> This issue is related to the "Docker Pipeline" plugin ("docker-workflow") 
>> which has an issue when trying to determine if the executor (master or 
>> agent) is running inside a container.
>>
>> See issue/PR #120 of "docker-workflow-plugin", in particular 
>> https://github.com/jenkinsci/docker-workflow-plugin/pull/120#issuecomment-357284756
>>  
>> which is for the standard "docker".
>>
>> Here is my work list items to diagnose this:
>>
>> * The tutorials are working quite well with some older version of Docker 
>> (example: 17.09)
>> * When the tutorial is not working, wee the build failing, and before the 
>> error message "shnot found...", we have a difference in the logs: it 
>> says "Jenkins does not seem to be running inside a container".
>>   - We can also see the "docker run" commands issued by the 
>> docker-workflow plugin: 
>> > BEFORE: "--volumes-from "
>> > AFTER: "-v /var/jenkins_home/:/var/jenkins_home/."
>> * This log message come from this piece of code on the plugin (v.1.14 
>> when writing those lines): 
>> https://github.com/jenkinsci/docker-workflow-plugin/blob/docker-workflow-1.14/src/main/java/org/jenkinsci/plugins/docker/workflow/WithContainerStep.java#L158-L182
>> * As Far as I Understand, The function "getContainerIdIfContainerized()" 
>> is returning the Optional.absent() String when it is not working, so the 
>> condition is false.
>> * This function is implemented here: 
>> https://github.com/jenkinsci/docker-workflow-plugin/blob/docker-workflow-1.14/src/main/java/org/jenkinsci/plugins/docker/workflow/client/DockerClient.java#L311
>>  
>> * Before diving in the code (and because I really suck at reading/writing 
>> code), I first checked my cgroup self file to see what it looks like 
>> (smelling Pattern issue...): 
>> https://gist.github.com/dduportal/67f965dd935b4fb7d316b798f2a6c2ef
>>   - While someone with the tutorial working got this: 
>> https://gist.github.com/dduportal/0ac5e5c76043e95fa0b5ff85c1b0c93e
>> * See the diff? "/docker/" vs. "/docker-ce/".
>> * Searching the Internet made it easy to catch 
>> https://github.com/jenkinsci/docker-workflow-plugin/pull/120 
>> 
>>  
>> .
>>
>> => The constant used to get the cgroup pattern to catch has to be 
>> improved (short term) in order to catch the new patterns: "docker-ce", 
>> "docker-ee", "kubernetes" ones and "ecs".
>> => This to be solved need to see an update of the plugin with this fix at 
>> least. Long term would be to find another way of detecting the container 
>> inception, or providing customizable configs for this.
>>
>>
>>
>> On Monday, January 22, 2018 at 5:49:08 AM UTC+1, Giles Gaskell wrote:
>>>
>>> Thanks for your speedy reply Mark,
>>>
>>> I ended up raising a bug report here: 
>>> https://issues.jenkins-ci.org/browse/JENKINS-49063
>>>
>>> This behavior is definitely manifesting itself through the Jenkins LTS 
>>> release 2.89.3. In fact, I'm using a recent update of the 
>>> "jenkinsci/blueocean" Docker image - see the "Environment" details in the 
>>> bug report above.
>>>
>>> Incidentally, I also tried this out on the latest weekly release of the 
>>> "jenkins/jenkins" Docker image (i.e. 2.103) but received a different error 
>>> because unlike the "jenkinsci/blueocean" Docker image's container, the 
>>> "docker" command doesn't appear to be available in the "jenkins/jenkins" 
>>> container. Hence, I got the error:
>>>
>>> ...
>>>
>>>  
>>>
>>> [simple-java-maven-app] Running shell script
>>>
>>> + docker pull maven:3-alpine
>>>
>>> /var/jenkins_home/workspace/simple-java-maven-app@tmp/durable-9030abcd/script.sh:
>>>  
 2: 
 /var/jenkins_home/workspace/simple-java-maven-app@tmp/durable-9030abcd/script.sh:
  
 docker: not found 
>>>
>>>
 [Pipeline] } 
>>>
>>>  
>>>
>>> ...
>>>
>>>
>>> Giles
>>>
>>> On Monday, January 22, 2018 at 2:03:31 PM UTC+11, Mark Waite wrote:

 That sounds like a bug.  

 Is this with the long-term support release (2.89.3) or with a weekly 
 release (like 2.102).

 If it is a weekly release, is the same problem visible in a weekly 
 relea

Re: A recent change (or bug) in either Docker and/or Jenkins is breaking most tutorials in the Jenkins User Documentation.

2018-01-23 Thread Giles Gaskell
Thanks so much for all the sleuthing work Damien - you've hit the nail on
the head with this one.

Cheers,
Giles.

On 24 January 2018 at 00:43, Damien Duportal 
wrote:

> This issue is related to the "Docker Pipeline" plugin ("docker-workflow")
> which has an issue when trying to determine if the executor (master or
> agent) is running inside a container.
>
> See issue/PR #120 of "docker-workflow-plugin", in particular
> https://github.com/jenkinsci/docker-workflow-plugin/pull/
> 120#issuecomment-357284756 which is for the standard "docker".
>
> Here is my work list items to diagnose this:
>
> * The tutorials are working quite well with some older version of Docker
> (example: 17.09)
> * When the tutorial is not working, wee the build failing, and before the
> error message "shnot found...", we have a difference in the logs: it
> says "Jenkins does not seem to be running inside a container".
>   - We can also see the "docker run" commands issued by the
> docker-workflow plugin:
> > BEFORE: "--volumes-from "
> > AFTER: "-v /var/jenkins_home/:/var/jenkins_home/."
> * This log message come from this piece of code on the plugin (v.1.14 when
> writing those lines): https://github.com/jenkinsci/docker-workflow-
> plugin/blob/docker-workflow-1.14/src/main/java/org/
> jenkinsci/plugins/docker/workflow/WithContainerStep.java#L158-L182
> * As Far as I Understand, The function "getContainerIdIfContainerized()"
> is returning the Optional.absent() String when it is not working, so the
> condition is false.
> * This function is implemented here: https://github.com/
> jenkinsci/docker-workflow-plugin/blob/docker-workflow-1.
> 14/src/main/java/org/jenkinsci/plugins/docker/
> workflow/client/DockerClient.java#L311
> * Before diving in the code (and because I really suck at reading/writing
> code), I first checked my cgroup self file to see what it looks like
> (smelling Pattern issue...): https://gist.github.com/dduportal/
> 67f965dd935b4fb7d316b798f2a6c2ef
>   - While someone with the tutorial working got this:
> https://gist.github.com/dduportal/0ac5e5c76043e95fa0b5ff85c1b0c93e
> * See the diff? "/docker/" vs. "/docker-ce/".
> * Searching the Internet made it easy to catch https://github.com/
> jenkinsci/docker-workflow-plugin/pull/120 .
>
> => The constant used to get the cgroup pattern to catch has to be improved
> (short term) in order to catch the new patterns: "docker-ce", "docker-ee",
> "kubernetes" ones and "ecs".
> => This to be solved need to see an update of the plugin with this fix at
> least. Long term would be to find another way of detecting the container
> inception, or providing customizable configs for this.
>
>
>
> On Monday, January 22, 2018 at 5:49:08 AM UTC+1, Giles Gaskell wrote:
>>
>> Thanks for your speedy reply Mark,
>>
>> I ended up raising a bug report here: https://issues.jenkins-c
>> i.org/browse/JENKINS-49063
>>
>> This behavior is definitely manifesting itself through the Jenkins LTS
>> release 2.89.3. In fact, I'm using a recent update of the
>> "jenkinsci/blueocean" Docker image - see the "Environment" details in the
>> bug report above.
>>
>> Incidentally, I also tried this out on the latest weekly release of the
>> "jenkins/jenkins" Docker image (i.e. 2.103) but received a different error
>> because unlike the "jenkinsci/blueocean" Docker image's container, the
>> "docker" command doesn't appear to be available in the "jenkins/jenkins"
>> container. Hence, I got the error:
>>
>> ...
>>
>>
>>
>> [simple-java-maven-app] Running shell script
>>
>> + docker pull maven:3-alpine
>>
>> /var/jenkins_home/workspace/simple-java-maven-app@tmp/durable-9030abcd/script.sh:
>>> 2: 
>>> /var/jenkins_home/workspace/simple-java-maven-app@tmp/durable-9030abcd/script.sh:
>>> docker: not found
>>
>>
>>> [Pipeline] }
>>
>>
>>
>> ...
>>
>>
>> Giles
>>
>> On Monday, January 22, 2018 at 2:03:31 PM UTC+11, Mark Waite wrote:
>>>
>>> That sounds like a bug.
>>>
>>> Is this with the long-term support release (2.89.3) or with a weekly
>>> release (like 2.102).
>>>
>>> If it is a weekly release, is the same problem visible in a weekly
>>> release prior to 2.102?  The 2.102 release includes a security improvement
>>> (JEP-200) which detected several places that need further changes.
>>>
>>> If it is with LTS or an earlier weekly release, submit a bug report (
>>> https://wiki.jenkins.io/display/JENKINS/How+to+report+an+issue ).
>>>
>>> Mark Waite
>>>
>>> On Sun, Jan 21, 2018 at 7:04 PM Giles Gaskell 
>>> wrote:
>>>
 Hi all,

 I recently saw someone raise this issue
  in
 the GitHub repository that the Build a Java app with Maven
  tutorial
 uses.

 This issue shows the output of the Pipeline run with the typical
 failures that happen fairly early on:

 sh: can't create /var/jenkins_home/workspace/sjma@tmp
> /durable-cd13

Re: specifying branches to build for a multi-branch pipeline

2018-01-23 Thread Stephen Connolly
Wildcard branches filter trait is the basic way...

You probably want
https://wiki.jenkins.io/display/JENKINS/SCM+Filter+Branch+PR+Plugin though
(assumes your SCMSource has implemented trait support)

On Tue 23 Jan 2018 at 19:49, ziffusion  wrote:

> Hi
>
> Is there a way get the multi-branch pipeline to build only some specific
> branches in the repo?
>
> We have hundreds of branches in our repo, and that would create a huge
> clutter in the Jenkins dashboard if the pipeline picked them all up.
>
> What kind of a workflow works for this? I am sure many, may folks have a
> plethora of branches to deal with.
>
-- 
Sent from my phone

-- 
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/CA%2BnPnMwH%2Bu%2BPaqF-e_K%3DUpp%3D77JY58tMV4LegSgRJ3oULfusZg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: SSH key forwarding into docker container pipeline

2018-01-23 Thread Lorem Ipsum
I've tried modifying the Jenkinsfile to the following: 


pipeline {
agent { dockerfile true }
stages {
stage('Build'){
steps {
sshagent(['d288a45e-5b02-4aac-839b-d87cc3a854d0']) {
sh 'make'
}
}
}
}
}

But the checkout fails with the following error:

No user exists for uid 112
fatal: Could not read from remote repository.

Should I specially prepare the docker for Jenkins to use?

-- 
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/d8427d71-f7ad-41bb-ad18-918b38fd5575%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: SSH key forwarding into docker container pipeline

2018-01-23 Thread Lorem Ipsum
I've tried modifying the Jenkinsfile to the following: 


pipeline {
agent { dockerfile true }
stages {
stage('Build'){
steps {
sshagent(['d288a45e-5b02-4aac-839b-d87cc3a854d0']) {
sh 'make debian'
}
}
}
}
}

But the checkout fails with the following error:

No user exists for uid 112
fatal: Could not read from remote repository.

Should I specially prepare the docker for Jenkins to use?

-- 
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/b0a21de4-ba58-49d2-8b10-61bc77d332f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


SSH key forwarding into docker container pipeline

2018-01-23 Thread Lorem Ipsum
Hello

I'm trying to build a project which Makefile pulls modules from a private 
repository. How should I forward the SSH key from Jenkins to the docker 
container?

The pipeline which creates the build is pretty very basic but it fails on 
checkout: 

pipeline {
agent { dockerfile true }
stages {
stage('Build'){
steps {
sh 'make'
}
}
}
}

I assume that similar problem will occur for *known_hosts* entry for the 
git repo. Are there any best practices for this? 

-- 
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/8e3fc387-fabb-4118-a7b6-922d6539bba2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to change default permissions of created jobs in Jenkins file system

2018-01-23 Thread Björn Rohlén
Mark is on the spot, but to specify, it's the user running Tomcat and the 
environment Tomcat is running under that you want to make sure the umask is 
set properly on, in your case umask 0002 (to get 775 or -rwrwxr-x). 

Take care!

On Tuesday, 23 January 2018 04:20:28 UTC+1, 黄涛 wrote:
>
> Hi all,
>
> When I create a job(say *foo*), if I check the /jobs/ 
> directory all the jobs are created with the permission 750.
> drwxr-x---  3 android android 4096  1月 23 09:17 foo/
>
> I want to share jobs in samba,i want it to created with the 775.How can I 
> achieve that?. 
> Appreciate your help.. 
>
> My jenkins version is 2.64 and i use jenkins.war in tomcat.
>
> Regards,
>

-- 
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/17f3d2ef-5c16-4d45-839f-19ff6a8f6811%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How do I get access to environment variables in my post block?

2018-01-23 Thread red 888


At the top of my pipeline (not inside a specific stage) I define an env:

environment {
MYVA = 'sdkfjlsjflsjflsd'}


Now I want to use it in a function call in my post block. I had to do this 
to get it to work:

post {
success {
script {
def MYVA = MYVA
myFunction {
someParam = "This is my var: ${MYVA}
}
...

This works fine, but is there a more elegant shorthand for this? Maybe an 
annotation that will grab the var from the calling parent or something? Why 
do I have to redefine the variable?


-- 
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/48b013e7-597a-4bd9-a005-f92d5d858b89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins .Exe build issue

2018-01-23 Thread chaitali sawdekar



I am building 7 exes for my project out of which 5 are getting build and 
the other two are giving error -Source: File Name: light blue.bmp 
[exec] Position: 0 Error: Cannot open resource file light blue.bmp.as  
shown in the image above.
can anyone please help what could be the issue.



-- 
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/2ad504aa-921f-4df3-8b07-d5cd95fd5ada%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: A recent change (or bug) in either Docker and/or Jenkins is breaking most tutorials in the Jenkins User Documentation.

2018-01-23 Thread Damien Duportal
This issue is related to the "Docker Pipeline" plugin ("docker-workflow") 
which has an issue when trying to determine if the executor (master or 
agent) is running inside a container.

See issue/PR #120 of "docker-workflow-plugin", in particular 
https://github.com/jenkinsci/docker-workflow-plugin/pull/120#issuecomment-357284756
 
which is for the standard "docker".

Here is my work list items to diagnose this:

* The tutorials are working quite well with some older version of Docker 
(example: 17.09)
* When the tutorial is not working, wee the build failing, and before the 
error message "shnot found...", we have a difference in the logs: it 
says "Jenkins does not seem to be running inside a container".
  - We can also see the "docker run" commands issued by the docker-workflow 
plugin: 
> BEFORE: "--volumes-from "
> AFTER: "-v /var/jenkins_home/:/var/jenkins_home/."
* This log message come from this piece of code on the plugin (v.1.14 when 
writing those 
lines): 
https://github.com/jenkinsci/docker-workflow-plugin/blob/docker-workflow-1.14/src/main/java/org/jenkinsci/plugins/docker/workflow/WithContainerStep.java#L158-L182
* As Far as I Understand, The function "getContainerIdIfContainerized()" is 
returning the Optional.absent() String when it is not working, so the 
condition is false.
* This function is implemented 
here: 
https://github.com/jenkinsci/docker-workflow-plugin/blob/docker-workflow-1.14/src/main/java/org/jenkinsci/plugins/docker/workflow/client/DockerClient.java#L311
 
* Before diving in the code (and because I really suck at reading/writing 
code), I first checked my cgroup self file to see what it looks like 
(smelling Pattern 
issue...): https://gist.github.com/dduportal/67f965dd935b4fb7d316b798f2a6c2ef
  - While someone with the tutorial working got 
this: https://gist.github.com/dduportal/0ac5e5c76043e95fa0b5ff85c1b0c93e
* See the diff? "/docker/" vs. "/docker-ce/".
* Searching the Internet made it easy to 
catch https://github.com/jenkinsci/docker-workflow-plugin/pull/120 .

=> The constant used to get the cgroup pattern to catch has to be improved 
(short term) in order to catch the new patterns: "docker-ce", "docker-ee", 
"kubernetes" ones and "ecs".
=> This to be solved need to see an update of the plugin with this fix at 
least. Long term would be to find another way of detecting the container 
inception, or providing customizable configs for this.



On Monday, January 22, 2018 at 5:49:08 AM UTC+1, Giles Gaskell wrote:
>
> Thanks for your speedy reply Mark,
>
> I ended up raising a bug report here: 
> https://issues.jenkins-ci.org/browse/JENKINS-49063
>
> This behavior is definitely manifesting itself through the Jenkins LTS 
> release 2.89.3. In fact, I'm using a recent update of the 
> "jenkinsci/blueocean" Docker image - see the "Environment" details in the 
> bug report above.
>
> Incidentally, I also tried this out on the latest weekly release of the 
> "jenkins/jenkins" Docker image (i.e. 2.103) but received a different error 
> because unlike the "jenkinsci/blueocean" Docker image's container, the 
> "docker" command doesn't appear to be available in the "jenkins/jenkins" 
> container. Hence, I got the error:
>
> ...
>
>  
>
> [simple-java-maven-app] Running shell script
>
> + docker pull maven:3-alpine
>
> /var/jenkins_home/workspace/simple-java-maven-app@tmp/durable-9030abcd/script.sh:
>  
>> 2: 
>> /var/jenkins_home/workspace/simple-java-maven-app@tmp/durable-9030abcd/script.sh:
>>  
>> docker: not found 
>
>
>> [Pipeline] } 
>
>  
>
> ...
>
>
> Giles
>
> On Monday, January 22, 2018 at 2:03:31 PM UTC+11, Mark Waite wrote:
>>
>> That sounds like a bug.  
>>
>> Is this with the long-term support release (2.89.3) or with a weekly 
>> release (like 2.102).
>>
>> If it is a weekly release, is the same problem visible in a weekly 
>> release prior to 2.102?  The 2.102 release includes a security improvement 
>> (JEP-200) which detected several places that need further changes.
>>
>> If it is with LTS or an earlier weekly release, submit a bug report ( 
>> https://wiki.jenkins.io/display/JENKINS/How+to+report+an+issue ).
>>  
>> Mark Waite
>>
>> On Sun, Jan 21, 2018 at 7:04 PM Giles Gaskell  
>> wrote:
>>
>>> Hi all,
>>>
>>> I recently saw someone raise this issue 
>>>  in 
>>> the GitHub repository that the Build a Java app with Maven 
>>>  tutorial 
>>> uses.
>>>
>>> This issue shows the output of the Pipeline run with the typical 
>>> failures that happen fairly early on:
>>>
>>> sh: can't create 
 /var/jenkins_home/workspace/sjma@tmp/durable-cd13b59e/jenkins-log.txt: 
 nonexistent directory
 sh: can't create 
 /var/jenkins_home/workspace/sjma@tmp/durable-cd13b59e/jenkins-result.txt: 
 nonexistent directory
>>>
>>>
>>> I even began running though this tutorial myself and encountered the 
>>> same problem