Fixes in release/Jenkinsfile
* Fixes, this was used to release 1.1.0-beta-8 version.
* Removed concurrency from sanity build
maven-frontend plugin doesn't work well with concurrency.
/**
* Pipeline script to be used for releasing BlueOcean
+ *
+ * `bluebuild-environment` is the node label that must use maven 3.3.9, JDK8 and build essentials based docker image.
+ *
+ * To use, simply copy it to pipeline job.
+ *
*/
-node {
+node('bluebuild-environment') {
properties([parameters([
choice(choices: 'Vivek Pandey:vivek.pandey@gmail.com\nMichael Neale:mneale@cloudbees.com\nJames Dumay:jdumay@cloudbees.com', description: 'Colon separated Git Username and email.', name: 'GIT_AUTHOR_AND_GIT_EMAIL'),
[$class: 'CredentialsParameterDefinition', credentialType: 'com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl', defaultValue: '', description: 'Your GitHub credential', name: 'GITHUB_CREDENTIALS', required: true],
@@ -12,7 +17,7 @@ node {
deleteDir()
- docker.image('maven:3.3-jdk-8').inside() {
+
def gitNameEmail = (env.GIT_AUTHOR_AND_GIT_EMAIL).split(':')
println gitNameEmail[0] + ":" + gitNameEmail[1]
String gitName = gitNameEmail[0]
@@ -24,7 +29,9 @@ node {
]) {
try {
// checkout from git
- stage('Git checkout') {
+ stage('Checkout') {
+
+ echo "deploying as $JENKINS_USERNAME"
git url: '${GIT_REPO_URL}', branch: '${BRANCH}'
// setup git creds
@@ -37,12 +44,13 @@ node {
}
//Sanity build
- stage('Build and test') {
+ stage('Build') {
sh 'echo Java version: `java -version`'
sh 'echo Maven version: `mvn --version`'
sh 'echo Git version: `git --version`'
- sh 'mvn -T 1C clean install -Djacoco.skip=true -DskipTests -Dfinbugs.skip=true'
+ // clean build
+ sh 'mvn clean install -Djacoco.skip=true -DskipTests -Dfindbugs.skip=true'
}
//Prepare for release, release on github (tag)
@@ -53,7 +61,7 @@ node {
//Release to maven repo
stage('mvn release:perform') {
- sh 'mvn -s settings.xml release:perform -Djacoco.skip=true'
+ sh 'mvn -s settings.xml release:perform -Djacoco.skip=true -Dfindbugs.skip=true'
}
} catch (err) {
currentBuild.result = "FAILURE"
@@ -68,7 +76,7 @@ node {
}
}
}
- }
+
}
/**
@@ -86,6 +94,11 @@ def writeSettingsXmlFile() {
" <username>${JENKINS_USERNAME}</username>\n" +
" <password>${JENKINS_PASSWORD}</password>\n" +
" </server>\n" +
+ " <server>\n" +
+ " <id>maven.jenkins-ci.org</id>\n" +
+ " <username>${JENKINS_USERNAME}</username>\n" +
+ " <password>${JENKINS_PASSWORD}</password>\n" +
+ " </server>\n" +
" </servers>\n" +
"\n" +
" <profiles>\n" +
