forked from ifediniru/docker_local
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
41 lines (41 loc) · 1.3 KB
/
Jenkinsfile
File metadata and controls
41 lines (41 loc) · 1.3 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
pipeline{
agent { label 'node_aws'}
tools {
maven 'maven3.9'
}
stages{
stage('Code checkout'){
steps{
echo "checking out code"
git branch: 'main', url: 'https://github.com/ifediniru/docker_local.git'
}
}
stage('Maven Build'){
steps{
echo "Building source code using Maven from Jenkins file"
sh "mvn clean package"
// sh "mvn package"
echo "Building source code using Maven was successful"
}
}
stage('Sonarqube Analysis'){
steps{
echo "Analysing Sourcecode"
// sh "mvn sonar:sonar -Dsonar.qualitygate.wait=true"
}
}
stage('Artifact Management'){
steps{
echo "Pushing artifacts to Nexus"
// sh "mvn deploy -s ./settings.xml"
}
}
stage('Tomcat Deploy'){
steps{
echo "Deploying Application to Tomcat"
// sh "rm -rf '/tmp/demojenkins'"
deploy adapters: [tomcat9(credentialsId: 'tomcat2', path: '', url: 'https://98df-142-198-195-76.ngrok-free.app')], contextPath: null, war: 'target/*.war'
}
}
}
}