mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
b8d32449f4
* Added docs for Jenkins * Added index
37 lines
528 B
Markdown
37 lines
528 B
Markdown
# Jenkins
|
|
|
|
Here is how to set up a [Jenkins](https://www.jenkins.io/) pipeline using Jenkinsfile:
|
|
|
|
```groovy
|
|
pipeline {
|
|
...
|
|
|
|
stages {
|
|
stage('Compile') {
|
|
steps {
|
|
sh 'go build'
|
|
}
|
|
}
|
|
|
|
stage('Test') {
|
|
steps {
|
|
sh 'go test ./...'
|
|
}
|
|
}
|
|
|
|
stage ('Release') {
|
|
when {
|
|
buildingTag()
|
|
}
|
|
|
|
environment {
|
|
GITHUB_TOKEN = credentials('github-token')
|
|
}
|
|
|
|
steps {
|
|
sh 'curl -sL https://git.io/goreleaser | bash'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
``` |