Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »

Plugin Information

View Go on the plugin site for more information.

Automatically installs and sets up the Go programming language (golang) tools for a build.

What it does

During a build, this plugin can:

  • Install a pre-configured version of Go to the machine the build is running on
    • The correct package for the machine's operating system, CPU architecture and version will be automatically downloaded and installed, if required
  • Export the GOROOT environment, pointing to the installed Go tools
  • Add the path $GOROOT/bin to the PATH, so that the tools are available during the build


Global configuration

  1. In the Jenkins system settings (Manage Jenkins → Configure System), find the "Go Installations" section and click "Add Go".
  2. Enter a name, e.g. "Go 1.8" — the name itself has no significance, but will be displayed to users during job configuration
  3. Choose the desired version of Go from the list

Per-job configuration


  1. In a job's configuration, find the "Build environment" section
  2. Select the "Set up Go programming language tools" checkbox
  3. Select the Go version you wish to be installed when this job is built


As with any other type of Tool Installer, you can use the tool step to install Go, using the go tool type. For example:

// Run on an agent where we want to use Go
node {
    // Install the desired Go version
    def root = tool name: 'Go 1.8', type: 'go'

    // Export environment variables pointing to the directory where Go was installed
    withEnv(["GOROOT=${root}", "PATH+GO=${root}/bin"]) {
        sh 'go version'

Version history

Version 1.2 (February 25, 2017)

  • Stopped breaking tool configuration page if the version metadata had not been fetched (see JENKINS-27499)
  • Added go symbol, for use with the Pipeline tool step (see JENKINS-34345)
  • Increased required Jenkins version to 1.642.3

Version 1.1 (June 21, 2014)

  • Worked around bug causing newer versions of Go to not install (see JENKINS-23509)
  • Fixed bug where wrong package for OS X could be installed (see JENKINS-23505)
  • Ensured "Install automatically" is checked by default when adding a Go installation

Version 1.0 (June 18, 2014)

  • Initial release
  • No labels