I actually may have spoke incorrectly...
When you specify an agent on the pipeline, you can't later use "agent none"
on a stage and expect that stage to go back to the flyweight agent on the
master (at least, that's what my tests reveal). But I am not sure I have
ever tried farming out from node A (specified at the pipeline level) to
node B (specified at the stage level).
On Tuesday, October 24, 2017 at 10:20:17 AM UTC-6, Dan Tran wrote:
>
>
> Thanks for confirming it is not a bug, however, this behavior is very odd
> where if I have 99 stages using same docker agent, and one on a different
> agent, I need to repeat 99 times for each stage's agent settings
>
> is this behavior officially documented? if not may need a doc bug
>
> Thanks
>
> -Dan
>
> Btw, we have another pipeline with global agent is a Linux host agent, and
> one stage on window without issue
>
> On Tuesday, October 24, 2017 at 7:43:02 AM UTC-7, Robert Hales wrote:
>>
>> If you specify an agent for the entire pipeline, everything in that
>> pipeline will run in that agent. You need to specify 'agent none' on the
>> pipeline, then specify an agent on each individual stage.
>>
>> On Tuesday, October 24, 2017 at 2:38:35 AM UTC-6, Dan Tran wrote:
>>>
>>> here is my sample pipeline script
>>>
>>> pipeline {
>>>
>>>
>>> agent {
>>> docker {
>>> image "comp/xxxx:yyyy"
>>> }
>>> }
>>>
>>> tools {
>>> jdk 'JAVA8'
>>> }
>>>
>>>
>>>
>>> stages {
>>>
>>> stage("hello") {
>>> agent {
>>> label 'vjd05'
>>> }
>>> steps {
>>> withMaven( maven: 'M3', globalMavenSettingsConfig:
>>> 'maven-global', mavenSettingsConfig: 'maven-user', mavenLocalRepo:
>>> '.repository' ) {
>>> sh "mvn -v"
>>> }
>>> }
>>>
>>> }
>>> }
>>>
>>> }
>>>
>>> On Friday, October 20, 2017 at 3:43:17 PM UTC-7, Dan Tran wrote:
>>>>
>>>>
>>>> Hi
>>>>
>>>> I have a multi-stage pipeline using a global docker agent, except at
>>>> one stage where I need to use none docker agent ( ie a just a pure
>>>> linux host)
>>>>
>>>> and run to this error and look like my stage still inside docker from
>>>> the previous stage. is it a bug?
>>>>
>>>> [Bitbucket] Notifying commit build result[Pipeline] withEnv[Pipeline]
>>>> {[Pipeline] script[Pipeline] {[Pipeline] withMaven[withMaven] Options: []
>>>> [withMaven] Available options:
>>>> [withMaven] use JDK installation provided by the build agent
>>>> WARNING: Specified Maven 'M3' cannot be installed, will be ignored.Step
>>>> running within docker.image() tool installations are not available see
>>>> https://issues.jenkins-ci.org/browse/JENKINS-36159.
>>>> $ docker exec
>>>> ff8d1de358d03e06f316c42208c6dd49fb02d41214f59e18a744e21e911e9353 env
>>>> printenv MAVEN_HOME
>>>> $ docker exec
>>>> ff8d1de358d03e06f316c42208c6dd49fb02d41214f59e18a744e21e911e9353 env
>>>> printenv M2_HOME
>>>> $ docker exec
>>>> ff8d1de358d03e06f316c42208c6dd49fb02d41214f59e18a744e21e911e9353 env
>>>> /bin/sh -c "which mvn"
>>>> [withMaven] with executable null
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>> -Dan
>>>>
>>>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/ad2ccb80-f32a-4d95-81fe-df4dd2b827e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.