forked from Wind-River/ci-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile-Walter
37 lines (30 loc) · 900 Bytes
/
Jenkinsfile-Walter
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
#!/usr/bin/env groovy
// -*- mode: groovy; tab-width: 2; groovy-indent-offset: 2 -*-
node('docker') {
stage('Docker Run Check') {
dir('ci-scripts') {
git(url:params.CI_REPO, branch:params.CI_BRANCH)
}
sh "${WORKSPACE}/ci-scripts/docker_run_check.sh"
}
def pipeline
stage('Generate Config') {
writeFile file: "${WORKSPACE}/pipeline.yaml", text: params.YAML
pipeline = readYaml text: params.YAML
}
stage('Fetch Walter') {
echo "Fetching Walter..."
def bin = params.WALTER_BINARY
sh "curl ${bin} -o ${WORKSPACE}/walter"
sh "chmod +x ${WORKSPACE}/walter"
}
for (curStage in pipeline.stages) {
String STAGE_NAME = curStage.name
stage("${STAGE_NAME}") {
sh "${WORKSPACE}/walter -config ${WORKSPACE}/pipeline.yaml -stage \"${STAGE_NAME}\""
}
}
stage('Post Process') {
sh "rm -f ${WORKSPACE}/pipeline.yaml"
}
}