jenkins创建multibranch pipeline

参考以下文章进行实践:

https://jenkins.io/doc/pipeline/tour/hello-world/#what-is-a-jenkins-pipeline

 (看见一个介绍的还不错的,https://www.cnblogs.com/cay83/p/7542442.html)

step1

创建项目,分支源中填写svn信息,用户名,密码

 

step2

新建一个branch目录,准备pipleline构建的条件。

 

 

 Jenkinsfile内容:

pipeline {
    agent any
    stages {
        stage('Build') {
            steps {
                sh 'echo "Hello World"'
                sh '''
                    echo "Multiline shell steps works too"
                    ls -lah
                '''
            }
        }
    }
}

 

 step3:

进行构建。

 

 

 

 

 

可以看到,正常输出了。

 

posted @ 2018-04-04 15:01  三国梦回  阅读(578)  评论(0编辑  收藏  举报