-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
54 lines (49 loc) · 1.59 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
pipeline {
agent any
stages {
stage ('Clone') {
steps {
git branch: 'master', url: "https://github.com/jfrog/project-examples.git"
}
}
stage ('Artifactory configuration') {
steps {
rtServer (
id: "ARTIFACTORY_SERVER",
url: SERVER_URL,
credentialsId: CREDENTIALS
)
rtMavenDeployer (
id: "MAVEN_DEPLOYER",
serverId: "ARTIFACTORY_SERVER",
releaseRepo: ARTIFACTORY_LOCAL_RELEASE_REPO,
snapshotRepo: ARTIFACTORY_LOCAL_SNAPSHOT_REPO
)
rtMavenResolver (
id: "MAVEN_RESOLVER",
serverId: "ARTIFACTORY_SERVER",
releaseRepo: ARTIFACTORY_VIRTUAL_RELEASE_REPO,
snapshotRepo: ARTIFACTORY_VIRTUAL_SNAPSHOT_REPO
)
}
}
stage ('Exec Maven') {
steps {
rtMavenRun (
tool: MAVEN_TOOL, // Tool name from Jenkins configuration
pom: 'maven-examples/maven-example/pom.xml',
goals: 'clean install',
deployerId: "MAVEN_DEPLOYER",
resolverId: "MAVEN_RESOLVER"
)
}
}
stage ('Publish build info') {
steps {
rtPublishBuildInfo (
serverId: "ARTIFACTORY_SERVER"
)
}
}
}
}