Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Jenkinsfile:
- @Library('shared-library@dev')_
- deployPipeline {
- jenkins_job_name = "${env.JOB_BASE_NAME}"
- workspace = "${env.WORKSPACE}"
- stream = "${env.DEPLOY_CONFIG}"
- environment = "${env.ENVIRONMENT}"
- }
- $ cat vars/deployPipeline.groovy
- def call(body) {
- def pipelineParams= [:]
- body.resolveStrategy = Closure.DELEGATE_FIRST
- body.delegate = pipelineParams
- body()
- pipeline {
- stages {
- stage ('Info') {
- steps {
- echo "Job Name: ${pipelineParams.jenkins-job-name}"
- echo "Workspace: ${pipelineParams.workspace}"
- echo "Stream: ${pipelineParams.stream}"
- echo "Environment: ${pipelineParams.environment}"
- }
- }
- }
- }
- }
- Error:
- java.lang.NullPointerException: Cannot get property 'JOB_BASE_NAME' on null object
Add Comment
Please, Sign In to add comment