chore(ci): stop relying on merge request pipelines

This commit changes the `lint` stage in the CI to run a branch pipelines
like all the other stages, rather than running on separate merge
request pipelines.
parent 38441d64
......@@ -18,7 +18,7 @@ variables:
stage: lint
only:
- master
- merge_requests
- branches
lint es_input:
<<: *lint_definition
......@@ -39,14 +39,12 @@ lint commits:
image: node:8
script:
- npm install -g @commitlint/cli @commitlint/config-conventional
- if [[ -n ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} && -n ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} ]]; then
`# This mess can be avoided when https://gitlab.com/gitlab-org/gitlab-ce/issues/60962 is merged`
git fetch origin ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME};
git fetch origin ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME};
commitlint --from=origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} --to=origin/${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME};
else
- if [[ ${CI_COMMIT_REF_NAME} = "master" ]]; then
commitlint --from=257ace67f316d96d0f49de8f349d06d6aa306515;
fi;
else
git fetch origin master;
commitlint --from=origin/master;
fi
# Build
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment