println"build number: ${currentBuild.number}"; println"current result: ${currentBuild.currentResult}"; println"build URL: ${currentBuild.absoluteUrl}"; } } } } } manager manager是Groovy Postbuild插件提供的全局变量,用于构建后操作,它是在jenkins JVM 中执行groovy脚本。可用来更改构建结果,显示构建...
equals:当期望值和实际值相同时,执行这个 stage,例如: when { equals expected: 2, actual: currentBuild.number }; expression:当指定的 Groovy 表达式评估为 True,执行这个 stage,例如: when { expression { return params.DEBUG_BUILD } }; tag:如果 TAG_NAME 的值和给定的条件匹配,执行这个 stage,例如: ...
equals expected: 2, actual: currentBuild.number } 1. 2. 3. buildingTag,如果pipeline所执行的代码被打了tag,则执行。 whne { buildingTag() } 1. 2. 3. tag,如果pipeline所执行的代码被打了tag,并且tag名符合规则,才执行。如果tag值为空,可以写成tag(),这个效果和buildingTag()一样,不论tag名称为什...
1.引入jenkins工具包 com.offbytwo.jenkins...jenkins-client 0.3.8 2.终止正在构建的任务JenkinsHttpClient jenkinsHttpClient = new JenkinsHttpClient(new URI(url), username, password...jenkinsHttpClient);Build build = jenkinsServer.getJob(jobName).getBuildByNumber(buildNumber);build.Stop();3...
{currentBuild.displayName="#${BUILD_NUMBER} - ${params.ENVIRONMENT_NAME} - ${params.SERVER_GROUP_NAME} -${params.ARTIFACT_VAERSION}"currentBuild.description="Deploying ${params.ARTIFACT_VAERSION} to ${params.SERVER_GROUP_NAME} in ${params.ENVIRONMENT_NAME}"}}}stage('Download Atrifacts'){...
equals:当期望值和实际值相同时,执行这个 stage,例如:when { equals expected: 2, actual: currentBuild.number }; expression:当指定的 Groovy 表达式评估为 True,执行这个 stage,例如:when { expression { return params.DEBUG_BUILD } }; tag:如果 TAG_NAME 的值和给定的条件匹配,执行这个 stage,例如:when...
script{//使用build调度前端job,并传参,将结果赋值给frontendBuilddef frontendBuild=build(job:'frontend', parameters: [gitParameter(name:'Branch', value:'*/develop')]) println frontendBuild.getProjectName() println frontendBuild.getNumber()
(clean:true,output_directory:'./fastlane/build',#输出路径output_name:"{ipa包名称}.ipa",scheme:'ios-eynamics-app',#iOS Target schemeconfiguration:'Debug',#/配置开发模式还是发布模式:Debug or Release# sdk:"iOS 12.0",# archive_path:"./fastlane/Archive",include_symbols:true,export_options:{...
defenv=currentBuild.getEnvironment(currentListener)defmap=[:]if(env.gitlabSourceBranch!=null) { map['sourceBranch']=env.gitlabSourceBranch }if(env.gitlabTargetBranch!=null) { map['targetBranch']=env.gitlabTargetBranch }returnmap You can then reference these variables in your job config, e...
jenkins.build_info('job-in-jenkins', 'build-number', (optional) {depth: 1, :<value>, ...}, function(err, data) { if (err){ return console.log(err); } console.log(data) }); last build info jenkins.last_build_info('job-in-jenkins', (optional) {depth: 1, :<value>, ...}...