-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added netci for jenkins #4
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import jobs.generation.Utilities | ||
import jobs.generation.InternalUtilities | ||
|
||
def project = GithubProject | ||
def branch = GithubBranchName | ||
|
||
// Generate a PR/nonPR job for debug (test only), which just does testing. | ||
[true, false].each { isPR -> | ||
['Debug', 'Release'].each { config -> | ||
def lowerCaseConfig = config.toLowerCase() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: It seems like you are only ever using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I use config at the bottom, for setting the PR hook names. |
||
|
||
def newJobName = InternalUtilities.getFullJobName(project, "windows_$lowerCaseConfig", isPR) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we test on non-windows as well? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
def newJob = job(newJobName) { | ||
steps { | ||
batchFile("build.cmd /$lowerCaseConfig") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed this in my PR last night. This should be |
||
} | ||
} | ||
|
||
// TODO: For when we actually have unit tests in this repo | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should file a bug and reference it here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will do after this is merged. |
||
// Utilities.addXUnitDotNETResults(myJob, '**/xUnitResults/*.xml') | ||
|
||
Utilities.setMachineAffinity(newJob, 'Windows_NT') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to additionally specify either This is required for all internal jobs to ensure nothing can be maliciously pulled off a machine by an arbitrary PR made against a public repo. |
||
InternalUtilities.standardJobSetup(newJob, project, isPR, "*/${branch}") | ||
Utilities.addHtmlPublisher(newJob, "TestResults", "Unit Test Results", "index.html") | ||
|
||
if (isPR) { | ||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "Windows $config") | ||
} else { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need non-PR jobs? Don't we only need Jenkins to run PR tests, and then VSO/Microbuild will run our official build after code is checked in? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we want to put build status tags in our README that match the rest of the repos, we'll get those Jenkins. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the 'dotnet/cli' repo, we put build status tags in our README that point to our official VSO builds - which makes more sense to me. I'd rather know if our official build is passing and publishing assets correctly than a Jenkins run. See https://github.com/dotnet/cli#build-status for the CLI badges. Thoughts? |
||
Utilities.addGithubPushTrigger(newJob) | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix comment now that only or jobs are generated.