pipeline支持的两种语法

1. 声明式

pipeline{
    agent any
    stages{
        stage("first"){
            steps{
                // echo "first"
            }
        }
        stage("second"){
            steps{
                // echo "sendon"
            }
        }
        stage("third"){
            steps{
                // echo "third"
            }
        }
    }
}

  

2. 脚本式

ode{
    stage("first"){
        // echo "first"
    }
    stage("second"){
        // echo "second"
    }
    stage("third"){
        // echo "third"
    }
}

  

posted @ 2023-05-20 18:22  羊脂玉净瓶  阅读(13)  评论(0)    收藏  举报