我有一个用于构建我的Android应用程序的管道 . 在某些阶段,我有shell脚本 . 当我一个接一个地运行各个阶段(通过评论其他人)时,一切正常,但当我一起运行它们时,我看到了奇怪的行为 .
似乎shell脚本在 parallel 中运行!!
这是我的jenkinsfile:
pipeline{
agent any
stages{
stage("Clean"){
agent{
node{
label 'master'
customWorkspace getMainDirectory()
}
}
steps{
sh """#!/bin/bash
rm -rf Corona
rm -rf native-corona-android
cd ..
cp -a TemplateWorkspace/. ${getCoronaBranch()}-${getNativeBrach()}
"""
}
}
stage("pull native repo"){
agent{
node{
label 'master'
customWorkspace getNativeProjectPath()
}
}
steps{
echo "pulling