-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathJenkinsfile
More file actions
52 lines (47 loc) · 1.61 KB
/
Copy pathJenkinsfile
File metadata and controls
52 lines (47 loc) · 1.61 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
pipeline {
agent any
tools {
maven 'Maven 3'
jdk 'JDK17'
}
options {
buildDiscarder(logRotator(numToKeepStr: '10'))
timestamps()
}
stages {
stage('Build') {
steps {
sh 'mvn clean package'
}
}
stage('Integration Test') {
steps {
withCredentials([
usernamePassword(credentialsId: 'marketo-api', usernameVariable: 'MARKETO_CLIENT_ID', passwordVariable: 'MARKETO_CLIENT_SECRET')
]) {
sh '''
mvn -Pintegration-test clean verify \
-Dmarketo.identity=https://749-IOM-373.mktorest.com/identity \
-Dmarketo.rest=https://749-IOM-373.mktorest.com/rest \
-Dmarketo.clientId=${MARKETO_CLIENT_ID} \
-Dmarketo.clientSecret=${MARKETO_CLIENT_SECRET}
'''
}
}
}
stage('Publish') {
steps {
withCredentials([
usernamePassword(credentialsId: 'Artifactory file', usernameVariable: 'continuous_integration', passwordVariable: 'ci_pass')
]) {
withEnv(["artifactory_user=${continuous_integration}", "artifactory_password=${ci_pass}"]) {
sh '''
mvn deploy --settings .mvn/settings.xml \
-DskipTests
'''
}
}
}
}
}
}