mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-01 13:07:49 +02:00
docs: added docs for Jenkins pipeline (#1527)
* Added docs for Jenkins * Added index
This commit is contained in:
parent
be1d4d629f
commit
b8d32449f4
37
www/docs/ci/jenkins.md
Normal file
37
www/docs/ci/jenkins.md
Normal file
@ -0,0 +1,37 @@
|
||||
# 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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
@ -54,6 +54,7 @@ nav:
|
||||
- ci/codefresh.md
|
||||
- ci/drone.md
|
||||
- ci/semaphore.md
|
||||
- ci/jenkins.md
|
||||
- Customization:
|
||||
- About: customization/index.md
|
||||
- customization/project.md
|
||||
|
Loading…
x
Reference in New Issue
Block a user