aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2020-09-15 16:55:41 -0700
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2020-09-16 01:04:34 +0000
commitece76abdd3ffcc7c045eb3d30bd341de2243dfc2 (patch)
tree7b66cac04205d203bdcd5e14015396262f36bf61 /.gitlab-ci.yml
parent573894d870b466d475009959412f25dfa68c67bb (diff)
GitLab CI: Move commit validation to its own job.
Move the pre-commit and validate-commit checks to their own job. This lets us quickly re-run validate-commit in case the submitter forgets to check "Allow commits from members who can merge to the target branch" Shorten the "merge-request" prefix to "merge-req" in order to make it easier to distinguish between each job in the GitLab UI.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml23
1 files changed, 17 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 776e0bf711..5c847ecd73 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -149,22 +149,33 @@ test:debian-stable:
- build:debian-stable
# https://docs.gitlab.com/ee/user/gitlab_com/index.html#linux-shared-runners
-merge-request:ubuntu-dpkg:
+
+merge-req:commit-checks:
<<: *build-ubuntu
tags:
- docker
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
script:
- - apt-get install -y lintian
# build-ubuntu puts us in `build`.
- cd ..
- bash ./tools/pre-commit 'HEAD^1'
- - sh -c '[ ! -e tools/validate-commit.py ] || tools/validate-commit.py'
+ - tools/validate-commit.py
+
+merge-req:ubuntu-dpkg:
+ <<: *build-ubuntu
+ tags:
+ - docker
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+ script:
+ - apt-get install -y lintian
+ # build-ubuntu puts us in `build`.
+ - cd ..
- CC=/usr/lib/ccache/gcc CXX=/usr/lib/ccache/g++ dpkg-buildpackage -us -uc -rfakeroot -jauto -Zgzip -zfast
- lintian --suppress-tags library-not-linked-against-libc --display-experimental --display-info --pedantic --profile debian
-merge-request:ubuntu-gcc-ctest:
+merge-req:ubuntu-gcc-ctest:
<<: *build-ubuntu
tags:
- docker
@@ -179,7 +190,7 @@ merge-request:ubuntu-gcc-ctest:
- chown -R user .
- su user -c "ctest --parallel 3 --force-new-ctest-process --verbose"
-merge-request:ubuntu-clang-other-tests:
+merge-req:ubuntu-clang-other-tests:
extends: clang-10
tags:
- docker
@@ -203,7 +214,7 @@ merge-request:ubuntu-clang-other-tests:
# Dockerfile at https://github.com/wireshark/wireshark-windows-dev-docker.
# XXX We currently depend on Qt being installed in C:\Qt on the host. We should
# find a more independent way of installing Qt, e.g. via a download+cache.
-merge-request:windows:
+merge-req:windows:
tags:
- wireshark-windows-dev
stage: build