-
Notifications
You must be signed in to change notification settings - Fork 532
Expand file tree
/
Copy pathJenkinsfile-testing
More file actions
31 lines (27 loc) · 983 Bytes
/
Copy pathJenkinsfile-testing
File metadata and controls
31 lines (27 loc) · 983 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
30
31
pipeline {
agent any
environment {
MSR_FQDN_PORT='nn7xxsg6lhesvjh3s-tytrtnlhpuc936zdn.labs.strigo.io:4443'
}
stages {
stage('Unit') {
environment {
MSR_ACCESS_KEY = credentials('jenkins-msr-access-token')
}
steps {
sh 'docker --context=testserver login -u jenkins -p ${MSR_ACCESS_KEY} ${MSR_FQDN_PORT}'
sh 'docker --context=testserver image pull ${MSR_FQDN_PORT}/engineering/api-test:${TAG}'
sh 'kubectl run $(echo $TAG | tr . -) \
-n testing \
--restart=Never --attach=True \
--overrides=\'{"apiVersion": "v1", "spec": {"nodeSelector": { "kubernetes.io/hostname": "testing" }}}\' \
--image=${MSR_FQDN_PORT}/engineering/api-test:${TAG}'
}
}
}
post {
always{
sh 'rm -rf ${WORKSPACE}/*'
}
}
}