Hi,
We update jenkins to 2.4.0 version ,and use Blue Ocean feature, when we
create a new Multibranch Pipeline,the pipeline can not generate the branch
job with Jenkinsfile,the Floder is empty
This is our Jenkinsfile:
###
#!Groovy
node {
//gloable
def workspace = '''$WORKSPACE'''
checkout scm
stage('Build') {
// Run the maven build
sh "'mvn' clean package -Ptest -Dmaven.test.skip=true -U"
}
stage('Artifacts') {
archiveArtifacts 'target/*.war'
}
stage('test&sonar'){
sh "cd ${WORKSPACE}"
//kill process
sh '''ps -ef | grep 8090 | grep -v grep | awk '{print $2}' | sed -e
"s/^/kill -9 /g" | sh -'''
//excute junit
sh '''mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install
-Pcoverage-per-test'''
//update data to sonar server
sh '''mvn sonar:sonar'''
}
stage('Deploy'){
//clean env
sh '''rm -rf /data/tomcat-bi-support-8090/temp/*
rm -rf /data/tomcat-bi-support-8090/work/*
rm -rf /data/tomcat-bi-support-8090/webapps/*
'''
sh '''Pid=$(netstat -nlp | grep 8090 | awk '{print $7}' | awk -F"/" '{
print $1 }')
if [ ! $Pid ]; then
echo "PID is NONE"
else
echo $Pid
kill -9 $Pid
fi
'''
sh "cp ${workspace}/target/*.war
/data/tomcat-bi-support-8090/webapps/bi-support.war"
sh '''/data/tomcat-bi-support-8090/bin/startup.sh'''
}
}
####
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/a861c2a4-7e05-4adb-945f-d2b2fb6e9fd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.