代码拉取完成,页面将自动刷新
// Groovy Script: http://www.groovy-lang.org/syntax.html
// Jenkins DSL: https://github.com/jenkinsci/job-dsl-plugin/wiki
import jobs.generation.*;
def generate(boolean isPr) {
// The input project name (e.g. dotnet/corefx)
def projectName = GithubProject
// The input branch name (e.g. master)
def branchName = GithubBranchName
def defaultBranch = "*/${branchName}"
def jobName = Utilities.getFullJobName(projectName, "perf_run", isPr)
def myJob = job(jobName) {
description('perf run')
wrappers {
credentialsBinding {
string('BV_UPLOAD_SAS_TOKEN', 'Roslyn Perf BenchView Sas')
}
}
steps {
batchFile("""powershell -File ./build/scripts/run_perf.ps1""")
}
publishers {
postBuildScripts {
steps {
batchFile("""powershell -File ./build/scripts/cleanup_perf.ps1 -ShouldArchive""")
}
}
}
}
def archiveSettings = new ArchivalSettings()
archiveSettings.addFiles('ToArchive/**/*.*')
Utilities.addArchival(myJob, archiveSettings)
Utilities.standardJobSetup(myJob, projectName, isPr, defaultBranch)
Utilities.setMachineAffinity(myJob, 'Windows_NT', 'latest-or-auto-perf')
if (isPr) {
TriggerBuilder prTrigger = TriggerBuilder.triggerOnPullRequest()
prTrigger.permitOrg('Microsoft')
prTrigger.permitOrg('dotnet')
prTrigger.setCustomTriggerPhrase("(?im)^\\s*(@dotnet-bot\\s+)?(re)?test\\s+perf(\\s+please)?\\s*\$" )
prTrigger.triggerForBranch(branchName);
prTrigger.setGithubContext('Performance Test Run')
prTrigger.emitTrigger(myJob)
}
else {
Utilities.addGithubPushTrigger(myJob)
}
}
generate(true)
generate(false)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。