小编bud*_*ano的帖子

Jenkins 管道上的多步 shell 命令

我有一个詹金斯工作,有一个包含以下命令的 shell 步骤。运行得很棒!

sudo yum install python36
virtualenv -p python3 test
source test/bin/activate
<some other command>
Run Code Online (Sandbox Code Playgroud)

现在我想把它变成一个管道。我如何在 groovy 中编写相同的内容?我尝试使用这样的语法但失败了:

stage('Test') {
        steps {
            sh 'sudo yum install python36'
            sh 'virtualenv -p python3 test'
        }
    }
Run Code Online (Sandbox Code Playgroud)

groovy jenkins jenkins-pipeline

5
推荐指数
1
解决办法
6270
查看次数

标签 统计

groovy ×1

jenkins ×1

jenkins-pipeline ×1