Hi Gregory,
what kind of Jenkinsfile do you use? Scripted or declarative?
In scripted, you would enclose your sh in a
> node('linux_label') {
> sh "your shell script"
> }
, on declarative, use
stage ("Run on Linux only") {
agent { label "linux_label" }
steps {
script {
sh "you s
Hi,
I'm porting a scripted pipeline to a declarative one.
I used to have something like this:
//Scripted
def myEnv = [:]
stage ('Prepare my env') {
[...]
myEnv = ...
}
stage ('Fancy stuff') {
node() {
withEnv(myEnv} {
// here use what is defined in myEnv
}
}
Hi,
I have issue porting scripted to declarative pipeline. I used to have in
scripted:
//Scripted
def myEnv = [:]
stage ('Prepare my env') {
[...]
myEnv = ...
}
stage ('Fancy stuff') {
node() {
withEnv(myEnv} {
// here use what is defined in myEnv
}
}
st