-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathJenkinsfile
73 lines (70 loc) · 3.02 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* This program and the accompanying materials are made available and may be used, at your option, under either:
* - Eclipse Public License v2.0, available at https://www.eclipse.org/legal/epl-v20.html, OR
* - Apache License, version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/
pipeline {
agent { label 'zowe-agent' }
environment {
// z/OSMF Connection Details
ZOWE_OPT_HOST=credentials('eosHost')
}
stages {
stage('local setup') {
steps {
sh 'node --version'
sh 'npm --version'
sh 'zowe --version'
sh 'zowe plugins list'
sh 'npm install gulp-cli -g'
sh 'npm install'
//Create cics, db2, endevor, fmp, and zosmf profiles, env vars will provide host, user, and password details
sh 'zowe profiles create cics Jenkins --port 6000 --region-name CICSTRN1 --host dummy --user dummy --password dummy'
sh 'zowe profiles create db2 Jenkins --port 6017 --database D10CPTIB --host dummy --user dummy --password dummy'
sh 'zowe profiles create endevor Jenkins --port 6002 --protocol http --ru false --host dummy --user dummy --password dummy'
sh 'zowe profiles create endevor-location Marbles --instance ENDEVOR --env DEV --sys MARBLES --sub MARBLES --ccid JENKXX --comment JENKXX'
sh 'zowe profiles create fmp Jenkins --port 6001 --protocol https --ru false --host dummy --user dummy --password dummy'
sh 'zowe profiles create zosmf Jenkins --port 443 --ru false --host dummy --user dummy --password dummy'
}
}
stage('build') {
steps {
withCredentials([usernamePassword(credentialsId: 'eosCreds', usernameVariable: 'ZOWE_OPT_USER', passwordVariable: 'ZOWE_OPT_PASSWORD')]) {
sh 'gulp build'
}
}
}
stage('deploy') {
steps {
withCredentials([usernamePassword(credentialsId: 'eosCreds', usernameVariable: 'ZOWE_OPT_USER', passwordVariable: 'ZOWE_OPT_PASSWORD')]) {
sh 'gulp deploy'
}
}
}
stage('test') {
steps {
withCredentials([usernamePassword(credentialsId: 'eosCreds', usernameVariable: 'ZOWE_OPT_USER', passwordVariable: 'ZOWE_OPT_PASSWORD')]) {
sh 'npm test'
}
}
}
}
post {
always {
archiveArtifacts artifacts: '*-archive/**/*.*'
publishHTML([allowMissing: false,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: 'mochawesome-report',
reportFiles: 'mochawesome.html',
reportName: 'Test Results',
reportTitles: 'Test Report'
])
}
}
}