From aeb5c75da7d35b56825f83f6b365a2f244492e86 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 13 May 2020 14:02:03 +0200 Subject: [PATCH] ci: install commitlint in the test container-image The `commitlint` command can be used to verify the subject of commit messages, so it is added to the $PATH. See-also: https://commitlint.js.org Signed-off-by: Niels de Vos --- scripts/Dockerfile.test | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/Dockerfile.test b/scripts/Dockerfile.test index d34694139..9f7e133a9 100644 --- a/scripts/Dockerfile.test +++ b/scripts/Dockerfile.test @@ -17,8 +17,7 @@ ARG GOPATH=/go ENV \ GOPATH=${GOPATH} \ GO111MODULE=on \ - PATH="${GOPATH}/bin:${PATH}" - + PATH="${GOPATH}/bin:/opt/commitlint/node_modules/.bin:${PATH}" RUN dnf -y install \ git \ @@ -30,6 +29,7 @@ RUN dnf -y install \ rubygems \ ShellCheck \ yamllint \ + npm \ && dnf -y update \ && dnf -y clean all \ && gem install mdl \ @@ -38,6 +38,10 @@ RUN dnf -y install \ && curl -sfL "https://raw.githubusercontent.com/securego/gosec/master/install.sh" \ | sh -s -- -b $GOPATH/bin "${GOSEC_VERSION}" \ && curl -L https://git.io/get_helm.sh | bash \ + && mkdir /opt/commitlint && pushd /opt/commitlint \ + && npm init -y \ + && npm install @commitlint/cli \ + && popd \ && true WORKDIR /go/src/github.com/ceph/ceph-csi