-
Notifications
You must be signed in to change notification settings - Fork 107
/
Jenkinsfile
51 lines (47 loc) · 1.47 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
node('slave1'){
def svcName = 'front'
def nsName = "front-testing-${env.BUILD_NUMBER}"
stage ('git'){
checkout scm
}
def image = ''
stage ('dockerize'){
image = docker.build "otomato/oto-${svcName}:${env.BUILD_NUMBER}"
}
stage ('push'){
image.push()
}
def APP_URL=''
stage ('deploy-to-testing'){
//sh "sed -i -- \'s/BUILD_NUMBER/${env.BUILD_NUMBER}/g\' ${svcName}-dep.yml"
//sh "kubectl create namespace ${nsName}"
//sh "kubectl apply -f mongodep.yml --validate=false -n ${nsName}"
//sh "kubectl apply -f ${svcName}-dep.yml --validate=false -n ${nsName}"
//get app url
//APP_URL = "<pending>"
//sleep 120
//while ( APP_URL == "<pending>"){
// APP_URL = sh returnStdout: true, script: "kubectl get svc ${svcName} --no-headers=true -n ${nsName} | awk '{print \$3}'"
// APP_URL = APP_URL.trim()
//}
// echo "url is ${APP_URL}"
echo 'This should bring up mocks or known good versions of products and orders'
echo 'Not implemented yet'
}
stage ('component-test'){
//withEnv(["APP_URL=${APP_URL}:8080"]) {
//sh "tests/ct/run.sh"
//}
echo 'Not implemented'
}
stage ('clean-up'){
//sh "kubectl delete ns ${nsName}"
echo 'TODO'
}
stage('deply-to-staging'){
sh "kubectl apply -f ${svcName}-dep.yml -n staging"
}
stage ('integration-test'){
echo "Not implemented"
}
}