forked from Blazemeter/blazemeter-jenkins-plugin
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathjenkinsfile
47 lines (43 loc) · 1.66 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
pipeline {
agent {
docker {
registryUrl 'https://us-docker.pkg.dev'
image 'verdant-bulwark-278/bzm-plugin-base-image/bzm-plugin-base-image:latest'
registryCredentialsId 'push-to-gar-enc'
args '-u root -v /var/run/docker.sock:/var/run/docker.sock -v $WORKSPACE:/build'
}
}
options {
buildDiscarder(logRotator(numToKeepStr: "10"))
ansiColor('xterm')
timestamps()
disableConcurrentBuilds()
}
environment {
NEXUS_STAGING_CRED = credentials('blazerunner_nexus_staging_creds')
API_CLIENT_CRED = credentials('blazerunner_api_client_creds')
}
stages {
stage('Build Release') {
steps {
script {
sh'''
sed 's/NEXUS-STAGING-USERNAME/${NEXUS_STAGING_CRED_USR}' settings.xml
sed 's/NEXUS-STAGING-PASSWORD/${NEXUS_STAGING_CRED_PSW}' settings.xml
sed 's/API-CLIENT-USERNAME/${API_CLIENT_CRED_USR}' settings.xml
sed 's/API-CLIENT-PASSWORD/${API_CLIENT_CRED_PSW}' settings.xml
mkdir /tmp/jenkinsci && git clone https://github.com/jenkinsci/blazemeter-plugin /tmp/jenkinsci && cd /tmp/jenkinsci && git pull https://github.com/Blazemeter/blazemeter-jenkins-plugin.git && cd /
cp settings.xml ~/.m2/settings.xml
'''
}
}
}
//stage('Deploy Release') {
// steps {
// script {
// sh 'mvn release:prepare release:perform'
// }
// }
//}
}
}