-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
494 lines (491 loc) · 23.9 KB
/
bitbucket-pipelines.yml
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
image: python:3.9.15
definitions:
steps:
- step: &automate-pr-to-arcimoto-lambda-global-dependencies
name: Create Dependent Repo PR in arcimoto-lambda-global-dependencies
image: node:18
caches:
- node
script:
# set pipeline to fail on errors
- set -e
# get version published info from artifact
- >
export VERSION_PUBLISHED=$(cat release-publish/version_published.txt)
# check if new version published - if not exit
- |
if [ "$VERSION_PUBLISHED" = false ]; then
exit 0
fi
# get version published type info from artifact
- >
export VERSION_PUBLISHED_TYPE=$(cat release-publish/version_published_type.txt)
- >
export VERSION_CURRENT=$(cat release-publish/version_current.txt)
# setup commit message with default type of minor version
- export COMMIT_MESSAGE_TYPE="feat"
- export COMMIT_MESSAGE_SCOPE="submodule"
- export COMMIT_MESSAGE_BODY="${BITBUCKET_REPO_SLUG} version ${VERSION_CURRENT} release"
- |
if [ "$VERSION_PUBLISHED_TYPE" == "patch" ]; then
export COMMIT_MESSAGE_TYPE="fix"
fi
- |
if [ "$VERSION_PUBLISHED_TYPE" == "major" ]; then
export COMMIT_MESSAGE_BODY="BREAKING CHANGE: $COMMIT_MESSAGE_BODY"
fi
- >
export COMMIT_MESSAGE="${COMMIT_MESSAGE_TYPE}(${COMMIT_MESSAGE_SCOPE}): ${COMMIT_MESSAGE_BODY}"
- echo $COMMIT_MESSAGE
- export DEPENDENT_REPO_SLUG="arcimoto-lambda-global-dependencies"
- export SOURCE_BRANCH="TEL-MAINT-arcimoto-aws-services-$(date +"%F_%H.%M.%S")"
- apt-get update && apt-get -y install curl jq
# get BB token from artifact from get-bb-auth-token step
- >
export BB_TOKEN=$(cat bb_token.txt)
# get dependent repo default reviewers via API
- export DEFAULT_REVIEWERS_ENDPOINT=https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${DEPENDENT_REPO_SLUG}/default-reviewers
- echo $DEFAULT_REVIEWERS_ENDPOINT
- >
export DEFAULT_REVIEWERS=$(curl ${DEFAULT_REVIEWERS_ENDPOINT} \
-s -S -f -X GET \
-H "Authorization: Bearer ${BB_TOKEN}" | jq '.values' | jq 'map({uuid})' )
- echo $DEFAULT_REVIEWERS
# install gulp globally (gulp is required both globally and locally)
- npm i -g gulp
# install gulp task dependencies locally
- npm i gulp axios
# setup git config
- git config --global pull.ff only
# use bot programatic user for git operations
- git config --global user.email "[email protected]" && git config --global user.name "SWE Accounts"
# clone dependent repo and enter directory
- git clone --recurse-submodules [email protected]:${BITBUCKET_REPO_OWNER}/${DEPENDENT_REPO_SLUG}.git && cd $DEPENDENT_REPO_SLUG
# create & checkout feature branch from dev branch in dependent repo
- git fetch origin
- git checkout -b $SOURCE_BRANCH origin/dev
# init and update git submodule
- git submodule update --init --remote
# git stage and commit submodule update
- git add arcimoto_aws_services
- git commit -m "$COMMIT_MESSAGE"
# push branch to origin
- git push --set-upstream origin $SOURCE_BRANCH
# go back to root bitbucket pipeline directory
- cd ..
# execute gulp task to create PR from feature branch to dev
- gulp createpr --t $BB_TOKEN --b $SOURCE_BRANCH --o $BITBUCKET_REPO_OWNER --s $DEPENDENT_REPO_SLUG --r "$DEFAULT_REVIEWERS"
- step: &automate-pr-to-arcimoto-lambda-utility
name: Create Dependent Repo PR in arcimoto-lambda-utility
image: node:18
caches:
- node
script:
# set pipeline to fail on errors
- set -e
# get version published info from artifact
- >
export VERSION_PUBLISHED=$(cat release-publish/version_published.txt)
# check if new version published - if not exit
- |
if [ "$VERSION_PUBLISHED" = false ]; then
exit 0
fi
# get version published type info from artifact
- >
export VERSION_PUBLISHED_TYPE=$(cat release-publish/version_published_type.txt)
- >
export VERSION_CURRENT=$(cat release-publish/version_current.txt)
# setup commit message with default type of minor version
- export COMMIT_MESSAGE_TYPE="feat"
- export COMMIT_MESSAGE_SCOPE="submodule"
- export COMMIT_MESSAGE_BODY="${BITBUCKET_REPO_SLUG} version ${VERSION_CURRENT} release"
- |
if [ "$VERSION_PUBLISHED_TYPE" == "patch" ]; then
export COMMIT_MESSAGE_TYPE="fix"
fi
- |
if [ "$VERSION_PUBLISHED_TYPE" == "major" ]; then
export COMMIT_MESSAGE_BODY="BREAKING CHANGE: $COMMIT_MESSAGE_BODY"
fi
- >
export COMMIT_MESSAGE="${COMMIT_MESSAGE_TYPE}(${COMMIT_MESSAGE_SCOPE}): ${COMMIT_MESSAGE_BODY}"
- echo $COMMIT_MESSAGE
# setup variables
- export DEPENDENT_REPO_SLUG="arcimoto-lambda-utility"
- export SOURCE_BRANCH="TEL-MAINT-arcimoto-aws-services-$(date +"%F_%H.%M.%S")"
# update packages and install dependencies
- apt-get update && apt-get -y install curl jq
# get BB token from artifact from get-bb-auth-token step
- >
export BB_TOKEN=$(cat bb_token.txt)
- echo $BB_TOKEN
# get dependent repo default reviewers via API
- export DEFAULT_REVIEWERS_ENDPOINT=https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${DEPENDENT_REPO_SLUG}/default-reviewers
- echo $DEFAULT_REVIEWERS_ENDPOINT
- >
export DEFAULT_REVIEWERS=$(curl ${DEFAULT_REVIEWERS_ENDPOINT} \
-s -S -f -X GET \
-H "Authorization: Bearer ${BB_TOKEN}" | jq '.values' | jq 'map({uuid})' )
- echo $DEFAULT_REVIEWERS
# install gulp globally (gulp is required both globally and locally)
- npm i -g gulp
# install gulp task dependencies locally
- npm i gulp axios
# setup git config
- git config --global pull.ff only
# use bot programatic user for git operations
- git config --global user.email "[email protected]" && git config --global user.name "SWE Accounts"
# clone dependent repo and enter directory
- git clone --recurse-submodules [email protected]:${BITBUCKET_REPO_OWNER}/${DEPENDENT_REPO_SLUG}.git && cd $DEPENDENT_REPO_SLUG
# create & checkout feature branch from dev branch in dependent repo
- git fetch origin
- git checkout -b $SOURCE_BRANCH origin/dev
# init and update git submodule
- git submodule update --init --remote
# git stage and commit submodule update
- git add arcimoto_aws_services
- git commit -m "$COMMIT_MESSAGE"
# push branch to origin
- git push --set-upstream origin $SOURCE_BRANCH
# go back to root bitbucket pipeline directory
- cd ..
# execute gulp task to create PR from feature branch to dev
- gulp createpr --t $BB_TOKEN --b $SOURCE_BRANCH --o $BITBUCKET_REPO_OWNER --s $DEPENDENT_REPO_SLUG --r "$DEFAULT_REVIEWERS"
- step: &automate-pr-to-arcimoto-ses-utility
name: Create Dependent Repo PR in arcimoto-ses-utility
image: node:18
caches:
- node
script:
# set pipeline to fail on errors
- set -e
# get version published info from artifact
- >
export VERSION_PUBLISHED=$(cat release-publish/version_published.txt)
# check if new version published - if not exit
- |
if [ "$VERSION_PUBLISHED" = false ]; then
exit 0
fi
# get version published type info from artifact
- >
export VERSION_PUBLISHED_TYPE=$(cat release-publish/version_published_type.txt)
- >
export VERSION_CURRENT=$(cat release-publish/version_current.txt)
# setup commit message with default type of minor version
- export COMMIT_MESSAGE_TYPE="feat"
- export COMMIT_MESSAGE_SCOPE="submodule"
- export COMMIT_MESSAGE_BODY="${BITBUCKET_REPO_SLUG} version ${VERSION_CURRENT} release"
- |
if [ "$VERSION_PUBLISHED_TYPE" == "patch" ]; then
export COMMIT_MESSAGE_TYPE="fix"
fi
- |
if [ "$VERSION_PUBLISHED_TYPE" == "major" ]; then
export COMMIT_MESSAGE_BODY="BREAKING CHANGE: $COMMIT_MESSAGE_BODY"
fi
- >
export COMMIT_MESSAGE="${COMMIT_MESSAGE_TYPE}(${COMMIT_MESSAGE_SCOPE}): ${COMMIT_MESSAGE_BODY}"
# setup variables
- export DEPENDENT_REPO_SLUG="arcimoto-ses-utility"
- export SOURCE_BRANCH="TEL-MAINT-arcimoto-aws-services-$(date +"%F_%H.%M.%S")"
# update packages and install dependencies
- apt-get update && apt-get -y install curl jq
# get BB token from artifact from get-bb-auth-token step
- >
export BB_TOKEN=$(cat bb_token.txt)
- echo $BB_TOKEN
# get dependent repo default reviewers via API
- export DEFAULT_REVIEWERS_ENDPOINT=https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${DEPENDENT_REPO_SLUG}/default-reviewers
- echo $DEFAULT_REVIEWERS_ENDPOINT
- >
export DEFAULT_REVIEWERS=$(curl ${DEFAULT_REVIEWERS_ENDPOINT} \
-s -S -f -X GET \
-H "Authorization: Bearer ${BB_TOKEN}" | jq '.values' | jq 'map({uuid})' )
- echo $DEFAULT_REVIEWERS
# install gulp globally (gulp is required both globally and locally)
- npm i -g gulp
# install gulp task dependencies locally
- npm i gulp axios
# setup git config
- git config --global pull.ff only
# use bot programatic user for git operations
- git config --global user.email "[email protected]" && git config --global user.name "SWE Accounts"
# clone dependent repo and enter directory
- git clone --recurse-submodules [email protected]:${BITBUCKET_REPO_OWNER}/${DEPENDENT_REPO_SLUG}.git && cd $DEPENDENT_REPO_SLUG
# create & checkout feature branch from dev branch in dependent repo
- git fetch origin
- git checkout -b $SOURCE_BRANCH origin/dev
# init and update git submodule
- git submodule update --init --remote
# git stage and commit submodule update
- git add arcimoto_aws_services
- git commit -m "$COMMIT_MESSAGE"
# push branch to origin
- git push --set-upstream origin $SOURCE_BRANCH
# go back to root bitbucket pipeline directory
- cd ..
# execute gulp task to create PR from feature branch to dev
- gulp createpr --t $BB_TOKEN --b $SOURCE_BRANCH --o $BITBUCKET_REPO_OWNER --s $DEPENDENT_REPO_SLUG --r "$DEFAULT_REVIEWERS"
- step: &build-fail-if-any-test-failures
name: Fail Build if Any Test Failures
script:
# fail the build if any unit test failures/errors in xml unittest output folder
- |
if [ ! -z "$(ls -A tests-output)" ]; then
for file in tests-output/*; do
if [ "$(grep -c '<failure\|<error' "${file}")" -gt 0 ]; then
exit 1
fi
done
fi
- step: &email-release-complete-dev
name: Send Completion Email - Dev Release
caches:
- docker
script:
- BB_LINK="https://bitbucket.org/${BITBUCKET_WORKSPACE}/${BITBUCKET_REPO_SLUG}/"
- HEADER="#Arcimoto AWS Services Release to Dev Complete"
- CONTENT="The pipeline for a merge to the \`dev\` branch for the \`arcimoto-aws-services\` repo has completed."
- BUILD_LINK="[Pipeline Execution ${BITBUCKET_BUILD_NUMBER}](${BB_LINK}/addon/pipelines/home#!/results/${BITBUCKET_BUILD_NUMBER})"
- printf "$HEADER\n\n$CONTENT\n\n$BUILD_LINK" | docker run -i datafolklabs/markdown > email_body.html
- pipe: atlassian/email-notify:0.8.0
variables:
USERNAME: $SES_SMTP_USERNAME
PASSWORD: $SES_SMTP_PASSWORD
FROM: [email protected]
SUBJECT: Arcimoto AWS Services - Release to Dev Complete
HOST: email-smtp.us-west-2.amazonaws.com
BODY_HTML: email_body.html
- step: &email-release-complete-prod
name: Send Completion Email - Production Release
caches:
- docker
script:
# add root user installed python packages to system path
- export PATH=$PATH:/root/.local/bin
# install pip packages with --user flag to auto-cache
- pip install --user -r requirements.txt
# use CI programatic user with git ssh origin
- git remote set-url origin ${BITBUCKET_GIT_SSH_ORIGIN}
- git config --global advice.detachedHead false
- git fetch
- git checkout origin/master
# create email content
- VERSION=$([[semantic-release print-version]] && semantic-release print-version || semantic-release print-version --current)
- BB_LINK="https://bitbucket.org/${BITBUCKET_WORKSPACE}/${BITBUCKET_REPO_SLUG}/"
- HEADER="#Arcimoto AWS Services v${VERSION} Release to Production Complete"
- CONTENT="The pipeline for a merge to the \`master\` branch for the \`arcimoto-aws-services\` repo has completed."
- BUILD_LINK="[Pipeline Execution ${BITBUCKET_BUILD_NUMBER}](${BB_LINK}/addon/pipelines/home#!/results/${BITBUCKET_BUILD_NUMBER})"
- printf "$HEADER\n\n$CONTENT\n\n$BUILD_LINK" | docker run -i datafolklabs/markdown > email_body.html
- pipe: atlassian/email-notify:0.8.0
variables:
USERNAME: $SES_SMTP_USERNAME
PASSWORD: $SES_SMTP_PASSWORD
FROM: [email protected]
SUBJECT: Arcimoto AWS Services v${VERSION} - Release to Production Complete
HOST: email-smtp.us-west-2.amazonaws.com
BODY_HTML: email_body.html
ATTACHMENTS: CHANGELOG.md
- step: &email-release-complete-staging
name: Send Completion Email - Staging Release
caches:
- docker
script:
- BB_LINK="https://bitbucket.org/${BITBUCKET_WORKSPACE}/${BITBUCKET_REPO_SLUG}/"
- HEADER="#Arcimoto AWS Services Release to Staging Complete"
- CONTENT="The pipeline for a merge to the \`staging\` branch for the \`arcimoto-aws-services\` repo has completed."
- BUILD_LINK="[Pipeline Execution ${BITBUCKET_BUILD_NUMBER}](${BB_LINK}/addon/pipelines/home#!/results/${BITBUCKET_BUILD_NUMBER})"
- printf "$HEADER\n\n$CONTENT\n\n$BUILD_LINK" | docker run -i datafolklabs/markdown > email_body.html
- pipe: atlassian/email-notify:0.8.0
variables:
USERNAME: $SES_SMTP_USERNAME
PASSWORD: $SES_SMTP_PASSWORD
FROM: [email protected]
SUBJECT: Arcimoto AWS Services - Release to Staging Complete
HOST: email-smtp.us-west-2.amazonaws.com
BODY_HTML: email_body.html
- step: &email-tests-complete
name: Send Tests Completion Email
caches:
- docker
script:
# count failures
- failures=0
- |
for file in tests-output/*; do
failures=$((failures+"$(grep -l '<failure\|<error' "${file}" | wc -l)"))
done
# zip up tests-output for attachment
- python -c "import shutil;shutil.make_archive('test-reports','zip',root_dir='.', base_dir='tests-output')"
# create email pieces
- SUBJECT="Arcimoto AWS Services - Tests Complete for Pull Request ${BITBUCKET_PR_ID} - "
- email=$(git log --format='%ae' ${BITBUCKET_COMMIT}^!)
- HEADER="#Arcimoto AWS Services Tests Complete - "
- |
if [ "$failures" -eq "0" ]; then
SUBJECT="${SUBJECT}Success"
HEADER="${HEADER}Success"
else
SUBJECT="${SUBJECT}Failure"
HEADER="${HEADER}Failure"
fi
- CONTENT="The pipeline running tests for the \`arcimoto-aws-services\` repo has completed."
- FAILURES="###Test Failures - ${failures}"
- BB_LINK="https://bitbucket.org/${BITBUCKET_WORKSPACE}/${BITBUCKET_REPO_SLUG}/"
- BUILD_LINK="- [Pipeline Execution ${BITBUCKET_BUILD_NUMBER}](${BB_LINK}/addon/pipelines/home#!/results/${BITBUCKET_BUILD_NUMBER})"
- PR_LINK="- [Pull Request ${BITBUCKET_PR_ID}](${BB_LINK}/pull-requests/${BITBUCKET_PR_ID})"
# assemble pieces into email
- printf "$HEADER\n\n$CONTENT\n\n$FAILURES\n\n$BUILD_LINK\n$PR_LINK" | docker run -i datafolklabs/markdown > email_body.html
# send email
- pipe: atlassian/email-notify:0.8.0
variables:
USERNAME: $SES_SMTP_USERNAME
PASSWORD: $SES_SMTP_PASSWORD
FROM: [email protected]
TO: $email
SUBJECT: $SUBJECT
HOST: email-smtp.us-west-2.amazonaws.com
BODY_HTML: email_body.html
ATTACHMENTS: test-reports.zip
- step: &get-bb-auth-token
name: Get BB Auth Token
image: node:18
caches:
- node
script:
# set pipeline to fail on errors
- set -e
- apt-get update && apt-get -y install curl jq
# get BB token via API
- >
export BB_TOKEN=$(curl -s -S -f -X POST -u "${BB_AUTH_STRING}" \
https://bitbucket.org/site/oauth2/access_token \
-d grant_type=client_credentials -d scopes="repository" | jq --raw-output '.access_token')
- echo $BB_TOKEN > bb_token.txt
- > # if file empty fail step
[ -s bb_token.txt ] || exit 1
artifacts:
- bb_token.txt
- step: &publish-new-semantic-release
name: Publish New Semantic Release
caches:
- pip
script:
# add root user installed python packages to system path
- export PATH=$PATH:/root/.local/bin
# install pip packages with --user flag to auto-cache
- pip install --user -r requirements.txt
# set initial version variable for comparison later
- export VERSION_INITIAL=$(semantic-release print-version --current)
# allow push using CI programatic user during semantic-release publish op by using git ssh origin
- git remote set-url origin ${BITBUCKET_GIT_SSH_ORIGIN}
# create directory for release output info
- mkdir release-publish
# capture output of semantic-release publish in file
# publish new semantic release if warranted
- semantic-release publish > release-publish/semantic_release_publish_build_output.txt
# set current version variable for comparison later
- export VERSION_CURRENT=$(semantic-release print-version --current)
# set boolean variable for if new version was published
- |
if [ "$VERSION_INITIAL" != "$VERSION_CURRENT" ]; then
export VERSION_PUBLISHED=true
else
export VERSION_PUBLISHED=false
fi
# set new version creation info into files for use in other steps
- echo $VERSION_CURRENT > release-publish/version_current.txt
- echo $VERSION_INITIAL > release-publish/version_initial.txt
- echo $VERSION_PUBLISHED > release-publish/version_published.txt
# read major, minor, patch version numbers into separate variables
- IFS=. read -r VERSION_INITIAL_MAJOR VERSION_INITIAL_MINOR VERSION_INITIAL_PATCH <<< $VERSION_INITIAL
- IFS=. read -r VERSION_CURRENT_MAJOR VERSION_CURRENT_MINOR VERSION_CURRENT_PATCH <<< $VERSION_CURRENT
# set default of empty string for version published type
- export VERSION_PUBLISHED_TYPE=""
# process file output to determine version bump type, exit with failure if unable to determine
- |
if [ "$VERSION_PUBLISHED" = true ]; then
if [ $VERSION_CURRENT_MAJOR -gt $VERSION_INITIAL_MAJOR ]; then
export VERSION_PUBLISHED_TYPE="major"
elif [ $VERSION_CURRENT_MINOR -gt $VERSION_INITIAL_MINOR ]; then
export VERSION_PUBLISHED_TYPE="minor"
elif [ $VERSION_CURRENT_PATCH -gt $VERSION_INITIAL_PATCH ]; then
export VERSION_PUBLISHED_TYPE="patch"
fi
if [ -z "${VERSION_PUBLISHED_TYPE}" ]; then
exit "Failure: New version published but unable to determine VERSION_PUBLISHED_TYPE from VERSION_INITIAL ({$VERSION_INITIAL}) and VERSION_CURRENT ({$VERSION_CURRENT}) comparison"
fi
fi
- echo $VERSION_PUBLISHED_TYPE > release-publish/version_published_type.txt
# rebase master onto staging and dev branches if new version was published
- |
if [ "$VERSION_PUBLISHED" = true ]; then
git fetch
git checkout -b staging
git rebase master
git push
git checkout -b dev
git rebase master
git push
fi
artifacts:
- release-publish/**
- step: &tests-linting-flake8
# this will cause a step failure if there are any linting failures
name: Test - Linting - Flake8
caches:
- pip
script:
# add root user installed python packages to system path
- export PATH=$PATH:/root/.local/bin
# install pip packages with --user flag to auto-cache
- pip install --user -r requirements.txt
# run tests
- flake8 arcimoto_aws_services --max-line-length=180 --ignore=E501,W503,W504 >> linting_flake8.txt
- flake8 tests --max-line-length=180 --ignore=E501,W503,W504 >> linting_flake8.txt
artifacts:
- linting_flake8.txt
- step: &tests-unit-run
name: Unit Tests - Run
caches:
- pip
script:
# add root user installed python packages to system path
- export PATH=$PATH:/root/.local/bin
# install pip packages with --user flag to auto-cache
- pip install --user -r requirements.txt
# setup tests output directory
- mkdir test-reports
# run tests
- python bitbucket-pipelines-tests-runner.py
# tests-output folder carried to other steps to prevent polution from tests auto-detection
- cp -a test-reports/. tests-output
artifacts:
- tests-output/**
pipelines:
pull-requests:
'TEL-*':
- step: *tests-linting-flake8
- step: *tests-unit-run
- parallel: # finish
- step: *email-tests-complete
- step: *build-fail-if-any-test-failures
branches:
dev:
- step: *email-release-complete-dev
staging:
- step: *email-release-complete-staging
master:
- parallel:
- step: *get-bb-auth-token
- step: *publish-new-semantic-release
- parallel:
- step: *automate-pr-to-arcimoto-lambda-global-dependencies
- step: *automate-pr-to-arcimoto-lambda-utility
- step: *automate-pr-to-arcimoto-ses-utility
- step: *email-release-complete-prod