代码拉取完成,页面将自动刷新
同步操作将从 JackRolling/jsonflow-ui 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
pipeline {
agent any
stages {
stage('scm') {
steps {
echo 'scm_step_start'
echo 'scm_step_end'
}
}
stage('ScaBlocking'){
steps{
script{
sh '/opt/seczone/appcheck/app-check.sh --filePath "$JENKINS_HOME"/workspace/cxh-pipline-01 --cliMode portal --portalIp 10.0.1.236:30000 --projectName pipline2022 --appName pipline-01 --token b3JnYWRtaW4xMjNAc2Vjem9uZS5jbjpmZGYwNzQ3ZTAxMTU0Y2QwOGE4MGI1OTNmYjJhYTBmZg== --mergeMode FULL '
wrap([$class: 'BuildUser']) {
script {
BUILD_USER = "${env.BUILD_USER}"
BUILD_NUMBER = "${env.BUILD_NUMBER}"
}
}
def tep = "${BUILD_TIMESTAMP}".replaceAll("\\s",",")
def response = httpRequest url:"http://10.0.1.236:30000/sca/jenkins/block/result/query?projectName=pipline2022&appName=pipline-01&buildUser=${BUILD_USER}&buildNo=${BUILD_NUMBER}&buildTime=${tep}",customHeaders: [ [name: "Authorization", value: "BASIC-API:b3JnYWRtaW4xMjNAc2Vjem9uZS5jbjpmZGYwNzQ3ZTAxMTU0Y2QwOGE4MGI1OTNmYjJhYTBmZg=="] ]
println('Response: '+response.content)
def props = readJSON text: response.content
def status = props['status']
def data = props['data']
if(status ==0){
def msg = data['msg']
error(msg)
}else{
println('ProjectName: '+data['projectName'])
println('AppName: '+data['appName'])
println('Block Msg Send Switch(Email/Dingding): '+data['blockEmailSwitch']+'/'+data['blockDingSwitch'])
println('Report Msg Send Switch(Email/Dingding): '+data['repoartAppEmailSwitch']+'/'+data['repoartDingSwitch'])
println('Alert Checking: '+data['alarmSwitch'])
def blockWarning = data['blockWarning']
if(blockWarning){
println('告警信息: ')
println(blockWarning)
}else{
//println('暂无告警信息')
}
println('Block Checking: '+data['blockAlarmSwitch'])
def terminate = data['terminate']
if('1'.equals(terminate)){
println('阻断构建原因: ')
def blockInfo = data['blockInfo']
println(blockInfo)
println('terminate: '+terminate)
error('阻塞构建')
}
}
}
}
}
stage('build') {
steps {
echo 'build_step_start'
echo 'build_step_end'
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。