From cfe37ce054f735786e6a01de678014bbfc880ebf Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 20 Oct 2016 15:36:44 -0700 Subject: [PATCH] Jenkins / .net CI support --- jenkins.sh | 13 +++++++++++++ netci.groovy | 22 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100755 jenkins.sh create mode 100644 netci.groovy diff --git a/jenkins.sh b/jenkins.sh new file mode 100755 index 0000000000000..377a44b7bf75d --- /dev/null +++ b/jenkins.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# Set up NVM +export NVM_DIR="/home/dotnet-bot/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" + +nvm install $1 + +npm uninstall typescript +npm uninstall tslint +npm install +npm update +npm test diff --git a/netci.groovy b/netci.groovy new file mode 100644 index 0000000000000..9f2a96cdeef07 --- /dev/null +++ b/netci.groovy @@ -0,0 +1,22 @@ +// Import the utility functionality. +import jobs.generation.Utilities; + +// Defines a the new of the repo, used elsewhere in the file +def project = GithubProject +def branch = GithubBranchName + +def nodeVersions = ['stable', '4'] + +nodeVersions.each { nodeVer -> + + def newJobName = "typescript_node.${nodeVer}" + def newJob = job(Utilities.getFullJobName(project, newJobName, true)) { + steps { + shell("./jenkins.sh ${nodeVer}") + } + } + + Utilities.standardJobSetup(newJob, project, true, "*/${branch}") + Utilities.setMachineAffinity(newJob, 'Ubuntu', '20161020') + Utilities.addGithubPRTriggerForBranch(newJob, branch, "TypeScript Test Run ${newJobName}") +}