Loading .gitlab-ci.yml +10 −9 Original line number Diff line number Diff line Loading @@ -405,15 +405,16 @@ clang-format-check: - .test-job-linux - .rules-merge-request variables: ARTIFACT_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix.patch" ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix" PATCH_FILE_NAME: "$ARTIFACT_BASE_NAME.patch" INSTRUCTIONS_GITLAB: "To fix formatting issues:\n - download the diff patch available as artifact of this job\n - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n - run: git apply $ARTIFACT_NAME - run: git apply $PATCH_FILE_NAME - commit new changes" INSTRUCTIONS_README: "To fix formatting issues:\n - place the patch file in the root directory of your local IVAS repo\n - run: git apply $ARTIFACT_NAME - run: git apply $PATCH_FILE_NAME - commit new changes" stage: validate needs: [] Loading @@ -422,21 +423,21 @@ clang-format-check: - scripts/check-format.sh -af -p 8 || format_problems=$? - if [ $format_problems == 0 ] ; then exit 0; fi - mkdir tmp-formatting - git diff > "tmp-formatting/$ARTIFACT_NAME" - mkdir tmp-formatting-fix - git diff > "tmp-formatting-fix/$PATCH_FILE_NAME" # Print instructions to job output - echo $INSTRUCTIONS_GITLAB - echo -e "$INSTRUCTIONS_GITLAB" # Include readme in the artifact, in case someone misses the job printout (e.g. getting the artifact via MR interface) - echo $INSTRUCTIONS_README > "tmp-formatting/readme.txt" - echo -e "$INSTRUCTIONS_README" > "tmp-formatting-fix/readme.txt" - exit $format_problems artifacts: paths: - tmp-formatting/ - tmp-formatting-fix/ when: on_failure name: $ARTIFACT_NAME name: "$ARTIFACT_BASE_NAME" expose_as: 'formatting patch' # --------------------------------------------------------------- Loading Loading
.gitlab-ci.yml +10 −9 Original line number Diff line number Diff line Loading @@ -405,15 +405,16 @@ clang-format-check: - .test-job-linux - .rules-merge-request variables: ARTIFACT_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix.patch" ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix" PATCH_FILE_NAME: "$ARTIFACT_BASE_NAME.patch" INSTRUCTIONS_GITLAB: "To fix formatting issues:\n - download the diff patch available as artifact of this job\n - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n - run: git apply $ARTIFACT_NAME - run: git apply $PATCH_FILE_NAME - commit new changes" INSTRUCTIONS_README: "To fix formatting issues:\n - place the patch file in the root directory of your local IVAS repo\n - run: git apply $ARTIFACT_NAME - run: git apply $PATCH_FILE_NAME - commit new changes" stage: validate needs: [] Loading @@ -422,21 +423,21 @@ clang-format-check: - scripts/check-format.sh -af -p 8 || format_problems=$? - if [ $format_problems == 0 ] ; then exit 0; fi - mkdir tmp-formatting - git diff > "tmp-formatting/$ARTIFACT_NAME" - mkdir tmp-formatting-fix - git diff > "tmp-formatting-fix/$PATCH_FILE_NAME" # Print instructions to job output - echo $INSTRUCTIONS_GITLAB - echo -e "$INSTRUCTIONS_GITLAB" # Include readme in the artifact, in case someone misses the job printout (e.g. getting the artifact via MR interface) - echo $INSTRUCTIONS_README > "tmp-formatting/readme.txt" - echo -e "$INSTRUCTIONS_README" > "tmp-formatting-fix/readme.txt" - exit $format_problems artifacts: paths: - tmp-formatting/ - tmp-formatting-fix/ when: on_failure name: $ARTIFACT_NAME name: "$ARTIFACT_BASE_NAME" expose_as: 'formatting patch' # --------------------------------------------------------------- Loading