go-hello-world2/Jenkinsfile
2024-03-31 14:09:49 +03:30

33 lines
595 B
Groovy

pipeline {
agent {
docker { image 'rbehzadan/golang_goreleaser:1.22.1-1.24.0' }
}
environment {
GITEA_TOKEN = credentials('git.behzadan.ir')
}
stages {
stage('Test') {
steps {
sh 'make test'
}
}
stage('Release') {
steps {
sh 'git config --global user.email "rbehzadan@gmail.com"'
sh 'git config --global user.name "Reza Behzadan"'
sh 'git tag -a v$(cat VERSION) -m "v$(cat VERSION)"'
sh 'goreleaser release'
}
}
stage('Cleanup') {
steps {
sh 'make clean'
}
}
}
}