Skip to content

Commit a5fd8fb

Browse files
author
Ganeshwara Herawan Hananda
authored
Add a release-clenaup step which deletes the trigger-ci-release branch (#6)
Add a release-cleanup step which deletes the trigger-ci-release branch
1 parent 313a9ee commit a5fd8fb

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

.circleci/approve-release.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ def check_output_discarding_stderr(*args, **kwargs):
4141
status = check_output_discarding_stderr(['curl', GRABL_URL_STATUS])
4242

4343
if status == 'deploy':
44-
print("Deployment approved, creating the 'trigger-workflow-deploy' branch "
44+
print("Deployment approved, creating the 'trigger-ci-release' branch "
4545
"in order to trigger the deployment process")
46-
subprocess.call(['git', 'branch', 'trigger-workflow-deploy', 'HEAD'])
47-
subprocess.call(['git', 'push', 'origin', 'trigger-workflow-deploy:trigger-workflow-deploy'])
46+
subprocess.call(['git', 'branch', 'trigger-ci-release', 'HEAD'])
47+
subprocess.call(['git', 'push', 'origin', 'trigger-ci-release:trigger-ci-release'])
4848
elif status == 'do-not-deploy':
4949
print('Deployment has been manually rejected by an administrator')
5050
break

.circleci/config.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ jobs:
8080
- checkout
8181
- run: python .circleci/approve-release.py
8282

83+
release-cleanup:
84+
machine: true
85+
steps:
86+
- checkout
87+
- run: git push --delete origin trigger-ci-release
88+
8389
build-workbase-linux:
8490
machine: true
8591
working_directory: ~/grakn
@@ -146,7 +152,7 @@ workflows:
146152
- test:
147153
filters:
148154
branches:
149-
ignore: /master|trigger-workflow-deploy/
155+
ignore: /master|trigger-ci-release/
150156
ci-master-branch:
151157
jobs:
152158
- test:
@@ -164,15 +170,21 @@ workflows:
164170
- build-workbase-mac:
165171
filters:
166172
branches:
167-
only: trigger-workflow-deploy
173+
only: trigger-ci-release
168174
- build-workbase-linux:
169175
filters:
170176
branches:
171-
only: trigger-workflow-deploy
177+
only: trigger-ci-release
172178
- publish-github-draft:
173179
requires:
174180
- build-workbase-mac
175181
- build-workbase-linux
176182
filters:
177183
branches:
178-
only: trigger-workflow-deploy
184+
only: trigger-ci-release
185+
- release-cleanup:
186+
requires:
187+
- publish-github-draft
188+
filters:
189+
branches:
190+
only: trigger-ci-release

0 commit comments

Comments
 (0)