diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index e21ce61c5..166fb9286 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -68,12 +68,14 @@ async { } task('pre-commit') { - sh ''' - apt update - apt install -y --no-install-recommends pre-commit - ''' // TODO: Make an OCI image for pre-commit + golang? Unpack golang tarball with a library function? - withEnv(['SKIP=make-lint,go-staticcheck-repo-mod,go-unit-tests,gofumpt']) { - sh 'pre-commit run --color=always --hook-stage=manual --all-files' + dockerfile(""" + FROM ${golangDefault} + RUN apt update && \ + apt install -y --no-install-recommends pre-commit + """) { + withEnv(['SKIP=make-lint,go-staticcheck-repo-mod,go-unit-tests,gofumpt']) { + sh 'pre-commit run --color=always --hook-stage=manual --all-files' + } } } }