@mojaloop/sdk-scheme-adapter 17.0.1 → 17.0.2-snapshot.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +456 -171
- package/Dockerfile +4 -0
- package/audit-resolve.json +27 -68
- package/package.json +17 -16
- package/src/lib/model/AccountsModel.js +4 -7
- package/src/lib/model/Async2SyncModel.js +4 -3
- package/src/lib/model/InboundTransfersModel.js +16 -14
- package/src/lib/model/OutboundBulkQuotesModel.js +4 -7
- package/src/lib/model/OutboundBulkTransfersModel.js +4 -7
- package/src/lib/model/OutboundRequestToPayModel.js +5 -10
- package/src/lib/model/OutboundRequestToPayTransferModel.js +6 -12
- package/src/lib/model/OutboundTransfersModel.js +10 -9
- package/src/lib/model/common/BackendError.js +1 -13
- package/src/lib/model/common/Enums.js +30 -0
- package/src/lib/model/common/index.js +3 -2
- package/test/integration/lib/Outbound/parties.test.js +2 -1
- package/test/integration/lib/Outbound/quotes.test.js +3 -1
- package/test/integration/lib/Outbound/simpleTransfers.test.js +2 -1
- package/test/unit/inboundApi/handlers.test.js +3 -1
- package/test/unit/lib/model/AccountsModel.test.js +2 -1
- package/test/unit/lib/model/InboundTransfersModel.test.js +10 -6
- package/test/unit/lib/model/OutboundBulkQuotesModel.test.js +5 -3
- package/test/unit/lib/model/OutboundBulkTransfersModel.test.js +4 -3
- package/test/unit/lib/model/OutboundRequestToPayModel.test.js +3 -2
- package/test/unit/lib/model/OutboundRequestToPayTransferModel.test.js +4 -3
- package/test/unit/lib/model/OutboundTransfersModel.test.js +37 -34
- package/test/unit/lib/model/PartiesModel.test.js +2 -1
- package/test/unit/lib/model/QuotesModel.test.js +2 -1
- package/test/unit/lib/model/TransfersModel.test.js +2 -1
- package/test/unit/lib/model/data/getBulkTransfersBackendResponse.json +1 -1
- package/test/unit/lib/model/data/getBulkTransfersMojaloopResponse.json +1 -1
package/.circleci/config.yml
CHANGED
|
@@ -7,11 +7,10 @@ version: 2.1
|
|
|
7
7
|
# Orbs used in this pipeline
|
|
8
8
|
###
|
|
9
9
|
orbs:
|
|
10
|
-
anchore: anchore/anchore-engine@1.
|
|
11
|
-
slack: circleci/slack@3.
|
|
12
|
-
pr-tools: mojaloop/pr-tools@0.1.10
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
anchore: anchore/anchore-engine@1.9.0
|
|
11
|
+
slack: circleci/slack@4.9.3 # Ref: https://github.com/mojaloop/ci-config/tree/master/slack-templates
|
|
12
|
+
pr-tools: mojaloop/pr-tools@0.1.10 # Ref: https://github.com/mojaloop/ci-config/
|
|
13
|
+
gh: circleci/github-cli@2.1.0
|
|
15
14
|
|
|
16
15
|
##
|
|
17
16
|
# defaults
|
|
@@ -19,24 +18,18 @@ orbs:
|
|
|
19
18
|
# YAML defaults templates, in alphabetical order
|
|
20
19
|
##
|
|
21
20
|
defaults_Dependencies: &defaults_Dependencies |
|
|
21
|
+
apk --no-cache add bash
|
|
22
22
|
apk --no-cache add git
|
|
23
23
|
apk --no-cache add ca-certificates
|
|
24
24
|
apk --no-cache add curl
|
|
25
25
|
apk --no-cache add openssh-client
|
|
26
|
-
apk --no-cache
|
|
27
|
-
apk add --no-cache -t
|
|
26
|
+
apk add --no-cache -t build-dependencies make gcc g++ python3 libtool autoconf automake jq
|
|
27
|
+
apk add --no-cache -t openssl ncurses coreutils libgcc linux-headers grep util-linux binutils findutils
|
|
28
28
|
npm config set unsafe-perm true
|
|
29
29
|
npm install -g node-gyp
|
|
30
30
|
|
|
31
31
|
defaults_awsCliDependencies: &defaults_awsCliDependencies |
|
|
32
|
-
apk
|
|
33
|
-
apk --no-cache add \
|
|
34
|
-
python3 \
|
|
35
|
-
py3-pip \
|
|
36
|
-
groff \
|
|
37
|
-
less \
|
|
38
|
-
mailcap
|
|
39
|
-
pip3 install --upgrade pip awscli==1.14.5 s3cmd==2.0.1 python-magic
|
|
32
|
+
apk --no-cache add aws-cli
|
|
40
33
|
|
|
41
34
|
defaults_license_scanner: &defaults_license_scanner
|
|
42
35
|
name: Install and set up license-scanner
|
|
@@ -44,10 +37,12 @@ defaults_license_scanner: &defaults_license_scanner
|
|
|
44
37
|
git clone https://github.com/mojaloop/license-scanner /tmp/license-scanner
|
|
45
38
|
cd /tmp/license-scanner && make build default-files set-up
|
|
46
39
|
|
|
40
|
+
## remove
|
|
47
41
|
defaults_npm_auth: &defaults_npm_auth
|
|
48
42
|
name: Update NPM registry auth token
|
|
49
43
|
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
|
|
50
44
|
|
|
45
|
+
## remove
|
|
51
46
|
defaults_npm_publish_release: &defaults_npm_publish_release
|
|
52
47
|
name: Publish NPM $RELEASE_TAG artifact
|
|
53
48
|
command: |
|
|
@@ -55,6 +50,31 @@ defaults_npm_publish_release: &defaults_npm_publish_release
|
|
|
55
50
|
echo "Publishing tag $RELEASE_TAG"
|
|
56
51
|
npm publish --tag $RELEASE_TAG --access public
|
|
57
52
|
|
|
53
|
+
defaults_export_version_from_package: &defaults_export_version_from_package
|
|
54
|
+
name: Format the changelog into the github release body and get release tag
|
|
55
|
+
command: |
|
|
56
|
+
git diff --no-indent-heuristic master~1 HEAD CHANGELOG.md | sed -n '/^+[^+]/ s/^+//p' > /tmp/changes
|
|
57
|
+
echo 'export RELEASE_CHANGES=`cat /tmp/changes`' >> $BASH_ENV
|
|
58
|
+
echo 'export RELEASE_TAG=`cat package-lock.json | jq -r .version`' >> $BASH_ENV
|
|
59
|
+
|
|
60
|
+
defaults_configure_git: &defaults_configure_git
|
|
61
|
+
name: Configure git
|
|
62
|
+
command: |
|
|
63
|
+
git config user.email ${GIT_CI_EMAIL}
|
|
64
|
+
git config user.name ${GIT_CI_USER}
|
|
65
|
+
|
|
66
|
+
defaults_configure_nvm: &defaults_configure_nvm
|
|
67
|
+
name: Configure NVM
|
|
68
|
+
command: |
|
|
69
|
+
touch $HOME/.profile
|
|
70
|
+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
|
|
71
|
+
export NVM_DIR="$HOME/.nvm"
|
|
72
|
+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
73
|
+
echo "Installing Node version: $(cat .nvmrc)"
|
|
74
|
+
nvm install $(cat .nvmrc)
|
|
75
|
+
nvm alias default $(cat .nvmrc)
|
|
76
|
+
nvm use $(cat .nvmrc)
|
|
77
|
+
|
|
58
78
|
##
|
|
59
79
|
# Executors
|
|
60
80
|
#
|
|
@@ -64,11 +84,11 @@ executors:
|
|
|
64
84
|
default-docker:
|
|
65
85
|
working_directory: /home/circleci/project
|
|
66
86
|
docker:
|
|
67
|
-
- image: node:16.15.0-alpine
|
|
87
|
+
- image: node:16.15.0-alpine # Ref: https://hub.docker.com/_/node?tab=tags&page=1&name=alpine
|
|
68
88
|
|
|
69
89
|
default-machine:
|
|
70
90
|
machine:
|
|
71
|
-
image: ubuntu-2004:
|
|
91
|
+
image: ubuntu-2004:current # Ref: https://circleci.com/developer/machine/image/ubuntu-2004
|
|
72
92
|
|
|
73
93
|
##
|
|
74
94
|
# Jobs
|
|
@@ -84,19 +104,45 @@ jobs:
|
|
|
84
104
|
command: *defaults_Dependencies
|
|
85
105
|
- checkout
|
|
86
106
|
- run:
|
|
87
|
-
|
|
88
|
-
command: cd $(npm root -g)/npm
|
|
107
|
+
<<: *defaults_configure_nvm
|
|
89
108
|
- run:
|
|
90
|
-
name: Update NPM install
|
|
109
|
+
name: Update NPM install
|
|
91
110
|
command: npm ci
|
|
92
|
-
- run:
|
|
93
|
-
name: Delete build dependencies
|
|
94
|
-
command: apk del build-dependencies
|
|
95
111
|
- save_cache:
|
|
96
112
|
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
97
113
|
paths:
|
|
98
114
|
- node_modules
|
|
99
115
|
|
|
116
|
+
test-dependencies:
|
|
117
|
+
executor: default-docker
|
|
118
|
+
steps:
|
|
119
|
+
- run:
|
|
120
|
+
name: Install general dependencies
|
|
121
|
+
command: *defaults_Dependencies
|
|
122
|
+
- checkout
|
|
123
|
+
- run:
|
|
124
|
+
<<: *defaults_configure_nvm
|
|
125
|
+
- restore_cache:
|
|
126
|
+
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
127
|
+
- run:
|
|
128
|
+
name: Execute dependency tests
|
|
129
|
+
command: npm run dep:check
|
|
130
|
+
|
|
131
|
+
test-lint:
|
|
132
|
+
executor: default-docker
|
|
133
|
+
steps:
|
|
134
|
+
- run:
|
|
135
|
+
name: Install general dependencies
|
|
136
|
+
command: *defaults_Dependencies
|
|
137
|
+
- checkout
|
|
138
|
+
- run:
|
|
139
|
+
<<: *defaults_configure_nvm
|
|
140
|
+
- restore_cache:
|
|
141
|
+
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
142
|
+
- run:
|
|
143
|
+
name: Execute lint tests
|
|
144
|
+
command: npm run lint
|
|
145
|
+
|
|
100
146
|
test-unit:
|
|
101
147
|
executor: default-docker
|
|
102
148
|
steps:
|
|
@@ -104,6 +150,8 @@ jobs:
|
|
|
104
150
|
name: Install general dependencies
|
|
105
151
|
command: *defaults_Dependencies
|
|
106
152
|
- checkout
|
|
153
|
+
- run:
|
|
154
|
+
<<: *defaults_configure_nvm
|
|
107
155
|
- restore_cache:
|
|
108
156
|
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
109
157
|
- run:
|
|
@@ -119,20 +167,9 @@ jobs:
|
|
|
119
167
|
steps:
|
|
120
168
|
- checkout
|
|
121
169
|
- run:
|
|
122
|
-
|
|
123
|
-
command: |
|
|
124
|
-
curl -L https://github.com/docker/compose/releases/download/1.28.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
|
|
125
|
-
chmod +x ~/docker-compose
|
|
126
|
-
sudo mv ~/docker-compose /usr/local/bin/docker-compose
|
|
170
|
+
<<: *defaults_configure_nvm
|
|
127
171
|
- restore_cache:
|
|
128
172
|
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
129
|
-
- run:
|
|
130
|
-
name: Set up NVM
|
|
131
|
-
command: |
|
|
132
|
-
echo ${NVM_DIR}
|
|
133
|
-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
134
|
-
nvm install v16.14
|
|
135
|
-
nvm alias default v16.14
|
|
136
173
|
- run:
|
|
137
174
|
name: Start docker-compose
|
|
138
175
|
command: |
|
|
@@ -176,24 +213,6 @@ jobs:
|
|
|
176
213
|
name: Execute unit tests
|
|
177
214
|
command: npm run build:openapi && npm run validate:api
|
|
178
215
|
|
|
179
|
-
lint:
|
|
180
|
-
executor: default-docker
|
|
181
|
-
steps:
|
|
182
|
-
- run:
|
|
183
|
-
name: Install general dependencies
|
|
184
|
-
command: *defaults_Dependencies
|
|
185
|
-
- checkout
|
|
186
|
-
- restore_cache:
|
|
187
|
-
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
188
|
-
- run:
|
|
189
|
-
name: Create dir for lint results
|
|
190
|
-
command: mkdir -p /lintresults
|
|
191
|
-
- run:
|
|
192
|
-
name: Execute linting
|
|
193
|
-
command: (npm run lint > /lintresults/results.txt)
|
|
194
|
-
- store_artifacts:
|
|
195
|
-
path: /lintresults
|
|
196
|
-
|
|
197
216
|
vulnerability-check:
|
|
198
217
|
executor: default-docker
|
|
199
218
|
steps:
|
|
@@ -201,6 +220,8 @@ jobs:
|
|
|
201
220
|
name: Install general dependencies
|
|
202
221
|
command: *defaults_Dependencies
|
|
203
222
|
- checkout
|
|
223
|
+
- run:
|
|
224
|
+
<<: *defaults_configure_nvm
|
|
204
225
|
- restore_cache:
|
|
205
226
|
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
206
227
|
- run:
|
|
@@ -211,6 +232,7 @@ jobs:
|
|
|
211
232
|
command: npm run audit:check --silent -- --json > ./audit/results/auditResults.json
|
|
212
233
|
- store_artifacts:
|
|
213
234
|
path: ./audit/results
|
|
235
|
+
prefix: audit
|
|
214
236
|
|
|
215
237
|
audit-licenses:
|
|
216
238
|
executor: default-docker
|
|
@@ -232,27 +254,9 @@ jobs:
|
|
|
232
254
|
- store_artifacts:
|
|
233
255
|
path: /tmp/license-scanner/results
|
|
234
256
|
|
|
235
|
-
build-local:
|
|
236
|
-
executor: default-machine
|
|
237
|
-
steps:
|
|
238
|
-
- checkout
|
|
239
|
-
- run:
|
|
240
|
-
name: Build Docker local image for testing
|
|
241
|
-
command: |
|
|
242
|
-
echo "Building Docker image: local"
|
|
243
|
-
docker build -t mojaloop/$CIRCLE_PROJECT_REPONAME:local .
|
|
244
|
-
- run:
|
|
245
|
-
name: Save docker image to workspace
|
|
246
|
-
command: docker save -o /tmp/docker-image.tar mojaloop/$CIRCLE_PROJECT_REPONAME:local
|
|
247
|
-
- persist_to_workspace:
|
|
248
|
-
root: /tmp
|
|
249
|
-
paths:
|
|
250
|
-
- ./docker-image.tar
|
|
251
|
-
|
|
252
257
|
license-scan:
|
|
253
258
|
executor: default-machine
|
|
254
259
|
steps:
|
|
255
|
-
- checkout
|
|
256
260
|
- attach_workspace:
|
|
257
261
|
at: /tmp
|
|
258
262
|
- run:
|
|
@@ -262,15 +266,39 @@ jobs:
|
|
|
262
266
|
<<: *defaults_license_scanner
|
|
263
267
|
- run:
|
|
264
268
|
name: Run the license-scanner
|
|
265
|
-
command: cd /tmp/license-scanner && mode=docker dockerImages
|
|
269
|
+
command: cd /tmp/license-scanner && mode=docker dockerImages=$DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG make run
|
|
266
270
|
- store_artifacts:
|
|
267
271
|
path: /tmp/license-scanner/results
|
|
272
|
+
prefix: licenses
|
|
268
273
|
|
|
269
274
|
image-scan:
|
|
270
275
|
executor: anchore/anchore_engine
|
|
271
276
|
steps:
|
|
272
277
|
- setup_remote_docker
|
|
273
278
|
- checkout
|
|
279
|
+
- run:
|
|
280
|
+
name: Setup Slack config
|
|
281
|
+
command: |
|
|
282
|
+
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
|
|
283
|
+
echo "export SLACK_RELEASE_TYPE='GitHub Release'" >> $BASH_ENV
|
|
284
|
+
echo "export SLACK_RELEASE_TAG='${RELEASE_TAG} on ${CIRCLE_BRANCH} branch'" >> $BASH_ENV
|
|
285
|
+
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
|
|
286
|
+
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
|
|
287
|
+
echo "export SLACK_CUSTOM_MSG='Anchore Image Scan failed for: \`${DOCKER_ORG}/${CIRCLE_PROJECT_REPONAME}:${CIRCLE_TAG}\`'" >> $BASH_ENV
|
|
288
|
+
- run:
|
|
289
|
+
name: Install docker dependencies for anchore
|
|
290
|
+
command: |
|
|
291
|
+
apk add --update py-pip docker python3-dev libffi-dev openssl-dev gcc libc-dev make jq npm
|
|
292
|
+
- run:
|
|
293
|
+
name: Install general dependencies
|
|
294
|
+
command: |
|
|
295
|
+
apk --no-cache add git
|
|
296
|
+
apk --no-cache add ca-certificates
|
|
297
|
+
apk --no-cache add curl
|
|
298
|
+
apk --no-cache add openssh-client
|
|
299
|
+
apk add --no-cache -t build-dependencies make gcc g++ python3 libtool autoconf automake
|
|
300
|
+
npm config set unsafe-perm true
|
|
301
|
+
npm install -g node-gyp
|
|
274
302
|
- run:
|
|
275
303
|
name: Install AWS CLI dependencies
|
|
276
304
|
command: *defaults_awsCliDependencies
|
|
@@ -279,42 +307,78 @@ jobs:
|
|
|
279
307
|
- run:
|
|
280
308
|
name: Load the pre-built docker image from workspace
|
|
281
309
|
command: docker load -i /tmp/docker-image.tar
|
|
310
|
+
- run:
|
|
311
|
+
name: Download the mojaloop/ci-config repo
|
|
312
|
+
command: |
|
|
313
|
+
git clone https://github.com/mojaloop/ci-config /tmp/ci-config
|
|
314
|
+
# Generate the mojaloop anchore-policy
|
|
315
|
+
cd /tmp/ci-config/container-scanning && ./mojaloop-policy-generator.js /tmp/mojaloop-policy.json
|
|
316
|
+
- run:
|
|
317
|
+
name: Pull base image locally
|
|
318
|
+
command: |
|
|
319
|
+
docker pull node:16.15.0-alpine
|
|
320
|
+
# Analyze the base and derived image
|
|
321
|
+
# Note: It seems images are scanned in parallel, so preloading the base image result doesn't give us any real performance gain
|
|
282
322
|
- anchore/analyze_local_image:
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
323
|
+
# Force the older version, version 0.7.0 was just published, and is broken
|
|
324
|
+
anchore_version: v0.6.1
|
|
325
|
+
image_name: "docker.io/node:16.15.0-alpine $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG"
|
|
286
326
|
policy_failure: false
|
|
287
327
|
timeout: '500'
|
|
328
|
+
# Note: if the generated policy is invalid, this will fallback to the default policy, which we don't want!
|
|
329
|
+
policy_bundle_file_path: /tmp/mojaloop-policy.json
|
|
288
330
|
- run:
|
|
289
|
-
name:
|
|
290
|
-
command: |
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
fi
|
|
298
|
-
if [[ $(ls anchore-reports/*vuln*.json 2> /dev/null) ]]; then
|
|
299
|
-
printf "\n%s\n" "The following vulnerabilities were found:"
|
|
300
|
-
jq '[.vulnerabilities | group_by(.package) | .[] | {package: .[0].package, vuln: [.[].vuln]}]' anchore-reports/*vuln*.json
|
|
301
|
-
fi
|
|
302
|
-
# - run:
|
|
303
|
-
# name: Upload Anchore reports to s3
|
|
304
|
-
# command: |
|
|
305
|
-
# aws s3 cp anchore-reports ${AWS_S3_DIR_ANCHORE_REPORTS}/${CIRCLE_PROJECT_REPONAME}/ --recursive
|
|
306
|
-
# aws s3 rm ${AWS_S3_DIR_ANCHORE_REPORTS}/latest/ --recursive --exclude "*" --include "${CIRCLE_PROJECT_REPONAME}*"
|
|
307
|
-
# aws s3 cp anchore-reports ${AWS_S3_DIR_ANCHORE_REPORTS}/latest/ --recursive
|
|
308
|
-
|
|
309
|
-
# TODO: Enable this when we want to increase the strictness of our security policies
|
|
310
|
-
# failCount=$(cat anchore-reports/*policy*.json | grep 'fail' | wc -l)
|
|
311
|
-
# echo "FailCount is: ${failCount}"
|
|
312
|
-
# if [ $failCount -gt 0 ]; then
|
|
313
|
-
# printf "Failed with a policy failure count of: ${failCount}"
|
|
314
|
-
# exit 1
|
|
315
|
-
# fi
|
|
331
|
+
name: Upload Anchore reports to s3
|
|
332
|
+
command: |
|
|
333
|
+
aws s3 cp anchore-reports ${AWS_S3_DIR_ANCHORE_REPORTS}/${CIRCLE_PROJECT_REPONAME}/ --recursive
|
|
334
|
+
aws s3 rm ${AWS_S3_DIR_ANCHORE_REPORTS}/latest/ --recursive --exclude "*" --include "${CIRCLE_PROJECT_REPONAME}*"
|
|
335
|
+
aws s3 cp anchore-reports ${AWS_S3_DIR_ANCHORE_REPORTS}/latest/ --recursive
|
|
336
|
+
- run:
|
|
337
|
+
name: Evaluate failures
|
|
338
|
+
command: /tmp/ci-config/container-scanning/anchore-result-diff.js anchore-reports/node_16.15.0-alpine-policy.json anchore-reports/${CIRCLE_PROJECT_REPONAME}*-policy.json
|
|
316
339
|
- store_artifacts:
|
|
317
340
|
path: anchore-reports
|
|
341
|
+
- slack/notify:
|
|
342
|
+
event: fail
|
|
343
|
+
template: SLACK_TEMP_RELEASE_FAILURE
|
|
344
|
+
|
|
345
|
+
build-local:
|
|
346
|
+
executor: default-machine
|
|
347
|
+
steps:
|
|
348
|
+
- checkout
|
|
349
|
+
- run:
|
|
350
|
+
name: Build Docker local image for testing
|
|
351
|
+
command: |
|
|
352
|
+
echo "Building Docker image: local"
|
|
353
|
+
docker build -t $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:local .
|
|
354
|
+
- run:
|
|
355
|
+
name: Save docker image to workspace
|
|
356
|
+
command: docker save -o /tmp/docker-image-local.tar $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:local
|
|
357
|
+
- persist_to_workspace:
|
|
358
|
+
root: /tmp
|
|
359
|
+
paths:
|
|
360
|
+
- ./docker-image-local.tar
|
|
361
|
+
|
|
362
|
+
build:
|
|
363
|
+
executor: default-machine
|
|
364
|
+
steps:
|
|
365
|
+
- attach_workspace:
|
|
366
|
+
at: /tmp
|
|
367
|
+
- run:
|
|
368
|
+
name: Load the pre-built docker local image from workspace
|
|
369
|
+
command: docker load -i /tmp/docker-image-local.tar
|
|
370
|
+
- run:
|
|
371
|
+
name: Re-tag the image
|
|
372
|
+
command: |
|
|
373
|
+
echo "Re-tagging Docker image: $CIRCLE_TAG"
|
|
374
|
+
docker tag $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:local $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG
|
|
375
|
+
- run:
|
|
376
|
+
name: Save the new docker image to workspace
|
|
377
|
+
command: docker save -o /tmp/docker-image.tar $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG
|
|
378
|
+
- persist_to_workspace:
|
|
379
|
+
root: /tmp
|
|
380
|
+
paths:
|
|
381
|
+
- ./docker-image.tar
|
|
318
382
|
|
|
319
383
|
release:
|
|
320
384
|
executor: default-docker
|
|
@@ -323,26 +387,30 @@ jobs:
|
|
|
323
387
|
name: Install general dependencies
|
|
324
388
|
command: *defaults_Dependencies
|
|
325
389
|
- checkout
|
|
390
|
+
- run:
|
|
391
|
+
<<: *defaults_configure_nvm
|
|
326
392
|
- restore_cache:
|
|
327
|
-
|
|
393
|
+
keys:
|
|
394
|
+
- dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
328
395
|
- run:
|
|
329
|
-
|
|
330
|
-
command: |
|
|
331
|
-
git config user.email ${GIT_CI_EMAIL}
|
|
332
|
-
git config user.name ${GIT_CI_USER}
|
|
333
|
-
git checkout ${CIRCLE_BRANCH}
|
|
396
|
+
<<: *defaults_configure_git
|
|
334
397
|
- run:
|
|
335
|
-
name:
|
|
398
|
+
name: Setup Slack config
|
|
336
399
|
command: |
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
400
|
+
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
|
|
401
|
+
echo "export SLACK_RELEASE_TYPE='GitHub Release'" >> $BASH_ENV
|
|
402
|
+
echo "export SLACK_RELEASE_TAG='${RELEASE_TAG} on ${CIRCLE_BRANCH} branch'" >> $BASH_ENV
|
|
403
|
+
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
|
|
404
|
+
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
|
|
340
405
|
- run:
|
|
341
406
|
name: Generate changelog and bump package version
|
|
342
|
-
command: npm run release
|
|
407
|
+
command: npm run release -- --no-verify
|
|
343
408
|
- run:
|
|
344
409
|
name: Push the release
|
|
345
410
|
command: git push --follow-tags origin ${CIRCLE_BRANCH}
|
|
411
|
+
- slack/notify:
|
|
412
|
+
event: fail
|
|
413
|
+
template: SLACK_TEMP_RELEASE_FAILURE
|
|
346
414
|
|
|
347
415
|
github-release:
|
|
348
416
|
executor: default-machine
|
|
@@ -351,77 +419,236 @@ jobs:
|
|
|
351
419
|
name: Install git
|
|
352
420
|
command: |
|
|
353
421
|
sudo apt-get update && sudo apt-get install -y git
|
|
422
|
+
- gh/install
|
|
354
423
|
- checkout
|
|
424
|
+
- run:
|
|
425
|
+
<<: *defaults_configure_git
|
|
355
426
|
- run:
|
|
356
427
|
name: Fetch updated release branch
|
|
357
428
|
command: |
|
|
358
|
-
git config user.email ${GIT_CI_EMAIL}
|
|
359
|
-
git config user.name ${GIT_CI_USER}
|
|
360
429
|
git fetch origin
|
|
361
430
|
git checkout origin/${CIRCLE_BRANCH}
|
|
362
431
|
- run:
|
|
363
|
-
|
|
364
|
-
name: Format the changelog into the github release body and get release tag
|
|
365
|
-
command: |
|
|
366
|
-
git diff --no-indent-heuristic master~1 HEAD CHANGELOG.md | sed -n '/^+[^+]/ s/^+//p' > /tmp/changes
|
|
367
|
-
echo 'export RELEASE_CHANGES=`cat /tmp/changes`' >> $BASH_ENV
|
|
368
|
-
echo 'export RELEASE_TAG=`cat package-lock.json | jq -r .version`' >> $BASH_ENV
|
|
432
|
+
<<: *defaults_export_version_from_package
|
|
369
433
|
- run:
|
|
370
|
-
name:
|
|
434
|
+
name: Check the release changes
|
|
371
435
|
command: |
|
|
372
436
|
echo "Changes are: ${RELEASE_CHANGES}"
|
|
373
|
-
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
437
|
+
- run:
|
|
438
|
+
name: Setup Slack config
|
|
439
|
+
command: |
|
|
440
|
+
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
|
|
441
|
+
echo "export SLACK_RELEASE_TYPE='Github Release'" >> $BASH_ENV
|
|
442
|
+
echo "export SLACK_RELEASE_TAG=v${RELEASE_TAG}" >> $BASH_ENV
|
|
443
|
+
echo "export SLACK_RELEASE_URL=https://github.com/mojaloop/${CIRCLE_PROJECT_REPONAME}/releases/tag/v${RELEASE_TAG}" >> $BASH_ENV
|
|
444
|
+
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
|
|
445
|
+
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
|
|
446
|
+
- run:
|
|
447
|
+
name: Create Release
|
|
448
|
+
command: |
|
|
449
|
+
gh release create "v${RELEASE_TAG}" --title "v${RELEASE_TAG} Release" --draft=false --notes "${RELEASE_CHANGES}" ./CHANGELOG.md
|
|
450
|
+
- slack/notify:
|
|
451
|
+
event: pass
|
|
452
|
+
template: SLACK_TEMP_RELEASE_SUCCESS
|
|
453
|
+
- slack/notify:
|
|
454
|
+
event: fail
|
|
455
|
+
template: SLACK_TEMP_RELEASE_FAILURE
|
|
382
456
|
|
|
383
457
|
publish-docker:
|
|
384
458
|
executor: default-machine
|
|
385
459
|
steps:
|
|
386
460
|
- checkout
|
|
461
|
+
- run:
|
|
462
|
+
name: Setup for LATEST release
|
|
463
|
+
command: |
|
|
464
|
+
echo "export RELEASE_TAG=$RELEASE_TAG_PROD" >> $BASH_ENV
|
|
465
|
+
echo "RELEASE_TAG=$RELEASE_TAG_PROD"
|
|
466
|
+
|
|
467
|
+
PACKAGE_VERSION=$(cat package-lock.json | jq -r .version)
|
|
468
|
+
echo "export PACKAGE_VERSION=${PACKAGE_VERSION}" >> $BASH_ENV
|
|
469
|
+
echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
|
|
470
|
+
- run:
|
|
471
|
+
name: Setup Slack config
|
|
472
|
+
command: |
|
|
473
|
+
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
|
|
474
|
+
echo "export SLACK_RELEASE_TYPE='Docker Release'" >> $BASH_ENV
|
|
475
|
+
echo "export SLACK_RELEASE_TAG=v${CIRCLE_TAG:1}" >> $BASH_ENV
|
|
476
|
+
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
|
|
477
|
+
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
|
|
387
478
|
- attach_workspace:
|
|
388
479
|
at: /tmp
|
|
389
480
|
- run:
|
|
390
481
|
name: Load the pre-built docker image from workspace
|
|
391
|
-
command:
|
|
482
|
+
command: |
|
|
483
|
+
docker load -i /tmp/docker-image.tar
|
|
392
484
|
- run:
|
|
393
485
|
name: Login to Docker Hub
|
|
394
486
|
command: docker login -u $DOCKER_USER -p $DOCKER_PASS
|
|
395
487
|
- run:
|
|
396
488
|
name: Re-tag pre built image
|
|
397
489
|
command: |
|
|
398
|
-
docker tag $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME
|
|
399
|
-
docker tag $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:local $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG
|
|
490
|
+
docker tag $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG
|
|
400
491
|
- run:
|
|
401
492
|
name: Publish Docker image $CIRCLE_TAG & Latest tag to Docker Hub
|
|
402
493
|
command: |
|
|
403
494
|
echo "Publishing $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG"
|
|
404
495
|
docker push $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG
|
|
405
|
-
echo "Publishing $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME
|
|
406
|
-
docker push $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME
|
|
496
|
+
echo "Publishing $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG"
|
|
497
|
+
docker push $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG
|
|
498
|
+
- run:
|
|
499
|
+
name: Set Image Digest
|
|
500
|
+
command: |
|
|
501
|
+
IMAGE_DIGEST=$(docker inspect $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:v${CIRCLE_TAG:1} | jq '.[0].RepoDigests | .[]')
|
|
502
|
+
echo "IMAGE_DIGEST=${IMAGE_DIGEST}"
|
|
503
|
+
echo "export IMAGE_DIGEST=${IMAGE_DIGEST}" >> $BASH_ENV
|
|
504
|
+
- run:
|
|
505
|
+
name: Update Slack config
|
|
506
|
+
command: |
|
|
507
|
+
echo "export SLACK_RELEASE_URL='https://hub.docker.com/layers/${CIRCLE_PROJECT_REPONAME}/${DOCKER_ORG}/${CIRCLE_PROJECT_REPONAME}/v${CIRCLE_TAG:1}/images/${IMAGE_DIGEST}?context=explore'" | sed -r "s/${DOCKER_ORG}\/${CIRCLE_PROJECT_REPONAME}@sha256:/sha256-/g" >> $BASH_ENV
|
|
508
|
+
- slack/notify:
|
|
509
|
+
event: pass
|
|
510
|
+
template: SLACK_TEMP_RELEASE_SUCCESS
|
|
511
|
+
- slack/notify:
|
|
512
|
+
event: fail
|
|
513
|
+
template: SLACK_TEMP_RELEASE_FAILURE
|
|
514
|
+
|
|
515
|
+
publish-docker-snapshot:
|
|
516
|
+
executor: default-machine
|
|
517
|
+
steps:
|
|
518
|
+
- checkout
|
|
519
|
+
- run:
|
|
520
|
+
name: Setup for SNAPSHOT release
|
|
521
|
+
command: |
|
|
522
|
+
echo "export RELEASE_TAG=$RELEASE_TAG_SNAPSHOT" >> $BASH_ENV
|
|
523
|
+
echo "RELEASE_TAG=$RELEASE_TAG_SNAPSHOT"
|
|
524
|
+
|
|
525
|
+
PACKAGE_VERSION=$(cat package-lock.json | jq -r .version)
|
|
526
|
+
echo "export PACKAGE_VERSION=${PACKAGE_VERSION}" >> $BASH_ENV
|
|
527
|
+
echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
|
|
528
|
+
- run:
|
|
529
|
+
name: Setup Slack config
|
|
530
|
+
command: |
|
|
531
|
+
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
|
|
532
|
+
echo "export SLACK_RELEASE_TYPE='Docker Release'" >> $BASH_ENV
|
|
533
|
+
echo "export SLACK_RELEASE_TAG=v${CIRCLE_TAG:1}" >> $BASH_ENV
|
|
534
|
+
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
|
|
535
|
+
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
|
|
536
|
+
- attach_workspace:
|
|
537
|
+
at: /tmp
|
|
538
|
+
- run:
|
|
539
|
+
name: Load the pre-built docker image from workspace
|
|
540
|
+
command: |
|
|
541
|
+
docker load -i /tmp/docker-image.tar
|
|
542
|
+
- run:
|
|
543
|
+
name: Login to Docker Hub
|
|
544
|
+
command: docker login -u $DOCKER_USER -p $DOCKER_PASS
|
|
545
|
+
- run:
|
|
546
|
+
name: Re-tag pre built image
|
|
547
|
+
command: |
|
|
548
|
+
docker tag $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG
|
|
549
|
+
- run:
|
|
550
|
+
name: Publish Docker image $CIRCLE_TAG & Latest tag to Docker Hub
|
|
551
|
+
command: |
|
|
552
|
+
echo "Publishing $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG"
|
|
553
|
+
docker push $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG
|
|
554
|
+
echo "Publishing $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG"
|
|
555
|
+
docker push $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG
|
|
556
|
+
- run:
|
|
557
|
+
name: Set Image Digest
|
|
558
|
+
command: |
|
|
559
|
+
IMAGE_DIGEST=$(docker inspect $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:v${CIRCLE_TAG:1} | jq '.[0].RepoDigests | .[]')
|
|
560
|
+
echo "IMAGE_DIGEST=${IMAGE_DIGEST}"
|
|
561
|
+
echo "export IMAGE_DIGEST=${IMAGE_DIGEST}" >> $BASH_ENV
|
|
562
|
+
- run:
|
|
563
|
+
name: Update Slack config
|
|
564
|
+
command: |
|
|
565
|
+
echo "export SLACK_RELEASE_URL='https://hub.docker.com/layers/${CIRCLE_PROJECT_REPONAME}/${DOCKER_ORG}/${CIRCLE_PROJECT_REPONAME}/v${CIRCLE_TAG:1}/images/${IMAGE_DIGEST}?context=explore'" | sed -r "s/${DOCKER_ORG}\/${CIRCLE_PROJECT_REPONAME}@sha256:/sha256-/g" >> $BASH_ENV
|
|
566
|
+
- slack/notify:
|
|
567
|
+
event: pass
|
|
568
|
+
template: SLACK_TEMP_RELEASE_SUCCESS
|
|
569
|
+
- slack/notify:
|
|
570
|
+
event: fail
|
|
571
|
+
template: SLACK_TEMP_RELEASE_FAILURE
|
|
407
572
|
|
|
408
573
|
publish-npm:
|
|
409
574
|
executor: default-docker
|
|
410
575
|
steps:
|
|
576
|
+
- run:
|
|
577
|
+
name: Install general dependencies
|
|
578
|
+
command: *defaults_Dependencies
|
|
411
579
|
- checkout
|
|
580
|
+
- restore_cache:
|
|
581
|
+
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
582
|
+
- run:
|
|
583
|
+
name: Setup for LATEST release
|
|
584
|
+
command: |
|
|
585
|
+
echo "export RELEASE_TAG=$RELEASE_TAG_PROD" >> $BASH_ENV
|
|
586
|
+
echo "RELEASE_TAG=$RELEASE_TAG_PROD"
|
|
587
|
+
|
|
588
|
+
PACKAGE_VERSION=$(cat package-lock.json | jq -r .version)
|
|
589
|
+
echo "export PACKAGE_VERSION=${PACKAGE_VERSION}" >> $BASH_ENV
|
|
590
|
+
echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
|
|
591
|
+
- run:
|
|
592
|
+
name: Setup Slack config
|
|
593
|
+
command: |
|
|
594
|
+
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
|
|
595
|
+
echo "export SLACK_RELEASE_TYPE='NPM Release'" >> $BASH_ENV
|
|
596
|
+
echo "export SLACK_RELEASE_TAG=v${CIRCLE_TAG:1}" >> $BASH_ENV
|
|
597
|
+
echo "export SLACK_RELEASE_URL=https://www.npmjs.com/package/@mojaloop/${CIRCLE_PROJECT_REPONAME}/v/${CIRCLE_TAG:1}" >> $BASH_ENV
|
|
598
|
+
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
|
|
599
|
+
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
|
|
600
|
+
- run:
|
|
601
|
+
<<: *defaults_npm_auth
|
|
602
|
+
- run:
|
|
603
|
+
<<: *defaults_npm_publish_release
|
|
604
|
+
- slack/notify:
|
|
605
|
+
event: pass
|
|
606
|
+
template: SLACK_TEMP_RELEASE_SUCCESS
|
|
607
|
+
- slack/notify:
|
|
608
|
+
event: fail
|
|
609
|
+
template: SLACK_TEMP_RELEASE_FAILURE
|
|
610
|
+
|
|
611
|
+
publish-npm-snapshot:
|
|
612
|
+
executor: default-docker
|
|
613
|
+
steps:
|
|
412
614
|
- run:
|
|
413
615
|
name: Install general dependencies
|
|
414
616
|
command: *defaults_Dependencies
|
|
617
|
+
- checkout
|
|
415
618
|
- restore_cache:
|
|
416
619
|
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
417
620
|
- run:
|
|
418
|
-
name:
|
|
621
|
+
name: Setup for SNAPSHOT release
|
|
419
622
|
command: |
|
|
420
|
-
echo
|
|
623
|
+
echo "export RELEASE_TAG=${RELEASE_TAG_SNAPSHOT}" >> $BASH_ENV
|
|
624
|
+
echo "RELEASE_TAG=${RELEASE_TAG_SNAPSHOT}"
|
|
625
|
+
|
|
626
|
+
echo "Override package version: ${CIRCLE_TAG:1}"
|
|
627
|
+
npx standard-version --skip.tag --skip.commit --skip.changelog --release-as ${CIRCLE_TAG:1}
|
|
628
|
+
|
|
629
|
+
PACKAGE_VERSION=$(cat package-lock.json | jq -r .version)
|
|
630
|
+
echo "export PACKAGE_VERSION=${PACKAGE_VERSION}" >> $BASH_ENV
|
|
631
|
+
echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
|
|
632
|
+
- run:
|
|
633
|
+
name: Setup Slack config
|
|
634
|
+
command: |
|
|
635
|
+
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
|
|
636
|
+
echo "export SLACK_RELEASE_TYPE='NPM Snapshot'" >> $BASH_ENV
|
|
637
|
+
echo "export SLACK_RELEASE_TAG=v${CIRCLE_TAG:1}" >> $BASH_ENV
|
|
638
|
+
echo "export SLACK_RELEASE_URL=https://www.npmjs.com/package/@mojaloop/${CIRCLE_PROJECT_REPONAME}/v/${CIRCLE_TAG:1}" >> $BASH_ENV
|
|
639
|
+
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
|
|
640
|
+
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
|
|
421
641
|
- run:
|
|
422
642
|
<<: *defaults_npm_auth
|
|
423
643
|
- run:
|
|
424
644
|
<<: *defaults_npm_publish_release
|
|
645
|
+
- slack/notify:
|
|
646
|
+
event: pass
|
|
647
|
+
template: SLACK_TEMP_RELEASE_SUCCESS
|
|
648
|
+
- slack/notify:
|
|
649
|
+
event: fail
|
|
650
|
+
template: SLACK_TEMP_RELEASE_FAILURE
|
|
651
|
+
|
|
425
652
|
##
|
|
426
653
|
# Workflows
|
|
427
654
|
#
|
|
@@ -442,8 +669,7 @@ workflows:
|
|
|
442
669
|
ignore:
|
|
443
670
|
- /feature*/
|
|
444
671
|
- /bugfix*/
|
|
445
|
-
|
|
446
|
-
- test-unit:
|
|
672
|
+
- test-dependencies:
|
|
447
673
|
context: org-global
|
|
448
674
|
requires:
|
|
449
675
|
- setup
|
|
@@ -454,8 +680,7 @@ workflows:
|
|
|
454
680
|
ignore:
|
|
455
681
|
- /feature*/
|
|
456
682
|
- /bugfix*/
|
|
457
|
-
|
|
458
|
-
- validate-openapi:
|
|
683
|
+
- test-lint:
|
|
459
684
|
context: org-global
|
|
460
685
|
requires:
|
|
461
686
|
- setup
|
|
@@ -466,8 +691,18 @@ workflows:
|
|
|
466
691
|
ignore:
|
|
467
692
|
- /feature*/
|
|
468
693
|
- /bugfix*/
|
|
469
|
-
|
|
470
|
-
|
|
694
|
+
- test-unit:
|
|
695
|
+
context: org-global
|
|
696
|
+
requires:
|
|
697
|
+
- setup
|
|
698
|
+
filters:
|
|
699
|
+
tags:
|
|
700
|
+
only: /.*/
|
|
701
|
+
branches:
|
|
702
|
+
ignore:
|
|
703
|
+
- /feature*/
|
|
704
|
+
- /bugfix*/
|
|
705
|
+
- validate-openapi:
|
|
471
706
|
context: org-global
|
|
472
707
|
requires:
|
|
473
708
|
- setup
|
|
@@ -478,7 +713,6 @@ workflows:
|
|
|
478
713
|
ignore:
|
|
479
714
|
- /feature*/
|
|
480
715
|
- /bugfix*/
|
|
481
|
-
|
|
482
716
|
- test-integration:
|
|
483
717
|
context: org-global
|
|
484
718
|
requires:
|
|
@@ -490,7 +724,6 @@ workflows:
|
|
|
490
724
|
ignore:
|
|
491
725
|
- /feature*/
|
|
492
726
|
- /bugfix*/
|
|
493
|
-
|
|
494
727
|
- vulnerability-check:
|
|
495
728
|
context: org-global
|
|
496
729
|
requires:
|
|
@@ -513,64 +746,75 @@ workflows:
|
|
|
513
746
|
ignore:
|
|
514
747
|
- /feature*/
|
|
515
748
|
- /bugfix*/
|
|
516
|
-
|
|
517
749
|
- build-local:
|
|
518
750
|
context: org-global
|
|
519
751
|
requires:
|
|
520
|
-
-
|
|
521
|
-
- validate-openapi
|
|
522
|
-
- test-unit
|
|
752
|
+
- setup
|
|
523
753
|
filters:
|
|
524
754
|
tags:
|
|
525
|
-
only:
|
|
755
|
+
only: /.*/
|
|
526
756
|
branches:
|
|
527
757
|
ignore:
|
|
528
758
|
- /feature*/
|
|
529
759
|
- /bugfix*/
|
|
530
|
-
|
|
531
|
-
- image-scan:
|
|
760
|
+
- build:
|
|
532
761
|
context: org-global
|
|
533
762
|
requires:
|
|
763
|
+
- setup
|
|
764
|
+
- test-dependencies
|
|
765
|
+
- test-lint
|
|
766
|
+
- test-unit
|
|
767
|
+
- test-integration
|
|
768
|
+
- vulnerability-check
|
|
769
|
+
- audit-licenses
|
|
534
770
|
- build-local
|
|
771
|
+
- validate-openapi
|
|
535
772
|
filters:
|
|
536
773
|
tags:
|
|
537
|
-
only: /v[0-9]+(\.[0-9]+)*(\-snapshot)?/
|
|
774
|
+
only: /v[0-9]+(\.[0-9]+)*(\-snapshot(\.[0-9]+)?)?(\-hotfix(\.[0-9]+)?)?(\-perf(\.[0-9]+)?)?/
|
|
538
775
|
branches:
|
|
539
776
|
ignore:
|
|
540
|
-
-
|
|
541
|
-
- /bugfix*/
|
|
542
|
-
|
|
777
|
+
- /.*/
|
|
543
778
|
- license-scan:
|
|
544
779
|
context: org-global
|
|
545
780
|
requires:
|
|
546
|
-
- build
|
|
781
|
+
- build
|
|
547
782
|
filters:
|
|
548
783
|
tags:
|
|
549
|
-
only: /v[0-9]+(\.[0-9]+)*(\-snapshot)?/
|
|
784
|
+
only: /v[0-9]+(\.[0-9]+)*(\-snapshot(\.[0-9]+)?)?(\-hotfix(\.[0-9]+)?)?(\-perf(\.[0-9]+)?)?/
|
|
550
785
|
branches:
|
|
551
786
|
ignore:
|
|
552
|
-
-
|
|
553
|
-
|
|
554
|
-
|
|
787
|
+
- /.*/
|
|
788
|
+
- image-scan:
|
|
789
|
+
context: org-global
|
|
790
|
+
requires:
|
|
791
|
+
- build
|
|
792
|
+
filters:
|
|
793
|
+
tags:
|
|
794
|
+
only: /v[0-9]+(\.[0-9]+)*(\-snapshot(\.[0-9]+)?)?(\-hotfix(\.[0-9]+)?)?(\-perf(\.[0-9]+)?)?/
|
|
795
|
+
branches:
|
|
796
|
+
ignore:
|
|
797
|
+
- /.*/
|
|
555
798
|
# New commits to master release automatically
|
|
556
799
|
- release:
|
|
557
800
|
context: org-global
|
|
558
801
|
requires:
|
|
559
|
-
- build-local
|
|
560
802
|
- pr-tools/pr-title-check
|
|
561
|
-
-
|
|
803
|
+
- test-dependencies
|
|
804
|
+
- test-lint
|
|
562
805
|
- test-unit
|
|
806
|
+
- build
|
|
807
|
+
- test-integration
|
|
563
808
|
- vulnerability-check
|
|
564
809
|
- audit-licenses
|
|
565
|
-
- test-integration
|
|
566
810
|
- license-scan
|
|
567
811
|
- image-scan
|
|
812
|
+
- validate-openapi
|
|
568
813
|
filters:
|
|
569
814
|
branches:
|
|
570
815
|
only:
|
|
571
816
|
- master
|
|
572
817
|
- /release\/v.*/
|
|
573
|
-
|
|
574
818
|
- github-release:
|
|
575
819
|
context: org-global
|
|
576
820
|
requires:
|
|
@@ -580,40 +824,81 @@ workflows:
|
|
|
580
824
|
only:
|
|
581
825
|
- master
|
|
582
826
|
- /release\/v.*/
|
|
583
|
-
|
|
584
827
|
- publish-docker:
|
|
585
828
|
context: org-global
|
|
586
829
|
requires:
|
|
587
|
-
- build-local
|
|
588
830
|
- pr-tools/pr-title-check
|
|
831
|
+
- test-dependencies
|
|
832
|
+
- test-lint
|
|
833
|
+
- test-unit
|
|
834
|
+
- build
|
|
835
|
+
- test-integration
|
|
836
|
+
- vulnerability-check
|
|
837
|
+
- audit-licenses
|
|
838
|
+
- license-scan
|
|
839
|
+
- image-scan
|
|
589
840
|
- validate-openapi
|
|
841
|
+
filters:
|
|
842
|
+
tags:
|
|
843
|
+
only: /v[0-9]+(\.[0-9]+)*/
|
|
844
|
+
branches:
|
|
845
|
+
ignore:
|
|
846
|
+
- /.*/
|
|
847
|
+
- publish-docker-snapshot:
|
|
848
|
+
context: org-global
|
|
849
|
+
requires:
|
|
850
|
+
- pr-tools/pr-title-check
|
|
851
|
+
- test-dependencies
|
|
852
|
+
- test-lint
|
|
590
853
|
- test-unit
|
|
854
|
+
- build
|
|
591
855
|
- vulnerability-check
|
|
592
856
|
- audit-licenses
|
|
593
857
|
- test-integration
|
|
594
858
|
- license-scan
|
|
595
859
|
- image-scan
|
|
860
|
+
- validate-openapi
|
|
596
861
|
filters:
|
|
597
862
|
tags:
|
|
598
|
-
only:
|
|
863
|
+
only: /v[0-9]+(\.[0-9]+)*\-snapshot+((\.[0-9]+)?)/
|
|
599
864
|
branches:
|
|
600
865
|
ignore:
|
|
601
866
|
- /.*/
|
|
602
|
-
|
|
603
867
|
- publish-npm:
|
|
604
868
|
context: org-global
|
|
605
869
|
requires:
|
|
606
870
|
- pr-tools/pr-title-check
|
|
871
|
+
- test-dependencies
|
|
872
|
+
- test-lint
|
|
873
|
+
- test-unit
|
|
874
|
+
- vulnerability-check
|
|
875
|
+
- audit-licenses
|
|
876
|
+
- test-integration
|
|
877
|
+
- license-scan
|
|
878
|
+
- image-scan
|
|
607
879
|
- validate-openapi
|
|
880
|
+
filters:
|
|
881
|
+
tags:
|
|
882
|
+
only: /v[0-9]+(\.[0-9]+)*/
|
|
883
|
+
branches:
|
|
884
|
+
ignore:
|
|
885
|
+
- /.*/
|
|
886
|
+
- publish-npm-snapshot:
|
|
887
|
+
context: org-global
|
|
888
|
+
requires:
|
|
889
|
+
- pr-tools/pr-title-check
|
|
890
|
+
- test-dependencies
|
|
891
|
+
- test-lint
|
|
608
892
|
- test-unit
|
|
609
893
|
- vulnerability-check
|
|
610
894
|
- audit-licenses
|
|
611
895
|
- test-integration
|
|
612
896
|
- license-scan
|
|
613
897
|
- image-scan
|
|
898
|
+
- validate-openapi
|
|
614
899
|
filters:
|
|
615
900
|
tags:
|
|
616
|
-
only:
|
|
901
|
+
only: /v[0-9]+(\.[0-9]+)*\-snapshot+((\.[0-9]+)?)/
|
|
617
902
|
branches:
|
|
618
903
|
ignore:
|
|
619
904
|
- /.*/
|