forked from dotnet/dotnet-buildtools-prereqs-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
netci.groovy
22 lines (18 loc) · 943 Bytes
/
netci.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import jobs.generation.Utilities
def project = GithubProject
def branch = GithubBranchName
def isPR = true
def distroList = ['alpine', 'centos/6', 'centos/7', 'debian', 'fedora', 'opensuse', 'ubuntu/14', 'ubuntu/16', 'ubuntu/17', 'ubuntu/18']
distroList.each { distro ->
def distroName = distro.replace('/', '_')
def newJobName = Utilities.getFullJobName(project, "${distroName}", isPR)
def newJob = job(newJobName) {
steps {
shell("docker build -t runner --pull -f ./Dockerfile.linux.runner .")
shell("docker run -v /var/run/docker.sock:/var/run/docker.sock runner pwsh -NoProfile -File ./build.ps1 -DockerfilePath \"src/${distro}*\" -CleanupDocker")
}
}
Utilities.setMachineAffinity(newJob, 'Ubuntu16.04', 'latest-or-auto-docker')
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
Utilities.addGithubPRTriggerForBranch(newJob, branch, "${distroName}")
}