fix: jenkinsfile

This commit is contained in:
Araozu 2024-10-06 20:45:54 -05:00
parent e2be83ce24
commit fb78742fce
2 changed files with 13 additions and 10 deletions

22
Jenkinsfile vendored
View File

@ -1,20 +1,22 @@
pipeline {
agent {
docker {
image 'golang:1.23-alpine'
}
}
agent any
stages {
stage('Install deps') {
stage('Install') {
agent {
docker {
image 'golang:1.23-alpine'
reuseNode true
}
}
steps {
sh 'go mod tidy'
}
}
stage('Build binary') {
steps {
sh 'go build main.go'
}
}
stage('Populate env') {
sh 'rm .env || true'
sh 'echo "PORT=8007" > .env'
}
stage('Profit') {
steps {
dir('docker') {

View File

@ -2,6 +2,7 @@ FROM alpine:3
COPY ../main .
COPY ../public .
COPY ../.env .
CMD ["main"]