@@ -3,12 +3,11 @@ import com.genesys.jenkins.Service
3
3
4
4
def notifications = null
5
5
String [] mailingList = [
6
-
7
-
6
+
8
7
]
9
8
10
9
def isReleaseBranch () {
11
- return env. SHORT_BRANCH . equals(' main' ) || env. SHORT_BRANCH . equals(' master' );
10
+ return env. SHORT_BRANCH . equals(' main' ) || env. SHORT_BRANCH . equals(' master' )
12
11
}
13
12
14
13
pipeline {
@@ -19,9 +18,9 @@ pipeline {
19
18
}
20
19
21
20
environment {
22
- NPM_UTIL_PATH = " npm-utils"
23
- REPO_DIR = " repo"
24
- SHORT_BRANCH = env. GIT_BRANCH . replaceFirst(/ ^origin\/ / , ' ' );
21
+ NPM_UTIL_PATH = ' npm-utils'
22
+ REPO_DIR = ' repo'
23
+ SHORT_BRANCH = env. GIT_BRANCH . replaceFirst(/ ^origin\/ / , ' ' )
25
24
NPM_TOKEN = credentials(' 2844c47b-19b8-4c5f-b901-190de49c0883' )
26
25
ARTIFACTORY = credentials(' 14645c89-70a0-4b46-a8a2-2f0a580d13dd' )
27
26
}
@@ -78,26 +77,26 @@ pipeline {
78
77
dir(env. REPO_DIR ) {
79
78
// Create an npmrc file, just so we can install deps cleanly from artifactory
80
79
sh " ${ env.WORKSPACE} /${ env.NPM_UTIL_PATH} /scripts/jenkins-create-npmrc.sh"
81
- sh " npm ci"
80
+ sh ' npm ci'
82
81
}
83
82
}
84
83
}
85
84
86
85
stage(' Check' ) {
87
86
steps {
88
87
dir(env. REPO_DIR ) {
89
- sh " npm run lint"
90
- sh " npm run test"
88
+ sh ' npm run lint'
89
+ sh ' npm run test'
91
90
}
92
91
}
93
92
}
94
93
95
94
stage(' Build' ) {
96
95
steps {
97
96
dir(env. REPO_DIR ) {
98
- sh " npm run release"
99
- sh " npm run sync-versions"
100
- sh " npm run build"
97
+ sh ' npm run release'
98
+ sh ' npm run sync-versions'
99
+ sh ' npm run build'
101
100
}
102
101
}
103
102
}
@@ -112,7 +111,7 @@ pipeline {
112
111
echo "registry=https://registry.npmjs.org" >> ./.npmrc
113
112
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ./.npmrc
114
113
'''
115
- sh " npm run publish.iframe-coordinator"
114
+ sh ' npm run publish.iframe-coordinator'
116
115
sh('''
117
116
RELEASE_VERSION="$(npm run --silent current-version --workspace=iframe-coordinator)"
118
117
npm install --no-progress -P -E iframe-coordinator@$RELEASE_VERSION --workspace=iframe-coordinator-cli
@@ -121,19 +120,19 @@ pipeline {
121
120
git commit --amend --no-edit --no-verify
122
121
git tag -fa v$RELEASE_VERSION -m "chore(release): $RELEASE_VERSION"
123
122
''' )
124
- sh " npm run publish.iframe-coordinator-cli"
125
- sshagent (credentials : [' 3aa16916-868b-4290-a9ee-b1a05343667e' ]) {
123
+ sh ' npm run publish.iframe-coordinator-cli'
124
+ sshagent(credentials : [' 3aa16916-868b-4290-a9ee-b1a05343667e' ]) {
126
125
sh " git push --follow-tags -u origin ${ env.SHORT_BRANCH} "
127
126
}
128
- }
127
+ }
129
128
}
130
129
}
131
130
132
131
stage(' Build Docs' ) {
133
132
steps {
134
- dir (env. REPO_DIR ) {
135
- sh " npm run doc"
136
- sh " ./scripts/generate-deploy-files"
133
+ dir(env. REPO_DIR ) {
134
+ sh ' npm run doc'
135
+ sh ' ./scripts/generate-deploy-files'
137
136
sh '''
138
137
export CDN_ROOT=$(npx --package=@purecloud/web-app-deploy@8 -- cached-asset-prefix --ecosystem pc --manifest dist/docs/manifest.json)
139
138
./scripts/prepare-docs
@@ -147,7 +146,7 @@ pipeline {
147
146
expression { isReleaseBranch() }
148
147
}
149
148
steps {
150
- dir (env. REPO_DIR ) {
149
+ dir(env. REPO_DIR ) {
151
150
sh '''
152
151
npx --package=@purecloud/web-app-deploy@8 -- upload \
153
152
--ecosystem pc \
@@ -163,7 +162,7 @@ pipeline {
163
162
expression { isReleaseBranch() }
164
163
}
165
164
steps {
166
- dir (env. REPO_DIR ) {
165
+ dir(env. REPO_DIR ) {
167
166
sh '''
168
167
npx --package=@purecloud/web-app-deploy@8 -- deploy \
169
168
--ecosystem pc \
@@ -178,13 +177,13 @@ pipeline {
178
177
post {
179
178
fixed {
180
179
script {
181
- notifications. emailResults(mailingList. join(" " ))
180
+ notifications. emailResults(mailingList. join(' ' ))
182
181
}
183
182
}
184
183
185
184
failure {
186
185
script {
187
- notifications. emailResults(mailingList. join(" " ))
186
+ notifications. emailResults(mailingList. join(' ' ))
188
187
}
189
188
}
190
189
}
0 commit comments