forked from GPUOpen-Drivers/AMDVLK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
53 lines (50 loc) · 1.73 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
#!/usr/bin/env groovy
/**
* Pipeline for building and upload package of AMDVLK release
*
* Build parameters:
* @githubToken: token to access github
*/
def buildNode = "srdcvk && build && ubuntu"
def rpmPkgStash = "rpmStash"
pipeline {
agent none
parameters {
string(
name: "buildNode",
defaultValue: params.buildNode ? params.buildNode : buildNode,
description: "Jenkins node label or name of machine to run build stage on"
)
}
stages {
stage("Package") {
parallel {
stage("Ubuntu") {
agent { label "srdcvk && build && ubuntu" }
steps {
sh "rm -rf *.deb"
sh "python3 ${WORKSPACE}/utils/amdvlk_release_for_tag.py -w ${WORKSPACE} -a ${githubToken} -c build"
}
}
stage("RHEL") {
agent { label "srdcvk && build && RHEL" }
steps {
script {
sh "rm -rf *.rpm"
sh "python3 ${WORKSPACE}/utils/amdvlk_release_for_tag.py -w ${WORKSPACE} -a ${githubToken} -c build"
def pkgName = sh (script: "ls|grep *.rpm", returnStdout: true)
stash name: rpmPkgStash, includes: pkgName.trim()
}
}
}
}
}
stage("Release") {
agent { label buildNode }
steps {
unstash name: rpmPkgStash
sh "python3 ${WORKSPACE}/utils/amdvlk_release_for_tag.py -w ${WORKSPACE} -a ${githubToken} -c release"
}
}
}
}