当前位置:网站首页>[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 :
边栏推荐
猜你喜欢
随机推荐
MySQL 1146 error [easy to understand]
Applet Wechat: un nouveau réseau exclusif de microgroupes de développement de Cloud
C keyboard hook
微信小程序:装B神器P图修改微信流量主小程序源码下载趣味恶搞图制作免服务器域名
Game development of contract quantitative trading system (ready-made case analysis)
goby全端口扫描
关于MongoDB报错:connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
[important notice] the 2022 series of awards and recommendations of China graphics society were launched
ANSVC无功补偿装置在河北某购物广场中的应用
布隆过滤器Bloom Filter简介
systemd调试
Industry analysis - quick intercom, building intercom
go-zero微服务实战系列(七、请求量这么高该如何优化)
吐血整理:一份不可多得的架构师图谱!
Intuition and Implementation: batch normalization
分布式唯一 ID 生成方案浅谈
Unity SplashImage 缩放问题
浅析 Istio——可观测性
28000 word summary of callable and future interview knowledge points. After reading it, I went directly to ByteDance. Forgive me for being a little floating (Part 2)
数字IC手撕代码--交通灯









