当前位置:网站首页>[Jenkins] pipeline controls the sequential execution of multiple jobs for timed continuous integration
[Jenkins] pipeline controls the sequential execution of multiple jobs for timed continuous integration
2022-06-29 14:19:00 【bulabula2022】
1.jenkins Create a new assembly line project

2. To write pipeline Pipelined scripts
Full script :
pipeline {
agent any
stages {
stage("build console all") {
steps {
script {
def starting = 'pipeline-'
def ending = ""
def job_list = [
" Empty blackduck History of platform upload bdio file ",
" Security scanning flux Dependent package installation ",
"Coverity Security scan multiple job Running at the same time -mvn Compile the way ",
"BlackDuck Security scan multiple job Running at the same time ",
"BlackDuck_BinaryScan Security scan multiple job Running at the same time "]
def branches = [:]
MAX_CONCURRENT = 1// establish fifo
latch = new java.util.concurrent.LinkedBlockingDeque(MAX_CONCURRENT)// Go to fifo in , Fill in the maximum number of elements
for(int i=0; i<MAX_CONCURRENT; i++)
latch.offer("$i")for(int i=0; i<job_list.size(); i++) {
def name = starting + job_list[i] + ending
branches[name] = {
def thing = null
waitUntil {
// Get a resource
thing = latch.pollFirst();
return thing != null;
}try {
// perform job
build(job: name, propagate: false)
}finally {
// Release a resource
latch.offer(thing)
}
}
}timestamps {
parallel branches
}
}
}
}
}
}
3. Time to build , Add trigger
Running effect :
边栏推荐
猜你喜欢

BYD has three years left

电脑时间校对后不自动更新要如何解决

Industry analysis - quick intercom, building intercom

揭秘百度智能测试在测试自动执行领域实践
![[document translation] camouflaged object detection](/img/30/73a927c05173a95cc5a5d51e182e3b.png)
[document translation] camouflaged object detection
![[dark horse morning post] the market value of China public education has evaporated by more than 200billion; New Oriental has more than 20million live fans; HM closes its first store in China; Vanke Y](/img/d7/4671b5a74317a8f87ffd36be2b34e1.jpg)
[dark horse morning post] the market value of China public education has evaporated by more than 200billion; New Oriental has more than 20million live fans; HM closes its first store in China; Vanke Y

Wechat applet: repair collection interface version cloud development expression package

留给比亚迪的时间还有三年

go-zero微服务实战系列(七、请求量这么高该如何优化)

Thinkpad VMware 安装虚拟机出现此主机支持 Intel VT-x,但 Intel VT-x 处于禁用状态(问题解决方法)
随机推荐
Game development of contract quantitative trading system (ready-made case analysis)
Matlab fmincon precision, fmincon and quadprog error
留给比亚迪的时间还有三年
c语言入门教程–-6循环语句
【置顶】博客使用须知,公告板,留言板,关于博主
Stable currency risk profile: are usdt and usdc safe?
传输层 选择性确认 SACK
微信小程序:修复采集接口版云开发表情包
Stable currency risk profile: are usdt and usdc safe?
Wechat applet: repair collection interface version cloud development expression package
【黑马早报】中公教育市值蒸发逾2000亿;新东方直播粉丝破2000万;HM关闭中国首店;万科郁亮称房地产已触底;微信上线“大爆炸”功能...
Intuition and Implementation: batch normalization
单项数据流之子组件修改父组件的值
微信小程序:大红喜庆版UI猜灯谜又叫猜字谜
unity吃豆人小游戏,迷宫实现
MySQL数据库:使用show profile命令分析性能
【Qt 教程】QPushButton 按键和双击效果
golang7_TCP编程
昨天面试居然聊了半个多小时的异常处理
BYD has three years left