-
Notifications
You must be signed in to change notification settings - Fork 346
Add netci.groovy for CI jobs. #3
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
Changes from all commits
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,57 @@ | ||
| // Import the utility functionality. | ||
| import jobs.generation.Utilities; | ||
| import jobs.generation.InternalUtilities; | ||
|
|
||
| // Defines a the new of the repo, used elsewhere in the file | ||
| def project = GithubProject | ||
|
|
||
| // Generate the builds for debug and release, commit and PRJob | ||
| [true, false].each { isPR -> // Defines a closure over true and false, value assigned to isPR | ||
| ['Debug', 'Release'].each { configuration -> | ||
|
|
||
| // Determine the name for the new job. The first parameter is the project, | ||
| // the second parameter is the base name for the job, and the last parameter | ||
| // is a boolean indicating whether the job will be a PR job. If true, the | ||
| // suffix _prtest will be appended. | ||
| def newJobName = InternalUtilities.getFullJobName(project, configuration, isPR) | ||
|
|
||
| // Define your build/test strings here | ||
| def buildString = """call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\VsDevCmd.bat\" && build.cmd -c ${configuration}""" | ||
|
|
||
| // Create a new job with the specified name. The brace opens a new closure | ||
| // and calls made within that closure apply to the newly created job. | ||
| def newJob = job(newJobName) { | ||
| // Indicate this job runs on windows machines. | ||
| // The valid labels right now are: | ||
| // windows (server 2012 R2) | ||
| // ubuntu (v. 14.04) | ||
| // centos-71 | ||
| // openSuSE-132 | ||
| // mac | ||
| // freebsd | ||
| label('windows') | ||
|
Member
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. Required: Use For example:
|
||
|
|
||
| // This opens the set of build steps that will be run. | ||
| steps { | ||
| // Indicates that a batch script should be run with the build string (see above) | ||
| // Also available is: | ||
| // shell (for unix scripting) | ||
| batchFile(buildString) | ||
| } | ||
| } | ||
|
|
||
| // This call performs remaining common job setup on the newly created job. | ||
| // This is used most commonly for simple inner loop testing. | ||
| // It does the following: | ||
| // 1. Sets up source control for the project. | ||
| // 2. Adds a push trigger if the job is a PR job | ||
| // 3. Adds a github PR trigger if the job is a PR job. | ||
| // The optional context (label that you see on github in the PR checks) is added. | ||
| // If not provided the context defaults to the job name. | ||
| // 4. Adds standard options for build retention and timeouts | ||
| // 5. Adds standard parameters for PR and push jobs. | ||
| // These allow PR jobs to be used for simple private testing, for instance. | ||
| // See the documentation for this function to see additional optional parameters. | ||
| InternalUtilities.simpleInnerLoopJobSetup(newJob, project, isPR, "Windows ${configuration}") | ||
|
Member
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. There is no method You likely want |
||
| } | ||
| } | ||
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.
nit: Use
%VS140COMNTOOLS%\\VsDevCmd.bat, rather thanC:\\Program Files (x86)\Microsoft Visual Studio 14.0\\Common7\\Tools\\VsDevCmd.bat