music-to-go/Jenkinsfile
2024-10-06 20:45:54 -05:00

30 lines
441 B
Groovy

pipeline {
agent any
stages {
stage('Install') {
agent {
docker {
image 'golang:1.23-alpine'
reuseNode true
}
}
steps {
sh 'go mod tidy'
sh 'go build main.go'
}
}
stage('Populate env') {
sh 'rm .env || true'
sh 'echo "PORT=8007" > .env'
}
stage('Profit') {
steps {
dir('docker') {
sh 'docker compose stop || true'
sh 'docker compose up --build -d'
}
}
}
}
}