Skip to content

Commit 9b01226

Browse files
authored
Pnda 0001: Adding Jenkinsfile in order to easily work with Multibranch Pipeline (#1)
* Adding Jenkinsfile in order to easily work with Jenkins Multibrqnch Pipeline and have build/test steps in source control * removing BRANCH_NAME not used
1 parent 9d59554 commit 9b01226

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Jenkinsfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
node {
2+
3+
stage 'Build'
4+
def workspace = pwd()
5+
6+
sh '''
7+
echo $PWD
8+
echo $BRANCH_NAME
9+
cd $PWD@script/api;mvn versions:set -DnewVersion=$BRANCH_NAME
10+
mvn clean package
11+
'''
12+
13+
stage 'Test'
14+
sh '''
15+
cd $PWD@script/api/src/main/resources/;
16+
pylint_wrapper.py 10
17+
nosetests test_*.py
18+
'''
19+
20+
stage 'Deploy'
21+
build job: 'deploy-component', parameters: [[$class: 'StringParameterValue', name: 'branch', value: env.BRANCH_NAME],[$class: 'StringParameterValue', name: 'component', value: "deployment-manager"],[$class: 'StringParameterValue', name: 'release_path', value: "platform/releases"],[$class: 'StringParameterValue', name: 'release', value: "${workspace}@script/api/target/deployment-manager-${env.BRANCH_NAME}.tar.gz"]]
22+
23+
24+
}

0 commit comments

Comments
 (0)