Skip to content

Commit 1f224ef

Browse files
authored
Create common.groovy
1 parent 649b558 commit 1f224ef

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

vars/common.groovy

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
def call(String stageName){
2+
3+
if ("${stageName}" == "Build")
4+
{
5+
sh "mvn clean package"
6+
}
7+
else if ("${stageName}" == "SonarQube Report")
8+
{
9+
sh "mvn clean sonar:sonar"
10+
}
11+
else if ("${stageName}" == "Upload Into Nexus")
12+
{
13+
sh "mvn clean deploy"
14+
}
15+
}

0 commit comments

Comments
 (0)