-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathJenkinsfile_nexus
More file actions
28 lines (26 loc) · 975 Bytes
/
Jenkinsfile_nexus
File metadata and controls
28 lines (26 loc) · 975 Bytes
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
pipeline {
agent { label "agentA" }
triggers {
pollSCM('* * * * *')
}
stages {
stage('clone_project_A') {
steps {
echo 'clone project A'
git 'https://github.com/vincloud2/Helloworld-latest.git'
}
}
stage('build_project_A') {
steps {
echo 'build_projectA'
sh 'yum install maven -y'
sh 'mvn -Dmaven.test.failure.ignore=true install'
}
}
stage('upload to Nexus') {
steps {
nexusArtifactUploader artifacts: [[artifactId: 'helloworld', classifier: '', file: '/var/jenkins/workspace/mydocker_image_vinod/target/helloworld-1.1-SNAPSHOT.war', type: 'war']], credentialsId: 'adm_nexus', groupId: 'com.example', nexusUrl: '13.229.234.4:8081', nexusVersion: 'nexus3', protocol: 'http', repository: 'my_maven', version: '1.1-SNAPSHOT'
}
}
}
}