参考以下文章进行实践:

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

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

step1

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

jenkins创建multibranch pipeline

 

step2

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

jenkins创建multibranch pipeline

 

jenkins创建multibranch pipeline

 

 Jenkinsfile内容:

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

 

 step3:

进行构建。

jenkins创建multibranch pipeline

 

 jenkins创建multibranch pipeline

 

 jenkins创建multibranch pipeline

 

可以看到,正常输出了。

 

相关文章:

  • 2021-08-19
  • 2021-12-31
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
猜你喜欢
  • 2021-05-10
  • 2021-06-01
  • 2022-12-23
  • 2021-11-21
  • 2021-09-02
  • 2022-12-23
相关资源
相似解决方案