def call(body) {
// evaluate the body block, and collect configuration into the object
def pipelineParams = [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = pipelineParams
body()
pipeline {
agent {
node {
label 'master'
}
}
stages {
stage('Powershell Test') {
steps {
powershell 'Write-Output "Hello World"'
powershell 'Write-Output "$env:COMPONENTVERSION"'
}
}
}
}
}
2) Invoke the script via your pipeline job.
@Library("Jenkins_Library@powershellTest") _
dotNetApiPipeline {
COMPONENTVERSION = "0.0.0"
}
Weirdly enough it just stuck in an infinite loop on the first powershell call. I noticed in the example they are using only shell scripts and I am making a test for bat files as well. I'm wondering if anyone else is seeing this issue with attempting to make pipeline libraries.
Thanks,
Joe