-
Notifications
You must be signed in to change notification settings - Fork 39
/
Jenkinsfile
62 lines (54 loc) · 1.7 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
55
56
57
58
59
60
61
62
@Library('existing-build-control')
import static com.r3.build.BuildControl.killAllExistingBuildsForJob
killAllExistingBuildsForJob(env.JOB_NAME, env.BUILD_NUMBER.toInteger())
pipeline {
agent {
dockerfile {
filename '.ci/Dockerfile'
additionalBuildArgs "--build-arg USER=stresstester"
args '-v /var/run/docker.sock:/var/run/docker.sock --group-add 999'
}
}
options { timestamps() }
environment {
EXECUTOR_NUMBER = "${env.EXECUTOR_NUMBER}"
LOOPBACK_ADDRESS = "172.17.0.1"
ARTIFACTORY_CREDENTIALS = credentials('artifactory-credentials')
DOCKER_CREDENTIALS = credentials('docker-for-oracle-login')
}
stages {
stage("Auth Docker for Oracle Images") {
steps {
sh '''
docker login --username ${DOCKER_CREDENTIALS_USR} --password ${DOCKER_CREDENTIALS_PSW}
'''
}
}
stage('Unit Tests') {
steps {
timeout(30) {
sh "./gradlew clean test --info"
}
}
}
stage('Freighter Tests') {
steps {
timeout(30) {
sh '''
export ARTIFACTORY_USERNAME=\"\${ARTIFACTORY_CREDENTIALS_USR}\"
export ARTIFACTORY_PASSWORD=\"\${ARTIFACTORY_CREDENTIALS_PSW}\"
./gradlew freighterTest --info
'''
}
}
}
}
post {
always {
junit '**/build/test-results/**/*.xml'
}
cleanup {
deleteDir() /* clean up our workspace */
}
}
}