-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
63 lines (61 loc) · 1.76 KB
/
Jenkinsfile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
def seed_url = "https://github.com/stchar/pipeline-dsl-seed"
pipeline {
options {
skipDefaultCheckout()
}
parameters {
string name:"seed_ref", defaultValue: "master"
}
agent any
stages {
stage('prebuild') {
steps {
dir('pipeline-dsl-seed-dep') {
checkout scm
}
dir('pipeline-dsl-seed'){
git(url:seed_url, branch: params.seed_ref)
}
}
}
stage('configure') {
steps {
dir('pipeline-dsl-seed'){
sh "./gradlew getJobs"
}
}
}
stage('test') {
steps {
dir('pipeline-dsl-seed'){
sh "./gradlew check"
}
}
}
stage('deploy') {
//when { branch "master" }
steps {
// Call seeder script to deploy jobs in the configuration
dir('pipeline-dsl-seed'){
jobDsl(targets: 'jobs/seeder.groovy',
unstableOnDeprecation: true,
failOnMissingPlugin: true)
}
}
}
stage('e2e-tests') {
steps {
script {
dir('pipeline-dsl-seed'){
test_suites = new groovy.json.JsonSlurper().parseText(readFile(".test_suites.json"))
echo "test_suites = ${test_suites}"
for (suite in test_suites) {
echo "suite = $suite"
load suite
}
}
}
}
}
}
}