You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ghes-releases/lib/deprecation-steps.md
+74-63Lines changed: 74 additions & 63 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,9 @@ labels:
8
8
9
9
# Deprecation steps for GHES releases
10
10
11
-
The day after a GHES version's [deprecation date](https://github.com/github/docs-internal/tree/main/src/ghes-releases/lib/enterprise-dates.json), a banner on the docs will say: `This version was deprecated on <date>.` This is all users need to know. However, we don't want to update those docs anymore or link to them in the nav. Follow the steps in this issue to **archive** the docs.
11
+
The day after a GHES version's [deprecation date](https://github.com/github/docs-internal/tree/main/src/ghes-releases/lib/enterprise-dates.json), a banner on the docs will say: `This version was deprecated on <date>.` This lets users know that the release is deprecated. However, until the release is fully deprecated, it will show up in the Versions dropdown on the docs.github.com site.
12
+
13
+
When we fully deprecate the release, we remove all any content (YML, JSON, Markdown) versioned for that release or lower. Follow the steps in this issue to fully **deprecate** the docs.
12
14
13
15
**Note**: Each step below, except step 0, must be done in order. Only move on to the next step after successfully completing the previous step.
14
16
@@ -17,38 +19,48 @@ The following large repositories are used throughout this checklist, it may be u
## Step 0: Before beginning the deprecation, ensure the date of the deprecation is correctly defined
25
-
26
-
-[ ] Completed step 0 ✅
24
+
Before beginning the deprecation, ensure the date of the deprecation is correctly defined:
27
25
28
26
1. Check that the deprecation date is correct by looking up the version you are deprecating in the [release date list](https://github.com/github/enterprise-releases/blob/master/releases.json) and finding the corresponding `prp` owner. Send them a slack message to confirm that the date is correct. If the date is being pushed out, you can ask the `prp` to update the date in the release date list. If the release date list does not get updated (it doesn't always) we have to prepare that our version of that file (`src/ghes-releases/lib/enterprise-dates.json`) will also be inaccurate.
29
27
30
-
If there is no `prp` defined, reach out to our content friends for help in the #docs-content-enterprise Slack channel.
28
+
If there is no `prp` defined, reach out to our content friends for help in the #docs-content-enterprise or #ghes-releases Slack channel.
31
29
32
30
1. If this release is being pushed out, update the target date of this issue and you can wait to proceed with any futher steps.
33
31
34
-
## Step 1: Remove deprecated version numbers from docs-content issue forms
32
+
1. In the `docs-content` repo, remove the deprecated GHES version number from the `options` list in [`release-tracking.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tracking.yml).
33
+
34
+
1. When the PR is approved, merge it in.
35
35
36
-
-[ ] Completed step 1 ✅
36
+
## Step 1: Create the new archived repository
37
37
38
-
**Note**: This step can be performed independently of all other steps, and can be done several days before or along with the other steps.
38
+
All previously archived content lives in its own repository. For example, GHES 3.11 archived content is located in https://github.com/github/docs-ghes-3.11.
39
39
40
-
In the `docs-content` repo, remove the deprecated GHES version number from the `options` list in [`release-tracking.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tracking.yml).
40
+
1. Create a new repository that will store the scraped deprecated files:
41
+
42
+
```shell
43
+
npm run deprecate-ghes -- create-repo --version <release to deprecate>
44
+
```
41
45
42
-
When the PR is approved, merge it in.
46
+
For example, to deprecate GHES 3.11, you would run:
47
+
48
+
```shell
49
+
npm run deprecate-ghes -- create-repo --version 3.11
50
+
```
51
+
52
+
1. From the new repository's home page, click the gear icon next to the "About" section and deselect the "Releases", "Packages", and "Depployments" checkboxes. Click "Save changes".
43
53
44
54
## Step 2: Dry run: Scrape the docs and archive the files
45
55
46
-
-[ ] Completed step 2 ✅
56
+
**Note:** You may want to perform the following dry run steps on a new temporary branch that you can delete after the dry run is complete.
47
57
48
58
1. If the release date documented in the [release date list](https://github.com/github/enterprise-releases/blob/master/releases.json) is incorrect or differs from what we have documented in `src/ghes-releases/lib/enterprise-dates.json`, update the date in `src/ghes-releases/lib/enterprise-dates.json` to the correct deprecation date before proceeding with the deprecation. A banner is displayed on each page with a version that will be deprecated soon. The banner uses the dates defined in `src/ghes-releases/lib/enterprise-dates.json`.
59
+
49
60
1. Ensure you have local clones of the [translation repositories](#configuring-the-translation-repositories).
61
+
50
62
1. Update all translation directories to the latest `main` branch.
51
-
1. You can do this on the main branch or check out a new temporary branch.
63
+
52
64
1. Hide search component temporarily while scraping docs in `src/search/components/Search.tsx`, by adding the `visually-hidden` class to the `form` element:
53
65
54
66
```javascript
@@ -69,59 +81,78 @@ When the PR is approved, merge it in.
69
81
1. Do a dry run by scraping a small amount of files to test locally on your machine. This command does not overwrite the references to asset files so they will render on your machine.
70
82
71
83
```shell
72
-
npm run archive-version----dry-run --local-dev
84
+
npm run deprecate-ghes-- archive--dry-run --local-dev
73
85
```
74
86
75
87
1. Navigate to the scraped files directory (`tmpArchivalDir_<VERSION_TO_DEPRECATE>`) inside your docs-internal checkout. Open a few HTML files and ensure they render and drop-down pickers work correctly.
76
88
77
89
1. If the dry-run looks good, scrape all content files. This will take about 20-30 minutes. **Note:** This will overwrite the directory that was previously generated with new files. You can also create a specific output directory using the `--output` flag.
78
90
79
91
```shell
80
-
npm run archive-version
92
+
npm run deprecate-ghes -- archive
81
93
```
82
94
83
95
1. Revert changes to `src/search/components/Search.tsx`.
84
96
85
97
1. Check in any change to `src/ghes-releases/lib/enterprise-dates.json`.
86
98
87
-
## Step 3: Upload the scraped content directory to Azure storage
99
+
## Step 3: Commit the scraped docs to the new repository
88
100
89
-
- [ ] Completed step 3 ✅
101
+
1. Copy the scraped files from the `tmpArchivalDir_<VERSION_TO_DEPRECATE>` directory in `docs-internal` over to the new `github/docs-ghes-<RELEASE_NUM>` repository.
90
102
91
-
1. Log in to the Azure portal from Okta. You'll first need to use the Azure JIT tile in Okta, and request access. Then either logout after being redirected to Azure and log back in, or log into the normal Azure tile from Okta. That will force a refresh on your access and give you write permissions to upload files.
103
+
1. Commit the files. A GitHub Pages build should automatically begin, creating the static site that serves these docs.
92
104
93
-
1. Once in Azure, navigate to the [githubdocs Azure Storage Blob resource](https://portal.azure.com/#@githubazure.onmicrosoft.com/resource/subscriptions/fa6134a7-f27e-4972-8e9f-0cedffa328f1/resourceGroups/docs-production/providers/Microsoft.Storage/storageAccounts/githubdocs/overview).
105
+
1. Preview a few pages, by navigating to the full URL checked into the repo. For example, for GHES 3.11, you can view `https://github.github.com/docs-ghes-3.11/en/[email protected]/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications/index.html`.
94
106
95
-
1. Upload the files. You can do this directly from the UI or using the Microsoft Azure Storage Explorer app. The app allows you more insight into the status of the upload and allows you to delete directories.
107
+
1.Remove the `tmpArchivalDir_<VERSION_TO_DEPRECATE>` directory from your `github/docs-internal` checkout.
96
108
97
-
UI method:
109
+
## Step 4: Deprecate the GHES release in docs-internal
98
110
99
-
1. Click `Containers` in the left sidebar, then click the `enterprise` container.
111
+
1.In your `docs-internal` checkout, create a newbranch:`git checkout -b deprecate-<version>`.
100
112
101
-
1. Click `Upload` in the top bar. Drag and drop or click `Browse for files` to select the directory inside of `tmpArchivalDir_<VERSION_TO_DEPRECATE>`. For example, at the time of this writing, the directory name was `3.5`. The upload will take several minutes and the UI may not give feedback immediately. Don't close the browser tab or navigate away from the page until the upload is complete.
113
+
1.In your `docs-internal` checkout, edit `src/versions/lib/enterprise-server-releases.js` by removing the version number to be deprecated from the `supported` array and move it to the `deprecatedWithFunctionalRedirects` array.
102
114
103
-
App method:
115
+
1. Deprecate the automated pipelines data files:
104
116
105
-
1. Open the Microsoft Azure Storage Explorer app from the `Overview` tab [githubdocs Azure Storage Blob resource page](https://portal.azure.com/#@githubazure.onmicrosoft.com/resource/subscriptions/fa6134a7-f27e-4972-8e9f-0cedffa328f1/resourceGroups/docs-production/providers/Microsoft.Storage/storageAccounts/githubdocs/overview).
106
-
1. You'll need to navigate to the correct subscription, resource, and container.
107
-
1. To upload, Click "Upload" and select "Upload folder." Click the "Selected folder" input to navigate to the temp directory you just generated. Inside that temp directory, select the `<VERSION_TO_DEPRECATE>` directory (e.g., `3.2`). Leave the destination directory input blank.
117
+
```shell
118
+
npm run deprecate-ghes -- pipelines
119
+
```
108
120
109
-
1. From the UI, click on the newly uploaded directory navigate to an HTML file. Clicking on the file will show you a metadata page for that file. Click the `URL` copy button. Navigate to that URL in your browser to see the rendered HTML page. Ensure that the pages render correctly and that the drop-down pickers work correctly.
121
+
1.Remove deprecated content files and update the versions frontmatter:
110
122
111
-
1. Remove the temporarily created directory from your `github/docs-internal` checkout.
123
+
```shell
124
+
npm run deprecate-ghes -- content
125
+
```
112
126
113
-
## Step 4: Deprecate the GHES release in docs-internal
127
+
1. Remove deprecated Liquid from content and data files. **Note:** The previous step to update content file frontmatter must have run successfully forthis step to work because the updated frontmatter is used to determine file versions.
114
128
115
-
- [ ] Completed step 4 ✅
129
+
```shell
130
+
npm run lint-content -- --paths content data --rules liquid-unused-conditional --fix
131
+
```
116
132
117
-
This step will remove the version from the drop-down picker, effectively deprecating the version from a user's perspective. The content for the deprecated release will still exist in the Markdown files.
133
+
1. There are some `data/variables/*.yml` files that can't be autofixed. These will show up as errors. You can manually make the changes to these files. For example, this means open file data/variables/code-scanning and find the code_scanning_thread_model_support key. Edit the key’s value to remove the deprecated liquid:
118
134
119
-
1. In your `docs-internal` checkout, create a new branch: `git checkout -b deprecate-<version>`.
135
+

120
136
121
-
1. In your `docs-internal` checkout, edit `src/versions/lib/enterprise-server-releases.js` by removing the version number to be deprecated from the `supported` array and move it to the `deprecatedWithFunctionalRedirects` array.
137
+
1. Deprecate any data files that are now empty, remove data resuables references that were deleted:
138
+
139
+
```shell
140
+
npm run deprecate-ghes -- data
141
+
```
122
142
123
-
1. You can test that the static pages were generated correctly on localhost and on staging. Verify that the static pages are accessible by running `npm run dev` in your local `docs-internal` checkout and navigate to:
124
-
`http://localhost:3000/enterprise/<version>/`.
143
+
1. Run the linter again to remove whitespace and check for any other errors:
144
+
145
+
```shell
146
+
npm run lint-content -- --fix
147
+
```
148
+
149
+
1. Use VSCode find/replace to remove any remaining table pipes after liquid has been removed. For example lines that only contain 1 or two pipes: ` |` or ` | |`. You can use the following regexes: `^\|\s*\|$` and `^\s?\|\s?$`.
150
+
151
+
1. Test the changes by running the site locally:
152
+
153
+
```shell
154
+
npm run start
155
+
```
125
156
126
157
1. Poke around several deprecated pages by navigating to `docs.github.com/enterprise/<DEPRECATED VERSION>`, and ensure that:
127
158
- Stylesheets are working properly
@@ -131,38 +162,18 @@ This step will remove the version from the drop-down picker, effectively depreca
131
162
- You should see a banner on the top of every deprecated page with the date that the version was deprecated.
132
163
- You should see a banner at the top of every page for the oldes currently supported version with the date that it will be deprecated in the ~3 months.
133
164
134
-
1. If everything looks good, check inthe changes to `src/versions/lib/enterprise-server-releases.js` and create a pull request.
165
+
1. If everything looks good, check in all changes and create a pull request.
135
166
136
167
1. Ensure that CI is passing or make any changes to content needed to get tests to pass.
137
168
169
+
1. Add the PR to the [docs-content review board](https://github.com/orgs/github/projects/2936/views/2).
170
+
138
171
1. 🚢 Ship the change.
139
172
140
173
## Step 5: Create a tag
141
174
142
-
- [ ] ✅ Completed step 5
143
-
144
175
1. Create a new tag for the most recent commit on the `main` branch so that we can keep track of where in commit history we removed the GHES release. Create a tag called `enterprise-<release number>-release`. To create only a tag and not a release, you can [create a new release](https://github.com/github/docs-internal/releases), which allows you to "Choose a tag." Select add a new tag and use the tag name as the release title. After creating the new release, you will see the new tag as well. You can then delete the release.
145
176
146
-
## Step 6: Remove static files and liquid conditionals for the version
147
-
148
-
- [ ] Completed step 6 ✅
149
-
150
-
1. In your `docs-internal` checkout, create a newbranch:`git checkout -b remove-<version>-content`.
151
-
152
-
1. Run `src/ghes-releases/scripts/sync-automated-pipeline-data.js` and commit results.
153
-
154
-
1. Remove the outdated Liquid markup and frontmatter. **Note:** There are typically a few bugs in the updated Markdown, which will be caught by the content linter or CI. Fix any bugs you find. For example, a liquid end tag may be removed but the start tag still exists. There are typically only a few bugs to fix. The script does a pretty great job of fixing most use cases, so this is typically a lightweight task. If there are several errors, something is likely broken and should be fixed in the script.
155
-
156
-
```shell
157
-
npm run remove-version-markup -- --release <number>
158
-
```
159
-
160
-
1. If data reusables were deleted automatically, you'll need to remove references to the deleted reusable in the content. Using VSCode to find the occurrences is quick and there are typically only a few to update. If you have any questions, reach out to the docs-content team in #docs-content to ask for help updating the Markdown files.
161
-
162
-
1. Open a new PR. When the CI is 🍏, add the PR to the [docs-content review board](https://github.com/orgs/github/projects/2936/views/2).
163
-
164
-
1. When the PR is approved, merge it in. 🚢
165
-
166
177
## Step 7: Deprecate the OpenAPI description in `github/github`
167
178
168
179
1. In `github/github`, edit the release's config file in`app/api/description/config/releases/`, and change `deprecated: false` to `deprecated: true`.
Occasionally, a change will need to be added to our archived enterprise versions. If this occurs, you can check out the `enterprise-<release number>-release` branch and re-scrape the page or all pages using `npm run archive-version`. To scrape a single page you can use the `—page <page relative path>` option.
214
+
Occasionally, a change will need to be added to our archived enterprise versions. If this occurs, you can check out the `enterprise-<release number>-release` branch and re-scrape the page or all pages using `npm run deprecate-ghes -- archive`. To scrape a single page you can use the `—page <page relative path>` option.
204
215
205
-
For each language, upload the new file to Azure blob storage in the `enterprise` container.
216
+
For each language, upload the new file to the `github/docs-ghes-<RELEASE_NUM>` repo.
206
217
207
218
After uploading the new files, you will need to purge the Fastly cache for the single page. From Okta, go to Fastly and select `docs`. Click `Purge` then `Purge URL`. If you need to purge a whole path, just do a `Purge All`
0 commit comments