-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathjanpipelinescript
More file actions
33 lines (30 loc) · 1.07 KB
/
janpipelinescript
File metadata and controls
33 lines (30 loc) · 1.07 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
pipeline {
agent any
stages {
stage('Clone Code') {
steps {
git 'https://github.com/ramdevops03/Development-Team-Repo.git'
}
}
stage('Build Application Code') {
steps {
sh 'mvn package -f pom.xml'
}
}
stage('Upload Artifact to Nexus') {
steps {
nexusArtifactUploader artifacts: [[artifactId: 'web', classifier: '', file: 'target/web.war', type: 'war']], credentialsId: 'nexus_user', groupId: 'project', nexusUrl: '44.203.179.219:8081/nexus', nexusVersion: 'nexus2', protocol: 'http', repository: 'releases', version: '2.3'
}
}
stage('Download artifact'){
steps {
sh 'wget http://44.203.179.219:8081/nexus/content/repositories/releases/project/web/2.3/web-2.3.war'
}
}
stage('Deploy Code In Tomcat Dev Server-1') {
steps {
sh 'cp web**.*.war /home/jenkins/apache-tomcat-8.5.84/webapps'
}
}
}
}