jenkins: Multibranch Pipeline multi-branch construction, search the whole network without success, record the success time here! ! !

        Recently I have studied CI/CD, how can efficient continuous integration and continuous deployment in the case of multiple branches of the project, the old iron who made jenkins knows that Jenkins 1.x is to "describe" the deployment pipeline through the interface manual operation, then Jenkins 2.x Brought us the gospel, 2.x supports pipeline as code, that is, the deployment pipeline is described by "code". Let us embrace pipeline as code and give up manual operation.

         First, we introduce a text file Jenkinsfile, which is the manifestation of the deployment pipeline in jenkins. All the logic of the deployment pipeline is written in the jenkinsfile.

      Next, we install the pipeline plug-in for jenkins, and after installation, we can create a pipeline project.

Since pipeline 2.5, it supports scripted and declarative syntax. The scripting style is flexible, extensible, and more complex, and the declarative style is simpler and more structured. We choose the declarative syntax, which is as follows:

pipeline{
     agent any

     stages{
         stage('build'){          
             steps{
                 echo   "building

Guess you like

Origin blog.csdn.net/feikillyou/article/details/105618238