我有一个詹金斯工作,有一个包含以下命令的 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)