fix(jenkins): use templ docker image for building

This commit is contained in:
Araozu 2024-10-08 19:38:02 -05:00
parent e75a7c095a
commit 15d6f897e9

13
Jenkinsfile vendored
View File

@ -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'
}