首页 > 解决方案 > 詹金斯:步骤和步骤之间的区别

问题描述

step这里提到的有什么区别https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#step-general-build-step

steps在这里提到https://jenkins.io/doc/pipeline/tour/running-multiple-steps/

标签: jenkins

解决方案


steps是一组在 a 中要做的事情stage。里面的每条指令steps都是一个step.

这是一个例子:

pipeline {
    agent any
     stages {
         stage('FirstStage') {
             steps { 
                 echo 'Hello World'       // step
                 echo 'Hello World again' // another step
             }
         stage('SecondStage') {
             steps { 
                 echo 'Hello World'       // yet another step
                 echo 'Hello World again' // another step again
             }
         }
     }
 }

推荐阅读