Merge branch '6-fix-merging-jobs-failing' into 'development'
fix: merge jobs failing See merge request nofusscomputing/projects/gitlab-ci!13
This commit is contained in:
36
README.md
36
README.md
@ -1,20 +1,40 @@
|
|||||||
<div align="center">
|
<div align="center" width="100%">
|
||||||
|
|
||||||
# No Fuss Computing - Gitlab-CI
|
# No Fuss Computing - Gitlab-CI
|
||||||
|
|
||||||
[](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues)
|
<br>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
  [](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues)
|
||||||
|
|
||||||
|
  
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
This project is hosted on [Gitlab](https://gitlab.com/nofusscomputing/projects/gitlab-ci) and has a read-only copy hosted on [Github](https://github.com/NoFussComputing/gitlab-ci).
|
||||||
|
|
||||||
|
|
||||||
| Stable Branch | [](https://gitlab.com/nofusscomputing/projects/gitlab-ci) | [](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/jobs/artifacts/master/file/artifacts/validation/tests/gl-code-quality-report.html?job=PyLint) |
|
----
|
||||||
|:----|:----|:----|
|
|
||||||
|
|
||||||
| development Branch | [](https://gitlab.com/nofusscomputing/projects/gitlab-ci) | [](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/jobs/artifacts/development/file/artifacts/validation/tests/gl-code-quality-report.html?job=PyLint) |
|
**Stable Branch**
|
||||||
|:----|:----|:----|
|
|
||||||
|
  [](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/jobs/artifacts/master/file/artifacts/validation/tests/gl-code-quality-report.html?job=PyLint)
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
**Development Branch**
|
||||||
|
|
||||||
|
  [](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/jobs/artifacts/development/file/artifacts/validation/tests/gl-code-quality-report.html?job=PyLint)
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
This repository is hosted on [gitlab.com](https://gitlab.com/nofusscomputing/projects/gitlab-ci) and has a read-only copy hosted on [github.com](https://github.com/NoFussComputing/gitlab-ci).
|
|
||||||
|
|
||||||
links:
|
links:
|
||||||
|
|
||||||
- [Issues](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues)
|
- [Issues](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues)
|
||||||
|
@ -55,8 +55,9 @@ MR Title:
|
|||||||
extends:
|
extends:
|
||||||
- .conventional_commit
|
- .conventional_commit
|
||||||
script:
|
script:
|
||||||
- echo "[DEBUG] Merge Request Title[$($ROOT_DIR/conventional_commits/scripts/commit.py --token "$MR_ACCESS_TOKEN" --project $PROJECT_ID --title --branch $CI_COMMIT_BRANCH)]"
|
- MR_TITLE=$($ROOT_DIR/conventional_commits/scripts/commit.py --token "$MR_ACCESS_TOKEN" --project $PROJECT_ID --title --branch $CI_COMMIT_BRANCH)
|
||||||
- cz_exit=0 && cz check --message "$($ROOT_DIR/conventional_commits/scripts/commit.py --token "$MR_ACCESS_TOKEN" --project $PROJECT_ID --title --branch $CI_COMMIT_BRANCH)" > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/cz_output.log" 2>&1 || cz_exit=$?
|
- echo "[DEBUG] MR_TITLE[$MR_TITLE]"
|
||||||
|
- cz_exit=0 && cz check --message "$MR_TITLE" > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/cz_output.log" 2>&1 || cz_exit=$?
|
||||||
- . $ROOT_DIR/conventional_commits/scripts/cz_junit.sh > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/$CI_JOB_NAME-cz.junit.xml"
|
- . $ROOT_DIR/conventional_commits/scripts/cz_junit.sh > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/$CI_JOB_NAME-cz.junit.xml"
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ for opt, arg in opts:
|
|||||||
#gl = gitlab.Gitlab('https://gitlab.com', private_token=ci_job_token)
|
#gl = gitlab.Gitlab('https://gitlab.com', private_token=ci_job_token)
|
||||||
|
|
||||||
|
|
||||||
url = 'https://gitlab.com/api/v4/projects/' + project_id + '/merge_requests'
|
url = 'https://gitlab.com/api/v4/projects/' + project_id + '/merge_requests?state=opened&source_branch=' + git_branch
|
||||||
|
|
||||||
merge_requests = ""
|
merge_requests = ""
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ if not isinstance(merge_requests, list):
|
|||||||
#mrs = gl.mergerequests.list()
|
#mrs = gl.mergerequests.list()
|
||||||
|
|
||||||
|
|
||||||
mr_title = ''
|
mr_title = 'failed to fetch Merge Request title'
|
||||||
mr_first_commit = ''
|
mr_first_commit = ''
|
||||||
target_branch = ''
|
target_branch = ''
|
||||||
|
|
||||||
@ -96,5 +96,5 @@ if isinstance(merge_requests, list):
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
print('ci: No Merge Request found')
|
print('ci: No Merge Request found, MR count "0"')
|
||||||
|
|
||||||
|
@ -85,8 +85,7 @@ commit footer refs:
|
|||||||
junit:
|
junit:
|
||||||
- "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/*.junit.xml"
|
- "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/*.junit.xml"
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_BRANCH == "master"'
|
- if: '$CI_COMMIT_BRANCH == "development" || $CI_COMMIT_BRANCH == "master"'
|
||||||
- if: '$CI_COMMIT_BRANCH == "development"'
|
|
||||||
when: never
|
when: never
|
||||||
- if: '$CI_COMMIT_BRANCH && $CHANGELOG_FOOTER_REFERENCES != "False"'
|
- if: '$CI_COMMIT_BRANCH && $CHANGELOG_FOOTER_REFERENCES != "False"'
|
||||||
when: always
|
when: always
|
||||||
|
@ -36,8 +36,6 @@
|
|||||||
junit:
|
junit:
|
||||||
- "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/*.junit.xml"
|
- "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/*.junit.xml"
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_BRANCH == "master"'
|
|
||||||
when: never
|
|
||||||
- if: '$CI_COMMIT_BRANCH'
|
- if: '$CI_COMMIT_BRANCH'
|
||||||
when: always
|
when: always
|
||||||
- when: never
|
- when: never
|
||||||
|
Reference in New Issue
Block a user