Preview:
pipeline {
    agent { label 'spot-instance' }
    
        stage('Print') {
            steps {
                script {
                    def now = new Date()
                    dateRelease = now.format("yyyy-MM-dd", TimeZone.getTimeZone('UTC'))
                    echo "Current date ${dateRelease}."
                }
            }
        }

        stage ('Run another Job'){
            steps {
                build job: "Release Helpers/(TEST) Schedule Release Job2",
                parameters: [
                    [$class: 'StringParameterValue', name: 'V', value: "${dateRelease}"]

                ]
            }
        }
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter