pipeline {
agent none
options { timestamps () }
stages {
stage('Task Initialization') {
agent { label "" }
steps {
script {
wrap([$class: 'BuildUser']) {
buildName "#${BUILD_NUMBER}_${BUILD_USER}"
}
}
cleanWs()
}
}
stage('Service Custom') {
parallel {
stage ('1') {
agent { label "" }
steps {
sh '''
#!/bin/bash
export JENKINS_NODE_COOKIE=dontKillMe
for i in `echo $APP | sed "s/,/\t/g"`
do
case $i in
1)
if [ $Choice == ON ];
then
/bin/bash /data/ncchome/startup.sh
echo "10.10.0.237 service on"
elif [ $Choice == OFF ];
then
/bin/bash /data/ncchome/stop.sh
echo "10.10.0.237 service off"
else
echo "Choice null"
fi
PIPELINE 启停脚本
最新推荐文章于 2024-05-20 11:08:34 发布