-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile_release
26 lines (25 loc) · 987 Bytes
/
Jenkinsfile_release
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
#!/usr/bin/env groovy
node('ovh') {
stage('Checkout') {
checkout scm
}
try {
stage('Building ') {
withEnv([
"TARGET=${env.WORKSPACE}/atolcd-cde-plugin/",
]) {
sh "rm -rf $TARGET"
sh "mkdir $TARGET"
sh "rsync -avr ./* $TARGET --exclude $TARGET --exclude ./.git --exclude ./Jenkinsfile_release"
dir("${env.WORKSPACE}/") {
sh "zip -r ./atolcd-cde-plugin.zip atolcd-cde-plugin/"
}
withCredentials([usernameColonPassword(credentialsId: 'nexus3-jenkins', variable: 'NEXUS3_AUTH')]) {
sh 'curl -v --user $NEXUS3_AUTH --upload-file ./atolcd-cde-plugin.zip https://nexus3-ovh.priv.atolcd.com/repository/raw-atolcd-pentaho/atolcd-cde-plugin/atolcd-cde-plugin-$VERSION_NB.zip' }
}
}
} catch (err) {
echo "Caught: ${err}"
currentBuild.result = 'FAILURE'
}
}