Jenkins Pipeline waitForQualityGate pending 超时
请参考链接:http://www.iotxing.com/2019/06/12/258/jenkins-pipeline-waitforqualitygate%E8%B6%85%E6%97%B6/
主要是因为sonaqube的一个小bug, 需要sleep 几秒
pipeline {
agent any
//任务集合,一个大的任务
stages {
stage('代码获取') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '${git_version}']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '0f180207-47bf-20-a9-a20fd91f445f', url: 'git@gitlab.domain.com:xxx/monitor.git']]])
}
}
stage('代码质检') {
steps {
withSonarQubeEnv('SonarQube') {
sh '/usr/local/sonar-scanner/bin/sonar-scanner -Dsonar.projectKey=html -Dsonar.projectName=${JOB_NAME} -Dsonar.sources=.'
}
script {
timeout() {
sleep(5)
def qg = waitForQualityGate()
if (qg.status != 'OK') {
error "未通过SonarQube的代码检查,请及时修改! failure: ${qg.status}"
}
}
}
}
}
stage('代码构建') {
steps {
echo "build is ok"
}
}
stage('代码部署') {
steps {
sh '/usr/local/shell/pipeline_deploy_html.sh'
}
}
}
post {
failure {
dingTalk accessToken: 'd631ae76dabd6fabba81b1fe4a7f3d2fe3a8da8636ba72554348efe1982a', imageUrl: '', jenkinsUrl: 'http://jenkins.domain.com:8080/', message: '代码部署失败', notifyPeople: 'phone'
}
success {
dingTalk accessToken: 'd631ae76dabd6fabba81b1fe4a7f3d2fe3a8da8636ba725348ef71e1982a', imageUrl: '', jenkinsUrl: 'http://jenkins.domain.com:8080/', message: '代码部署成功', notifyPeople: 'phone'
}
}
}
Jenkins Pipeline waitForQualityGate pending 超时的更多相关文章
- Jenkins pipeline:pipeline 使用之语法详解
一.引言 Jenkins 2.0的到来,pipline进入了视野,jenkins2.0的核心特性. 也是最适合持续交付的feature. 简单的来说,就是把Jenkins1.0版本中,Project中 ...
- Jenkins pipeline:pipeline 语法详解
jenkins pipeline 总体介绍 pipeline 是一套运行于jenkins上的工作流框架,将原本独立运行于单个或者多个节点的任务连接起来,实现单个任务难以完成的复杂流程编排与可视化. ...
- Jenkins pipeline 语法详解
原文地址http://www.cnblogs.com/fengjian2016/p/8227532.html pipeline 是一套运行于jenkins上的工作流框架,将原本独立运行于单个或者多个节 ...
- 转~Jenkins pipeline:pipeline 使用之语法详解
一.引言 Jenkins 2.0的到来,pipline进入了视野,jenkins2.0的核心特性. 也是最适合持续交付的feature. 简单的来说,就是把Jenkins1.0版本中,Project中 ...
- [转] Jenkins Pipeline插件十大最佳实践
[From] http://blog.didispace.com/jenkins-pipeline-top-10-action/ Jenkins Pipeline 插件对于 Jenkins 用户来说可 ...
- jenkins pipeline的声明式与脚本式
自从Jenkins 2.0 版本升级之后,支持了通过代码(Groovy DSL)来描述一个构建流水线,灵活方便地实现持续交付,大大提升 Jenkins Job 维护的效率,实现从 CI 到 CD 到转 ...
- jenkins pipeline构建后返回构建结果给gitlab
jenkins pipeline构建后返回构建结果给gitlab 使用场景 gitlab 合并请求时要求管道任务必须成功,否则无法执行合并操作,又不想使用gitlab ci 工具. 实现方法 1.Ge ...
- 在容器中运行 Jenkins pipeline 任务
持续集成中的 pipeline 技术和 docker 都是当前正在发展的主流方向,当然把它们结合起来在 CI/CD 过程中发挥出更强大的威力也是大家共同的目标.本文将介绍如何在 Jenkins pip ...
- 基于Jenkins Pipeline的ASP.NET Core持续集成实践
最近在公司实践持续集成,使用到了Jenkins的Pipeline来提高团队基于ASP.NET Core API服务的集成与部署效率,因此这里总结一下. 一.关于持续集成与Jenkins Pipelin ...
随机推荐
- UCB博士资格考试试题
https://math.berkeley.edu/~myzhang/qual.html?tdsourcetag=s_pcqq_aiomsg <!-- Page Content --> & ...
- PAT 基础编程题目集 6-7 统计某类完全平方数 (20 分)
本题要求实现一个函数,判断任一给定整数N是否满足条件:它是完全平方数,又至少有两位数字相同,如144.676等. 函数接口定义: int IsTheNumber ( const int N ); 其中 ...
- ASP.NET MVC中ActionResult的不同返回方式
1.返回视图 return View();//返回方法名对应的视图 return View("aaa");//返回名称为aaa的视图 2.返回文本内容 return Content ...
- 获取redis指定实例中所有的key
需求:获取redis指定的实例中所有的key的名字. 千万不要使用keys *,可以使用scan命令的递归方式获取. 以下给出自己写的脚本,经过测试效果还可以. db_ip=5.5.5.101 db_ ...
- 自定义结构体 Map
struct Hashmap{ ,maxe=; ],nxt[maxe+],w[maxe+]; ]; ;;} void Add(int x,int y){son[++E]=y;nxt[E]=lnk[x] ...
- 栈和队列----设计一个有getMin功能的栈
设计一个有getMin功能的栈 设计一个具有getMin功能的栈,可以返回栈中的最小的元素,可以使用现有的栈的数据结构,要求pop/push/getMin操作的时间复杂度是O(1). package ...
- 杭电oj_2058——The sum problem(java实现)
原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=2058 思路:等差数列公式变形:sum = a1 * len + len *(len -1)/2 抽象成 ...
- MySQL8.0.11解压版安装详细教程
1. 从官网下载zip包 官网网址(https://dev.mysql.com/downloads/mysql/) 2. 解压 将压缩包解压到一个目录(后续将此目录作为安装目录),我这里是解压到了D: ...
- render(七)
Vue 的 _render 方法是实例的一个私有方法,它用来把实例渲染成一个虚拟 Node.它的定义在 src/core/instance/render.js 文件中: Vue.prototype._ ...
- Spring-JDBCTemplate介绍
一.Spring对不同的持久化支持: Spring为各种支持的持久化技术,都提供了简单操作的模板和回调 ORM持久化技术 模板类 JDBC org.springframework.jdbc.c ...