forked from sabley/WebGoat-Legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkinsfile
24 lines (24 loc) · 1.57 KB
/
jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
node {
stage ('Build') {
//createTag nexusInstanceId: 'nx3', tagAttributesJson: '{"createdBy" : "JohnSmith"}', tagName: 'build-126'
}
stage ('scan with iq with build policies') {
nexusPolicyEvaluation failBuildOnNetworkError: false, iqApplication: selectedApplication('sandbox-application'), iqStage: 'build', jobCredentialsId: ''
}
stage ('Publish to Nexus build repository') {
//sh 'pwd'
nexusArtifactUploader artifacts: [[artifactId: 'webgoat.war', classifier: '', file: 'target/WebGoat-6.0.1.war', type: 'war']], credentialsId: '932ea8f1-36d6-456c-9796-16e07ad958ee', groupId: 'com.mycompany', nexusUrl: 'localhost:8081', nexusVersion: 'nexus3', protocol: 'http', repository: 'maven-releases', version: '1.1'
sh './associate.sh'
//sh './associate.sh'
//nexusPublisher nexusInstanceId: 'nx3', nexusRepositoryId: 'maven-releases', packages: [[$class: 'MavenPackage', mavenAssetList: [[classifier: '', extension: '', filePath: 'target/WebGoat-6.0.1.war']], mavenCoordinate: [artifactId: 'fancyWidget', groupId: 'com.mycompany', packaging: 'war', version: '1.1']]], tagName: 'build-126'
}
stage ('move to test repository') {
//sh './associate.sh'
nexusPolicyEvaluation failBuildOnNetworkError: false, iqApplication: selectedApplication('sandbox-application'), iqStage: 'release', jobCredentialsId: ''
sh './move.sh'
//moveComponents destination: 'maven-test', nexusInstanceId: 'nx3', tagName: 'build-126'
}
//stage ('move to test repository') {
//sh './move.sh'
//}
}