forked from buddy-works/simple-java-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
29 lines (24 loc) · 1010 Bytes
/
Jenkinsfile
File metadata and controls
29 lines (24 loc) · 1010 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
29
pipeline {
agent any
tools {
// Install the Maven version configured as "M3" and add it to the path.
maven "maven"
}
stages {
stage('Build') {
steps {
// Get some code from a GitHub repository
git 'https://github.com/ccfahe/DependencyTrackTest.git'
// Run Maven on a Unix agent.
sh "mvn -Dmaven.test.failure.ignore=true clean package"
// To run Maven on a Windows agent, use
// bat "mvn -Dmaven.test.failure.ignore=true clean package"
}
}
stage('Dependency Track Upload') {
steps {
dependencyTrackPublisher artifact: 'target/bom.xml', autoCreateProjects: true, dependencyTrackApiKey: 'deptrack', dependencyTrackFrontendUrl: '', dependencyTrackUrl: 'http://192.168.1.2:8888/', overrideGlobals: true, projectId: '5c7f470a-d554-4a95-8e17-f79f976d2e44', synchronous: true
}
}
}
}