From 74e5374a34416926165a6bc04153459f2b64b144 Mon Sep 17 00:00:00 2001 From: William Fish Date: Tue, 13 Aug 2024 09:45:32 +0100 Subject: [PATCH 1/2] OTT-402: Adjust standard slack channel for most manuals --- source/manual/brakeman.html.md | 2 +- source/manual/codeql.html.md | 2 +- source/manual/configure-linting.html.md | 2 +- source/manual/content-security-policy.html.md | 2 +- source/manual/conventions-for-rails-applications.html.md | 2 +- source/manual/deploy-static.html.md | 2 +- source/manual/deployments.html.md | 2 +- source/manual/development-pipeline.html.md | 4 ++-- source/manual/docs-style-guide.html.md | 2 +- source/manual/how-to-escalate-to-AWS-support.html.md | 2 +- source/manual/keeping-software-current.html.md | 2 +- source/manual/running-rake-tasks.html.md | 4 +--- source/manual/sentry.html.md | 2 +- source/manual/setting-up-new-rails-app.html.md | 2 +- source/manual/testing.html.md | 2 +- 15 files changed, 16 insertions(+), 18 deletions(-) diff --git a/source/manual/brakeman.html.md b/source/manual/brakeman.html.md index 0f76edb..6e5ed26 100644 --- a/source/manual/brakeman.html.md +++ b/source/manual/brakeman.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: Brakeman section: Testing layout: manual_layout diff --git a/source/manual/codeql.html.md b/source/manual/codeql.html.md index c340ffa..466917f 100644 --- a/source/manual/codeql.html.md +++ b/source/manual/codeql.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: CodeQL section: Testing layout: manual_layout diff --git a/source/manual/configure-linting.html.md b/source/manual/configure-linting.html.md index e81d24c..b2bb2c2 100644 --- a/source/manual/configure-linting.html.md +++ b/source/manual/configure-linting.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: Configure linting section: Applications type: learn diff --git a/source/manual/content-security-policy.html.md b/source/manual/content-security-policy.html.md index e924dd5..a1d35a2 100644 --- a/source/manual/content-security-policy.html.md +++ b/source/manual/content-security-policy.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: 'Content Security Policy on GOV.UK' section: Security layout: manual_layout diff --git a/source/manual/conventions-for-rails-applications.html.md b/source/manual/conventions-for-rails-applications.html.md index d319f1b..b320456 100644 --- a/source/manual/conventions-for-rails-applications.html.md +++ b/source/manual/conventions-for-rails-applications.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: Conventions for Rails applications section: Applications type: learn diff --git a/source/manual/deploy-static.html.md b/source/manual/deploy-static.html.md index d7a97bd..449f160 100644 --- a/source/manual/deploy-static.html.md +++ b/source/manual/deploy-static.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: Deploy Static section: Deployment layout: manual_layout diff --git a/source/manual/deployments.html.md b/source/manual/deployments.html.md index f9f388a..d17afaf 100644 --- a/source/manual/deployments.html.md +++ b/source/manual/deployments.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: Deployments section: Deployment layout: manual_layout diff --git a/source/manual/development-pipeline.html.md b/source/manual/development-pipeline.html.md index 50a9d34..9eafad8 100644 --- a/source/manual/development-pipeline.html.md +++ b/source/manual/development-pipeline.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: The development and deployment pipeline parent: "/manual.html" layout: manual_layout @@ -76,7 +76,7 @@ It is important to ensure people are aware of a code freeze Let people know on Slack -> Send a message to #govuk-developers on slack with the @channel +> Send a message to #ott-core on slack with the @channel > prefix (to ensure people who are offline are notified) and email > . Your message > should include the repo you are freezing, the reason why, and the diff --git a/source/manual/docs-style-guide.html.md b/source/manual/docs-style-guide.html.md index 26142d8..7dc171b 100644 --- a/source/manual/docs-style-guide.html.md +++ b/source/manual/docs-style-guide.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: Documentation style guide section: Documentation layout: manual_layout diff --git a/source/manual/how-to-escalate-to-AWS-support.html.md b/source/manual/how-to-escalate-to-AWS-support.html.md index c59e43c..00f7317 100644 --- a/source/manual/how-to-escalate-to-AWS-support.html.md +++ b/source/manual/how-to-escalate-to-AWS-support.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: How to raise a support ticket with AWS section: AWS diff --git a/source/manual/keeping-software-current.html.md b/source/manual/keeping-software-current.html.md index 3823799..82901bc 100644 --- a/source/manual/keeping-software-current.html.md +++ b/source/manual/keeping-software-current.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: Policy on keeping software current parent: "/manual.html" layout: manual_layout diff --git a/source/manual/running-rake-tasks.html.md b/source/manual/running-rake-tasks.html.md index fedc760..803908b 100644 --- a/source/manual/running-rake-tasks.html.md +++ b/source/manual/running-rake-tasks.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: Run a rake task section: Deployment layout: manual_layout @@ -16,5 +16,3 @@ For example: ```sh kubectl exec deploy/publishing-api -- rake 'represent_downstream:published_between[2018-12-17T01:02:30, 2018-12-18T10:20:30]' ``` - -The output of the command will be streamed to your terminal. diff --git a/source/manual/sentry.html.md b/source/manual/sentry.html.md index b960ffb..20a92c8 100644 --- a/source/manual/sentry.html.md +++ b/source/manual/sentry.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: Sentry parent: "/manual.html" layout: manual_layout diff --git a/source/manual/setting-up-new-rails-app.html.md b/source/manual/setting-up-new-rails-app.html.md index f3c5abf..486eb75 100644 --- a/source/manual/setting-up-new-rails-app.html.md +++ b/source/manual/setting-up-new-rails-app.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: Set up a new Rails application section: Applications layout: manual_layout diff --git a/source/manual/testing.html.md b/source/manual/testing.html.md index 056c225..0731ced 100644 --- a/source/manual/testing.html.md +++ b/source/manual/testing.html.md @@ -1,5 +1,5 @@ --- -owner_slack: "#govuk-developers" +owner_slack: "#ott-core" title: 'How we test GOV.UK' section: Testing type: learn From 541953ecfc5b306d37f39dd8b0f5b9dff7c2a27c Mon Sep 17 00:00:00 2001 From: William Fish Date: Tue, 13 Aug 2024 10:03:12 +0100 Subject: [PATCH 2/2] OTT-402: Adds ruby installation guide --- source/manual/get-started.html.md | 10 ++++ source/manual/ruby.html.md | 77 +++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 source/manual/ruby.html.md diff --git a/source/manual/get-started.html.md b/source/manual/get-started.html.md index cffed9e..5f6607b 100644 --- a/source/manual/get-started.html.md +++ b/source/manual/get-started.html.md @@ -206,7 +206,17 @@ While rebasing is generally acceptable during the development process, please en For more information on which repositories depend on merge commits, please refer to [this][generate-release-notes] script. +## 12. A note on installing dependencies + +We use [asdf][asdf] to manage versions of programming languages and tools. This allows us to have multiple versions of the same tool installed on our machines. + +Our main languages are Ruby and Node.js, so you will need to install these with asdf. + +To keep up-to-date with ruby installations in each project you can follow the [ruby installation guide][ruby-installation]. + [generate-release-notes]: https://github.com/trade-tariff/trade-tariff-tools/blob/main/bin/generate_release_notes.sh [regression-chat]: https://future-borders.slack.com/archives/C02T8JXUYE9 [developer-chat]: https://future-borders.slack.com/archives/C01DXUP15M5 [infrastructure-chat]: https://future-borders.slack.com/archives/C042HGJBHK8 +[asdf]: https://asdf-vm.com/ +[ruby-installation]: /manual/ruby.html diff --git a/source/manual/ruby.html.md b/source/manual/ruby.html.md new file mode 100644 index 0000000..b43e996 --- /dev/null +++ b/source/manual/ruby.html.md @@ -0,0 +1,77 @@ +--- +owner_slack: "#ott-core" +title: Install ruby +section: Applications +layout: manual_layout +parent: "/manual.html" +--- + +> We use `asdf` to manage multiple runtime versions. This guide will show you how to install `ruby` with `asdf`. + +## Prerequisites + +- Mac +- [Homebrew][homebrew] +- curl +- git + +## Steps + +- Install `asdf` with homebrew +- Install `ruby` with `asdf` +- Enable a global version of `ruby` with `asdf` +- Check your ruby version + +### Install `asdf` with homebrew + +```sh +brew install asdf +echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ZDOTDIR:-~}/.zshrc +``` + +### Install `ruby` with `asdf` + +```sh +# Enable the ruby plugin in asdf +asdf plugin add ruby +# Find a ruby version you want +asdf list-all ruby +# Install the version you want +asdf install ruby 3.0.2 +``` + +### Enable a global version of `ruby` with `asdf` + +```sh +# Enable a global version of ruby +asdf global ruby 3.0.2 +``` + +### Check your ruby version + +```sh +ruby --version +``` + +## Project-specific ruby versions + +`asdf` offers support for a local file in a specific project to specify the version of ruby to use. + +This diminishes the chance of differences between your locally used version of ruby and the version installed +in other environments from causing issues. + +This is all configured with `.tool-versions` in the root of each project repoistory + +For example, to specify the version of ruby to use in a project, create a `.tool-versions` file in the root of the project repository with the following content: + +```sh +asdf local ruby 3.0.2 +``` + +## Project-specific updates to ruby + +If you need to update the version of ruby in a project, update the `.tool-versions` file in the root of the project repository with the new version of ruby you want to use. + +Everyone that uses `asdf` can then just run `asdf install` in the project repository to install the new version of ruby. + +[homebrew]: https://brew.sh/