I am trying to run jenkins pipeline on jenkins master node by give "agent none" as below but it fails as below. I also tried agent{none}, agent{label 'none'}. It didn't work, but I am able to run on nodes using agent{label 'ltecomm'}. Can you help?
ERROR: Attempted to execute a step that requires a node context while ‘agent none’ was specified. Be sure to specify your own ‘node { ... }’ blocks when using ‘agent none’.
Finished: FAILURE
Hi,
I am trying to run jenkins pipeline on jenkins master node by give "agent none" as below but it fails as below. I also tried agent{none}, agent{label 'none'}. It didn't work, but I am able to run on nodes using agent{label 'ltecomm'}. Can you help?
ERROR: Attempted to execute a step that requires a node context while ‘agent none’ was specified. Be sure to specify your own ‘node { ... }’ blocks when using ‘agent none’. Finished: FAILURE
Script used:
pipeline{ agent none stages{ stage('scm'){ steps{ git 'https://github.com/wakaleo/game-of-life.git' } } stage('build'){ steps{ sh script: 'mvn clean package' } } stage('post build'){ steps{ junit 'gameoflife-web/target/surefire-reports/.xml' archiveArtifacts 'gameoflife-web/target/.war' } } } }