1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/www/docs/ci/jenkins.md
Weslei Juan Moser Pereira b8d32449f4
docs: added docs for Jenkins pipeline (#1527)
* Added docs for Jenkins

* Added index
2020-05-18 22:15:47 -03:00

528 B

Jenkins

Here is how to set up a Jenkins pipeline using Jenkinsfile:

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'
      }
    }
  }
}