-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
40 lines (36 loc) · 913 Bytes
/
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
pipeline {
agent {
node {
label 'master'
}
}
environment {
PATH = "/root/apictl:$PATH"
}
options {
buildDiscarder logRotator(
daysToKeepStr: '16',
numToKeepStr: '10'
)
}
stages {
stage('Setup Environment for APICTL') {
steps {
sh """#!/bin/bash
ENVCOUNT=\$(apictl list envs --format {{.}} | wc -l)
if [ "\$ENVCOUNT" == "0" ]; then
apictl add-env -e live --apim https://localhost:9443
fi
"""
}
}
stage('Deploy APIs To "Live" Environment') {
steps {
sh """
apictl login live -u admin -p admin -k
apictl vcs deploy -e live
"""
}
}
}
}