summaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorMichal Nowikowski <godfryd@isc.org>2019-06-14 06:20:58 +0200
committerMichal Nowikowski <godfryd@isc.org>2019-12-19 13:13:46 +0100
commit8bc8f7872f5177104cdb59dfa6121717bd4fa88f (patch)
treec8fa5fe35103ffd9f6eb34df3b3a2f7dfb5f72bd /.gitlab-ci.yml
parent[#1060] Hooks version bumped to 12. (diff)
downloadkea-8bc8f7872f5177104cdb59dfa6121717bd4fa88f.tar.xz
kea-8bc8f7872f5177104cdb59dfa6121717bd4fa88f.zip
[#672] added danger for checking commits compliance
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml24
1 files changed, 19 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 65067ae42d..6ed27acafb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,15 +1,13 @@
-
-
variables:
# Not normally needed, but may be if some script uses `apt-get install`.
DEBIAN_FRONTEND: noninteractive
-# Locale settings do not affect the build, but might affect tests.
+ # Locale settings do not affect the build, but might affect tests.
LC_ALL: C
CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9
-# Disabled warnings:
-# SC2039 - complains about local var: In POSIX sh, 'local' is undefined.
+ # Disabled warnings:
+ # SC2039 - complains about local var: In POSIX sh, 'local' is undefined.
SHELLCHECK_OPTS: "--exclude=SC2039"
stages:
@@ -19,6 +17,7 @@ shellcheck:
stage: test
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
before_script:
+ - sudo apt-get update
- sudo apt-get -y install shellcheck
script:
- SCRIPTS="src/bin/keactrl/keactrl.in "
@@ -27,3 +26,18 @@ shellcheck:
- SCRIPTS+="tools/cql_config "
- SCRIPTS+="tools/sysrepo_config "
- shellcheck ${SCRIPTS} ${SHELLCHECK_OPTS}
+
+danger:
+ stage: test
+ image: registry.gitlab.isc.org/isc-projects/stork/ci-danger
+ before_script:
+ - export CI_MERGE_REQUEST_ID=$(git ls-remote -q origin merge-requests\*\head | grep $CI_COMMIT_SHA | sed 's/.*refs\/merge-requests\/\([0-9]*\)\/head/\1/g')
+ - export CI_PROJECT_PATH=$CI_PROJECT_ID #some version of gitlab has problems with searching by project path
+ - export DANGER_GITLAB_HOST=gitlab.isc.org
+ - export DANGER_GITLAB_API_BASE_URL=https://gitlab.isc.org/api/v4
+ - sysctl -w net.ipv6.conf.all.disable_ipv6=1
+ - sysctl -w net.ipv6.conf.default.disable_ipv6=1
+ script:
+ - echo '149.20.48.126 gitlab.isc.org' >> /etc/hosts
+ - gem install danger-commit_lint
+ - danger --fail-on-errors=true --new-comment