-
Notifications
You must be signed in to change notification settings - Fork 2
/
JenkinsFile.healthtest.Deprecated
145 lines (127 loc) · 7.28 KB
/
JenkinsFile.healthtest.Deprecated
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
node {
stage("Setup") {
deleteDir()
git([
url: "https://github.com/venicegeo/bftest-integration",
branch: "master"
])
}
def nodejs = tool 'NodeJS_6'
def root = pwd()
withEnv(["PATH+=${nodejs}/bin", "NPM_CONFIG_CACHE=${root}/.npmcache", "HOME=${WORKSPACE}"]) {
sh "mkdir -p ${root}/.npmcache"
sh "npm install newman"
sh "pwd"
sh "node -v"
sh "npm -v"
sh "newman -v"
}
try {
stage ("GeoAxis-Health-Check") {
withCredentials([file(credentialsId: '0efdaa83-18d6-4513-8a7c-c52ef5b07910', variable: 'GEOAXIS')]) {
withEnv(["PATH+=${nodejs}/bin"]) {
sh "pwd"
sh "curl -H 'Token: $GEOAXIS' https://gxisaccess.gxaccess.com/oam/servlet/CredCollector"
sh "/jslave/workspace/venice/beachfront/health-job/node_modules/newman/bin/newman.js -o results_GeoAxis.json --requestTimeout 240000 -x -g $GEOAXIS -c ./ci/Daily/collections/all/GeoAxis.postman_collection"
}
}
}
stage ("Geoserver-Int-Health-Check") {
withCredentials([file(credentialsId: '09e71c41-d5a2-4936-88b2-7b4497cfb1df', variable: 'GEOSERVER')]) {
withCredentials([file(credentialsId: '579f8660-01e6-4feb-8764-ec132432ebb1', variable: 'POSTMAN_FILE')]) {
withEnv(["PATH+=${nodejs}/bin"]) {
sh "pwd"
sh "curl -H 'Token: $GEOSERVER' http://gsn-geose-LoadBala-17USYYB36BFDL-1788485819.us-east-1.elb.amazonaws.com"
sh "ls -al /jslave/workspace/venice/beachfront/health-job/node_modules/newman/bin/"
sh "/jslave/workspace/venice/beachfront/health-job/node_modules/newman/bin/newman.js -o results_bf_ia_int.json --requestTimeout 240000 -x -e ./ci/Daily/environments/int.postman_environment -g $POSTMAN_FILE -c ./ci/Daily/collections/all/BF-IA-Broker_Daily.postman_collection"
sh "/jslave/workspace/venice/beachfront/health-job/node_modules/newman/bin/newman.js -o results_GeoServer.json --requestTimeout 240000 -x -g $GEOSERVER -c ./ci/Daily/collections/all/GeoServer.postman_collection"
}
}
}
}
stage ("Geoserver-Stage-Health-Check") {
withCredentials([file(credentialsId: '86f5b2c7-6006-4f8b-977f-49833fbc575c', variable: 'GEOSERVER')]) {
withCredentials([file(credentialsId: '579f8660-01e6-4feb-8764-ec132432ebb1', variable: 'POSTMAN_FILE')]) {
withEnv(["PATH+=${nodejs}/bin"]) {
sh "pwd"
sh "curl -H 'Token: $GEOSERVER' http://gsn-geose-loadbala-c826vph91bwm-584736092.us-east-1.elb.amazonaws.com/"
sh "ls -al /jslave/workspace/venice/beachfront/health-job/node_modules/newman/bin/"
sh "/jslave/workspace/venice/beachfront/health-job/node_modules/newman/bin/newman.js -o results_bf_ia_stage.json --requestTimeout 240000 -x -e ./ci/Daily/environments/stage.postman_environment -g $POSTMAN_FILE -c ./ci/Daily/collections/all/BF-IA-Broker_Daily.postman_collection"
sh "/jslave/workspace/venice/beachfront/health-job/node_modules/newman/bin/newman.js -o results_GeoServer.json --requestTimeout 240000 -x -g $GEOSERVER -c ./ci/Daily/collections/all/GeoServer.postman_collection"
}
}
}
}
stage ("Geoserver-Dev-Health-Check") {
withCredentials([file(credentialsId: 'a0ec53eb-c626-4f82-85d2-eaf4c0f1608b', variable: 'GEOSERVER')]) {
withCredentials([file(credentialsId: '579f8660-01e6-4feb-8764-ec132432ebb1', variable: 'POSTMAN_FILE')]) {
withEnv(["PATH+=${nodejs}/bin"]) {
sh "pwd"
sh "curl -H 'Token: $GEOSERVER' http://gsn-geose-loadbala-1kip17sjd2int-1731019158.us-east-1.elb.amazonaws.com/"
sh "ls -al /jslave/workspace/venice/beachfront/health-job/node_modules/newman/bin/"
sh "/jslave/workspace/venice/beachfront/health-job/node_modules/newman/bin/newman.js -o results_bf_ia_int.json --requestTimeout 240000 -x -e ./ci/Daily/environments/prod.postman_environment -g $POSTMAN_FILE -c ./ci/Daily/collections/all/BF-IA-Broker_Daily.postman_collection"
sh "/jslave/workspace/venice/beachfront/health-job/node_modules/newman/bin/newman.js -o results_GeoServer.json --requestTimeout 240000 -x -g $GEOSERVER -c ./ci/Daily/collections/all/GeoServer.postman_collection"
}
}
}
}
/* stage("Beachfront-Selenium-Test") {
if(!fileExists("integration-tests")) {
sh "mkdir -p integration-tests"
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${env.GX_TEST_USER}", usernameVariable: "bf_username", passwordVariable: "bf_password"],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${env.SAUCELAB_ACCESS}", usernameVariable: "sauce_user", passwordVariable: "sauce_key"],
[$class: 'StringBinding', credentialsId: "${env.PL_API_KEY}", variable: "PL_API_KEY"]
]) {
withEnv([
"PCF_SPACE=test"
]) {
dir ("integration-tests") {
if(env.INTEGRATION_GITLAB_CREDS) {
git url: "${env.INTEGRATION_GIT_URL}", branch: "${env.INTEGRATION_GIT_BRANCH}", credentialsId: "${env.INTEGRATION_GITLAB_CREDS}"
} else {
git url: "${env.INTEGRATION_GIT_URL}", branch: "${env.INTEGRATION_GIT_BRANCH}"
}
sh "chmod 700 ci/beachfront_ua_tests_int.sh"
sh "ci/beachfront_ua_tests_int.sh"
}
}
}
}
stage('Test') {
withCredentials([file(credentialsId: "${POSTMAN_SECRET_FILE}", variable: 'POSTMAN_FILE')]) {
withEnv(["PATH+=${root}/node_modules/newman/bin:${nodejs}/bin", "PCF_SPACE=test", "HOME=${root}"]) {
sh "npm install newman@2"
sh "sh ci/beachfront.sh"
}
}
}*/
stage('Bf-Integration-Test') {
withCredentials([file(credentialsId: '579f8660-01e6-4feb-8764-ec132432ebb1', variable: 'POSTMAN_FILE')]) {
withCredentials([string(credentialsId: 'e3799eb1-95df-4285-a24e-6721cd690daa', variable: 'bf_username')]) {
withCredentials([string(credentialsId: '40ce94f3-3c14-40d6-a75b-b48556a0c560', variable: 'bf_password')]) {
withCredentials([usernamePassword(credentialsId: '1ba84f72-0a02-45e2-8869-cfa62df01251', usernameVariable: 'sauce_user', passwordVariable: 'sauce_key')]) {
withCredentials([string(credentialsId: 'e5b7076b-885a-43ba-9626-30ff950bd790', variable: 'PL_API_KEY')]) {
withEnv(["PATH+=${root}/node_modules/newman/bin:${nodejs}/bin", "PCF_SPACE=test", "HOME=${root}"]) {
sh "npm install newman@2"
sh "sh ci/beachfront.sh"
}
}
}
}
}
}
}
}
catch (err) {
currentBuild.result = "FAILURE"
mail body: "project build error is here: ${env.BUILD_URL}" ,
subject: 'project build failed',
to: '[email protected]'
mail body: "project build error is here: ${env.BUILD_URL}" ,
subject: 'project build failed',
to: '[email protected]'
throw err
}
}