-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathJenkinsfile
36 lines (36 loc) · 1.03 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
pipeline {
agent any
environment {
CI = 'true'
API = './SwaggerPetstore'
}
stages {
stage('Setup APIM Environments'){
steps{
withCredentials([usernamePassword(credentialsId: 'apim', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh './config.sh'
}
}
}
stage('Deploy to Test') {
environment{
ENV = 'test'
RETRY = '80'
}
steps {
echo 'Deploying to Test'
sh 'apimcli import-api -f $API -e $ENV -k --preserve-provider=false --update --verbose'
}
}
stage('Deploy to Production') {
environment{
ENV = 'prod'
RETRY = '60'
}
steps {
echo 'Deploying to Production'
sh 'apimcli import-api -f $API -e $ENV -k --preserve-provider=false --update --verbose'
}
}
}
}