Repository navigation
Expand file tree
/
Copy pathJenkinsfile
More file actions
33 lines (29 loc) · 1.59 KB
/
Copy pathJenkinsfile
File metadata and controls
33 lines (29 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import org.rookout.files.Utilities
import org.rookout.testsUtil.TestUtilities
def label = "worker-${UUID.randomUUID().toString()}"
podCreator.initMain(label: label) {
node(label) {
print(pwd())
container('rookout-helm') {
stage ('Getting test') {
def myRepo = checkout scm
env.GIT_BRANCH = myRepo.GIT_BRANCH.replaceAll('/|_', '-')
if ("master".equals(env.GIT_BRANCH)) {
def scriptToUse = libraryResource 'generate_tests.groovy'
def jobName = "tutorial-python"
def testType = "regression-test"
def dockerTag = TestUtilities.getDockerTagNameForRegression(jobName)
sh("docker build . -t ${dockerTag} --build-arg GIT_COMMIT=\$(git rev-parse HEAD) --build-arg GIT_ORIGIN=\$(git config --get remote.origin.url) && gcloud docker -- push ${dockerTag}")
TestUtilities.createTest(this, scriptToUse, jobName, pwd() + "/.jenkins", "Jenkinsfile.test")
stage ('Run the tests') {
def rookoutVersionInFile = sh(script: "cat ${pwd()}/requirements.txt | grep 'rook' | cut -d '=' -f 2", returnStdout: true)
def cleanRookoutVersionInFile = rookoutVersionInFile.toString().trim()
println("Version: ${cleanRookoutVersionInFile}!")
triggerer.regressionEx(GIT_BRANCH : "Rooks/Python-v${cleanRookoutVersionInFile}", GIT_REPO: "PythonRook", LANGUAGE_TO_RUN: "python", EXTRACT_VERSION_FROM_BRANCH: true ){
}
}
}
}
}
}
}