@@ -91,6 +91,33 @@ check:test:
91
91
- if : $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH !~ /^(?:master|staging)$/ && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
92
92
when : manual
93
93
94
+ build:merge :
95
+ stage : build
96
+ needs : []
97
+ # Don't interrupt publishing job
98
+ interruptible : false
99
+ allow_failure : true
100
+ script :
101
+ - >
102
+ nix-shell -I nixpkgs=./pkgs.nix --packages git gitAndTools.gh --run '
103
+ if [ ! gh pr view staging --repo MatrixAI/TypeScript-Demo-Lib-Native >/dev/null 2>/dev/null ]; then
104
+ gh pr create \
105
+ --head staging \
106
+ --base master \
107
+ --title 'Merge staging to master' \
108
+ --fill \
109
+ --assignee '@me' \
110
+ --no-maintainer-edit \
111
+ --repo MatrixAI/TypeScript-Demo-Lib-Native;
112
+ fi;
113
+ gh pr merge staging \
114
+ --auto \
115
+ --repo MatrixAI/TypeScript-Demo-Lib-Native;
116
+ '
117
+ rules :
118
+ # Runs on staging commits
119
+ - if : $CI_COMMIT_BRANCH == 'staging'
120
+
94
121
build:linux :
95
122
stage : build
96
123
needs :
@@ -271,6 +298,8 @@ integration:deployment:
271
298
stage : integration
272
299
needs :
273
300
- integration:builds
301
+ # Don't interrupt deploying job
302
+ interruptible : false
274
303
script :
275
304
- echo 'Perform service deployment for integration testing'
276
305
rules :
@@ -422,35 +451,15 @@ integration:prerelease:
422
451
# Dependencies must not run on the version commit
423
452
- if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+-.*[0-9]+$/
424
453
425
- integration:merge :
426
- stage : integration
427
- needs :
428
- - job : integration:nix
429
- optional : true
430
- - job : integration:docker
431
- optional : true
432
- - job : integration:linux
433
- optional : true
434
- - job : integration:windows
435
- optional : true
436
- - job : integration:macos
437
- optional : true
438
- script :
439
- - echo 'use gh to create and merge PR from staging to master'
440
- - echo 'use github commit status to signal master to allow merge'
441
- rules :
442
- # Runs on staging commits and ignores version commits
443
- - if : $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
444
- # Runs on tag pipeline where the tag is a prerelease or release version
445
- - if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
446
-
447
454
release:deployment :
448
455
stage : release
449
456
needs :
450
457
- project : $CI_PROJECT_PATH
451
458
job : integration:builds
452
459
ref : staging
453
460
artifacts : true
461
+ # Don't interrupt deploying job
462
+ interruptible : false
454
463
script :
455
464
- echo 'Perform service deployment for production'
456
465
rules :
0 commit comments