JENKINS-PIPELINE-GENERAL:新增布尔值参数
流水线脚本中:
NOTSKIP = "${iDb}"
…………
stage('initDb') {
when{
equals expected: 'true',
actual: NOTSKIP
}
steps {
sh '/usr/local/mysql/bin/mysql -hlocalhost -P3306 -uroot -p123456 -e"use test_db;select * from tb1;TRUNCATE TABLE tb1;INSERT INTO tb1 (id,name,code,note) VALUES(1,\'name_test\',1,\'note_test\');"'
}
}
网友评论