Skip to content

Commit 1792993

Browse files
author
Mangesh Malusare
committed
Merge branch 'ci' into 'master'
ci: Error handling for test branch creation in yml script See merge request app-frameworks/esp_hosted!119
2 parents cd22e98 + 30b0a6e commit 1792993

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ deploy_test_github:
3333
- git remote remove github &>/dev/null || true
3434
- git remote add github [email protected]:espressif/esp-hosted.git
3535
# Using test branch
36-
- git branch ${TEST_BRANCH}
36+
- git branch ${TEST_BRANCH} 2>&1 || echo "Branch exists" && git branch -D ${TEST_BRANCH} 2>&1 || echo "Branch deleted" && git branch ${TEST_BRANCH} 2>&1 && echo "Branch created"
3737
- git push github "${CI_COMMIT_SHA}:refs/heads/${TEST_BRANCH}"
3838

3939
.deploy_master_github:
@@ -56,4 +56,5 @@ deploy_test_github:
5656
- git remote remove github &>/dev/null || true
5757
- git remote add github [email protected]:espressif/esp-hosted.git
5858
# Using master branch
59-
#- git push github "${CI_COMMIT_SHA}:refs/heads/${MASTER_BRANCH}"
59+
#- git push github "${CI_COMMIT_SHA}:refs/heads/${MASTER_BRANCH}"
60+

0 commit comments

Comments
 (0)