Skip to main content

Repository: govuk-connect

Tool for connecting to various parts of the GOV.UK Publishing infrastructure

README

This is a command line tool to help you connect to GOV.UK’s infrastructure e.g.

govuk-connect ssh -e integration frontend

Installation

With Homebrew on macOS or Linux:

brew tap alphagov/gds # This will exist if you use the gds-cli
brew install govuk-connect

Note: If you previously installed govuk-connect via RubyGems, but switched to using Homebrew, you may have to do the following to get it to work:

sudo gem uninstall govuk-connect
rbenv rehash

With RubyGems:

sudo gem install govuk-connect

If you use a Ruby version manager like rbenv, you may find this only installs govuk-connect for a particular version of Ruby. Try installing outside of an rbenv-managed directory to fix this e.g. your home directory.

Usage

If you have the gds-cli installed (you should do!), you can use this tool within it. This means you only have to use one tool to do AWS and SSH.

gds govuk connect --help

It can be shortened to gds govuk c.

Whichever installation method you choose, you can use the above method or the standalone govuk-connect binary.

Releases

1. Release the gem

When you’ve merged the PR that bumps the version (change value in lib/govuk_connect/version.rb), publish a release tag and the gem to RubyGems from the main branch.

The gem push step is done automatically by the GitHub Action, when you update the version.rb file.

# Note: You shouldn't need to do this manually. This is done by a GitHub Action
gem build govuk-connect
gem push govuk-connect-<version>.gem # Credentials are in govuk-secrets/pass under packages/rubygems
git tag <version> # eg 0.0.3
git push origin <version>

2. Update Homebrew

To raise a PR to bump the Homebrew formula version, run:

brew bump-formula-pr govuk-connect --url=https://rubygems.org/downloads/govuk-connect-<version>.gem --no-fork

If you have problems with this, note that the password Git asks for to push the changes to GitHub is in fact a Personal Access Token. If you get in a real mess, run brew update-reset, and try brew bump-formula-pr again. If you really can’t do it, consider reopening a previous PR on this topic.