-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPublish.groovy
29 lines (29 loc) · 981 Bytes
/
Publish.groovy
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
pipeline {
agent {
label 'built-in'
}
parameters { string(name: 'PARENT_BUILD_NUMBER', defaultValue: '', description: 'Build number of the webrtc-prebuild-new to be published') }
stages {
stage('Clean') {
steps {
sh 'rm -rf webrtc*.zip'
}
}
stage('Get artifacts') {
steps {
copyArtifacts filter: 'webrtc*.zip', fingerprintArtifacts: true, projectName: 'webrtc-prebuild-new', selector: specific("${PARENT_BUILD_NUMBER}")
}
}
stage('Publish') {
steps {
withCredentials([string(credentialsId: 'github-repo-access', variable: 'token')]) {
sh '''
export GITHUB_TOKEN=$token
. scripts/version.sh
BUILD_NUMBER=$PARENT_BUILD_NUMBER python3 scripts/push2github.py
'''
}
}
}
}
}