Table of Contents

Back Home

Pipeline DSL

Hello world dsl

pipeline {
    agent('any')
    stages {
        stage('build') {
            steps {
                sh 'echo hello world'
            }
        }
    }
}

Pipeline Syntax documentation: https://jenkins.io/doc/book/pipeline/syntax/

Jenkins Build

steps {
        gradle('check')
        gradle {
            tasks('clean')
            tasks('check')
            switches('--info')
        }
    }

https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.helpers.step.StepContext.gradle

Job DSL

 
jenkins_groovy_dsl.txt · Last modified: 2019/12/08 11:27 by root
 
RSS - 200 © CrosswireDigitialMedia Ltd