-
Notifications
You must be signed in to change notification settings - Fork 5
/
Jenkinsfile
67 lines (55 loc) · 2.01 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
#!groovy
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright IBM Corporation 2018, 2019
*/
node('zowe-jenkins-agent') {
def lib = library("jenkins-library").org.zowe.jenkins_shared_library
def pipeline = lib.pipelines.nodejs.NodeJSPipeline.new(this)
pipeline.admins.add("jackjia", "jcain")
pipeline.setup(
packageName: 'org.zowe.explorer-jes',
github: [
email : lib.Constants.DEFAULT_GITHUB_ROBOT_EMAIL,
usernamePasswordCredential : lib.Constants.DEFAULT_GITHUB_ROBOT_CREDENTIAL,
],
artifactory: [
url : lib.Constants.DEFAULT_LFJ_ARTIFACTORY_URL,
usernamePasswordCredential : lib.Constants.DEFAULT_LFJ_ARTIFACTORY_ROBOT_CREDENTIAL,
],
publishRegistry: [
email : lib.Constants.DEFAULT_LFJ_NPM_PRIVATE_REGISTRY_EMAIL,
usernamePasswordCredential : lib.Constants.DEFAULT_LFJ_NPM_PRIVATE_REGISTRY_CREDENTIAL,
],
// FIXME: ideally this should set to false (using default by remove this line)
ignoreAuditFailure : true,
// FIXME: npm run lint failed
disableLint : true
)
// we have a custom build command
pipeline.build()
pipeline.test(
name : 'Missing',
operation : {
echo 'Under construction.'
},
allowMissingJunit : true
)
// we need sonar scan
pipeline.sonarScan(
scannerTool : lib.Constants.DEFAULT_LFJ_SONARCLOUD_SCANNER_TOOL,
scannerServer : lib.Constants.DEFAULT_LFJ_SONARCLOUD_SERVER,
allowBranchScan : lib.Constants.DEFAULT_LFJ_SONARCLOUD_ALLOW_BRANCH,
failBuild : lib.Constants.DEFAULT_LFJ_SONARCLOUD_FAIL_BUILD
)
// define we need publish stage
pipeline.publish()
// define we need release stage
pipeline.release()
pipeline.end()
}