Skip to content

Upgrade Go Guide

Nick Webb edited this page Oct 21, 2020 · 4 revisions

This procedure describes how to upgrade Golang for the cf CLI project.

Phase 1: Confirm that upgrade works locally:

  • Read the release notes: https://golang.org/doc/devel/release.html
  • Update install-ubuntu.sh's GoLang version and rerun on local workstation.
    • Update the GOROOT variable in 0000-paths.bash
    • This may require rerunning the GoUpdateBinaries in vim on all the workstations after GoLang was updated.
  • Run the unit and integration tests. Fix any tests that fail and commit changes.
  • Run go get -u golang.org/x/<pkg> for golang.org/x/ packages we directly depend on
    • Make sure to rerun the unit and integration tests.
  • Update the version number in the developer guide.
  • Update the version in .travis.yml Verify the change by looking at the travis output for a PR or a commit after the change to .travis.yml is pushed.
  • Commit and Push the install-ubuntu.sh version update, and rerun it on all the workstations.
  • Individually pause all the jobs in the cli group in Concourse.
  • Push changes made to cf cli repo.

Phase 2: Update Pipeline:

  • Update and push the ci/cli-base/Dockerfile image's FROM golang:<major>.<minor> . Then run the create-cli-base-image Concourse Job.
  • Upgrade GoLang on the OSX Worker: Run brew update and brew upgrade golang. Connection instructions here
  • Upgrade GoLang on the Windows worker(s) by updating this pipeline
  • Update TARGET_GO_VERSION in cli-ci with the new version #
  • Refly the pipelines with ci/bin/reconfigure-pipelines, ci/bin/reconfigure-v7-pipelines and ci/bin/reconfigure-v8-pipelines
  • Starting from the unit tests, unpause each job - waiting for the job to pass with the latest version of GoLang before unpausing the subsequent job.