From 97bb7c8d0b3f27f337860308463d2c0b193d7d7f Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Wed, 7 Aug 2019 15:20:34 +0200 Subject: [PATCH] [Jenkins] Run pre-commit hooks on Jenkins Git Check stage. --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d705286ffb1..113d0dfdaf0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,9 +25,11 @@ pipeline { } stages { // *************************** Git Check ********************************** - stage('Git Check') { + stage('Pre-checks') { agent { label "master"} steps { + sh "pre-commit install" + sh "pre-commit run --all-files" sh "git config core.whitespace -blank-at-eof" sh "git diff --check `git merge-base origin/master HEAD` HEAD -- . ':!*.md' ':!*.pandoc' ':!*.asc' ':!*.dat' ':!*.ts'" dir('scripts/jenkins') { stash(name: 'known_hosts', includes: 'known_hosts') } -- GitLab