refactor(gitlab_release): file link to be in local repository for helping fix commit footer ref check failures
issue #4
This commit is contained in:
@ -62,7 +62,7 @@ commit footer refs:
|
|||||||
before_script:
|
before_script:
|
||||||
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME"
|
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME"
|
||||||
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests"
|
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests"
|
||||||
- if [ "0$JOB_ROOT_DIR" == "0" ]; then ROOT_DIR=$DEFAULT_ROOT_DIR; else ROOT_DIR=$JOB_ROOT_DIR ; fi
|
- if [ "0$JOB_ROOT_DIR" == "0" ]; then export ROOT_DIR=$DEFAULT_ROOT_DIR; else export ROOT_DIR=$JOB_ROOT_DIR ; fi
|
||||||
- echo "[DEBUG] ROOT_DIR[$ROOT_DIR]"
|
- echo "[DEBUG] ROOT_DIR[$ROOT_DIR]"
|
||||||
- apt update
|
- apt update
|
||||||
- apt install --no-install-recommends -y git
|
- apt install --no-install-recommends -y git
|
||||||
|
@ -76,7 +76,7 @@ class Commits:
|
|||||||
for commit in self._failed:
|
for commit in self._failed:
|
||||||
for key in commit:
|
for key in commit:
|
||||||
junit_testcase += '''
|
junit_testcase += '''
|
||||||
<testcase classname="{0}" file="https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/blob/development/gitlab_release/README.md" line="0" name="No commit footer references found" time="0" timestamp="date">
|
<testcase classname="{0}" file="{2}/gitlab_release/README.md" line="0" name="No commit footer references found" time="0" timestamp="date">
|
||||||
<failure message="No References in the commit footer" type="validation">{1}</failure>
|
<failure message="No References in the commit footer" type="validation">{1}</failure>
|
||||||
<system-out>
|
<system-out>
|
||||||
<![CDATA[ {1} ]]>
|
<![CDATA[ {1} ]]>
|
||||||
@ -84,11 +84,11 @@ class Commits:
|
|||||||
<system-err>
|
<system-err>
|
||||||
<![CDATA[ {1} ]]>
|
<![CDATA[ {1} ]]>
|
||||||
</system-err>
|
</system-err>
|
||||||
</testcase>'''.format(key, str(commit[key]))
|
</testcase>'''.format(key, str(commit[key], os.environ['ROOT_DIR']))
|
||||||
|
|
||||||
|
|
||||||
if junit_testcase == '':
|
if junit_testcase == '':
|
||||||
junit_testcase = '<testcase classname="nil" file="https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/blob/development/gitlab_release/README.md" name="commit footer references"/>'
|
junit_testcase = '<testcase classname="Commit footer references check" file="' + os.environ['ROOT_DIR'] + '/gitlab_release/README.md" name="has commit footer references"/>'
|
||||||
|
|
||||||
junit_close = '</testsuite></testsuites>'
|
junit_close = '</testsuite></testsuites>'
|
||||||
print(str(junit_testsuites))
|
print(str(junit_testsuites))
|
||||||
|
Reference in New Issue
Block a user