Hi, I am new to Jenkins, Need a help wrt a scenario. I have to configure jenkins shared pipeline.
my current jenkinsfile somethhing like looks like -
stage('npm docker build'){
sh 'chmod -R 777 .'
}
stage('npm install'){
docker_node.inside('') {
sh 'npm install'
}
}
stage('Do something'){
docker_node.inside('') {
Do something
}
}
stage('Do something'){
docker_node.inside(''){
Do something
}
}
stage('Next stage'){
docker_node.inside(''){
}
}
stage('Test'){
test.inside(''){
run my test
}
}
I want move the execution of all the stages to shared pipeline. But as you all the execution happening inside the docker node which is built at the first stage, and executing the next stages inside docker node..
How can I pass the docker node reference to subsequent stages.