pipeline语法

 

Jenkins中文文档

https://m.w3cschool.cn/jenkins/jenkins-epas28oi.html

 

pipeline中文文档

https://testerhome.com/wiki/pipelinedoccn/

 

 

简单事例:

pipeline {
    agent any
    stages {
        stage('build') {
            steps {
                sh label: '', script: 'hostname -i'
            }
        }
    }
}
pipeline {
    agent any
    stages {
        stage('build') {
            steps {
                sh label: '', script: 'hostname -i'
            }
        }
        stage('test') {
            steps {
                echo '测试'
            }
        }
        stage('deploy') {
            steps {
                echo '发布'
            }
        }
    }
}

 

posted @ 2020-08-20 15:58  韩式运维  阅读(137)  评论(0)    收藏  举报