From 15d6f897e9e2d51bfbbda9d5db62e4e2f620886d Mon Sep 17 00:00:00 2001 From: Araozu Date: Tue, 8 Oct 2024 19:38:02 -0500 Subject: [PATCH] fix(jenkins): use templ docker image for building --- Jenkinsfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 009584a..479e634 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,17 @@ pipeline { agent any stages { + stage('Build templ files') { + agent { + docker { + image 'ghcr.io/a-h/templ:latest' + reuseNode true + } + } + steps { + sh 'templ generate' + } + } stage('Build go binary') { agent { docker { @@ -9,8 +20,6 @@ pipeline { } } steps { - sh 'go install github.com/a-h/templ/cmd/templ@latest' - sh 'templ generate' sh 'go mod tidy' sh 'go build main.go' }