Today I put together the start of a common reporting library for groovy scripts in Jenkins. The scripts are all checked into my gitea repository according to a plan.
I created the file structures, but hadn't populated any groovy scripts and that was perfect because it was reflected when I pressed the "build now" option in Jenkins.
Failure is an option - it is beautiful
This was very telling! Yup - I hadn't populated any .groovy files.
I fixed that and performed another "build now".
.
D'oh! Of course...
@Library('jenkinslib@main') _
pipeline {
agent any
stages {
stage('Build') {
steps {
// Call your custom global variable step directly
// buildApp(env: 'production')
echo "performing a build."
}
}
}
}
The immediate fix was as simple as adding an "echo". It just needed to do something.
No comments:
Post a Comment