fix: merge jobs failing #63
36
README.md
36
README.md
@ -1,20 +1,40 @@
|
||||
<div align="center">
|
||||
<div align="center" width="100%">
|
||||
|
||||
# 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>
|
||||
|
||||
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:
|
||||
|
||||
- [Issues](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues)
|
||||
|
@ -55,8 +55,9 @@ MR Title:
|
||||
extends:
|
||||
- .conventional_commit
|
||||
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)]"
|
||||
- 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=$?
|
||||
- MR_TITLE=$($ROOT_DIR/conventional_commits/scripts/commit.py --token "$MR_ACCESS_TOKEN" --project $PROJECT_ID --title --branch $CI_COMMIT_BRANCH)
|
||||
- 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"
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ for opt, arg in opts:
|
||||
#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 = ""
|
||||
|
||||
@ -77,7 +77,7 @@ if not isinstance(merge_requests, list):
|
||||
#mrs = gl.mergerequests.list()
|
||||
|
||||
|
||||
mr_title = ''
|
||||
mr_title = 'failed to fetch Merge Request title'
|
||||
mr_first_commit = ''
|
||||
target_branch = ''
|
||||
|
||||
@ -96,5 +96,5 @@ if isinstance(merge_requests, list):
|
||||
|
||||
else:
|
||||
|
||||
print('ci: No Merge Request found')
|
||||
print('ci: No Merge Request found, MR count "0"')
|
||||
|
||||
|
@ -85,8 +85,7 @@ commit footer refs:
|
||||
junit:
|
||||
- "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/*.junit.xml"
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "master"'
|
||||
- if: '$CI_COMMIT_BRANCH == "development"'
|
||||
- if: '$CI_COMMIT_BRANCH == "development" || $CI_COMMIT_BRANCH == "master"'
|
||||
when: never
|
||||
- if: '$CI_COMMIT_BRANCH && $CHANGELOG_FOOTER_REFERENCES != "False"'
|
||||
when: always
|
||||
|
@ -36,8 +36,6 @@
|
||||
junit:
|
||||
- "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/*.junit.xml"
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "master"'
|
||||
when: never
|
||||
- if: '$CI_COMMIT_BRANCH'
|
||||
when: always
|
||||
- when: never
|
||||
|
Reference in New Issue
Block a user