go-hello-world2/Jenkinsfile
2024-03-31 14:01:48 +03:30

36 lines
543 B
Groovy

pipeline {
agent {
docker { image 'rbehzadan/golang_goreleaser:1.22.1-1.24.0' }
}
environment {
GITEA_TOKEN = credentials('git.behzadan.ir')
}
stages {
stage('Build') {
steps {
sh 'make build'
}
}
stage('Test') {
steps {
sh 'make test'
}
}
stage('Release') {
steps {
sh 'git tag -a v$(cat VERSION) -m "v$(cat VERSION)"'
sh 'goreleaser release'
}
}
stage('Cleanup') {
steps {
sh 'make clean'
}
}
}
}