music-to-go/Jenkinsfile
2024-10-06 21:17:34 -05:00

32 lines
459 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') {
steps {
sh 'rm .env || true'
sh 'echo "PORT=8007" > .env'
}
}
stage('Profit') {
steps {
dir('docker') {
sh 'docker-compose stop || true'
sh 'docker-compose up -d --build'
}
}
}
}
}