1
0
mirror of synced 2025-12-21 19:06:49 -05:00
Commit Graph

385 Commits

Author SHA1 Message Date
Kevin Heis
0fa35fe0f2 Deprecate allow issue (#22355)
* Update remove-liquid-statements.js

* Update remove-liquid-statements.js

* Update remove-liquid-statements.js
2021-10-21 21:56:02 +00:00
Peter Bengtsson
26e5ee8425 refactor unnecessary use of process.exit(1) (#21974) 2021-10-18 14:43:32 +00:00
Robert Sese
f7799cd3dd Allow 421 on warmup requests (#21973) 2021-10-07 21:44:03 +00:00
James M. Greene
bb0455962e Do not use build.status as a looping condition for Heroku deployment (#21909)
* Do not use `build.status` of 'pending' as a looping condition for Heroku deployment
* Don't wait for `appSetup.status` either
* Fix incorrect Octokit method usage in local deploy script
* Bump the number of allowable errors from 5 to 10
* More logging!
* Add an environment variable for easily increasing the number of allowed Heroku failures per phase of polling
2021-10-06 12:57:30 -05:00
James M. Greene
8771695531 Make the HEROKU_PRODUCTION_APP_NAME env var required for prod deployment (#21910) 2021-10-06 11:53:28 -05:00
James M. Greene
b4473a9dc6 Delete the 'create-app' module previously used for Docker deployment (#21906) 2021-10-05 18:12:48 -04:00
James M. Greene
9314c0ff94 Remove gha- staging app prefix for Actions-based deployments (#21799)
* Make the default app name prefix include the dash

* Remove the default app name prefix
2021-10-05 15:19:47 -05:00
Matt Pollard
307e8094ec Backport updated content from GitHub AE M2 megabranch and version for ghae-next (#21525) 2021-10-04 16:11:57 +00:00
James M. Greene
8d2e1ad577 Enable prod deployment via Actions (Take 2!) (#21852)
* Move concurrency control to top-level in prod deploy workflow

* Add 503 to the list of temporarily acceptable Heroku failure codes

* Add HEROKU_PRODUCTION_APP_NAME back into the prod deploy workflow
2021-10-01 13:37:46 -05:00
Grace Park
96ff67d756 Workflow to test docs.github.com links on github/github (#21601)
* run prettier

* removing files from test/integration

* update cron job to not start on the hour

* add github/github comment

* update comment

* updating to search by indices in the content rather than by line

* small updates and updating character max

* update name of script run

* updating to use api search code and get contents

* using api search code and get contents

* adding token check and .js

* remove blank line for title

* update issue body content

* update comment

* add support for GitHub.developer_help_url links
2021-10-01 17:23:58 +00:00
Marcelo Jacobus
aed6c1654f translation batch 1632491035 (#21717) 2021-09-30 11:53:04 +00:00
James M. Greene
7e954927e2 [DO NOT MERGE] Revert to no longer deploy to production via Actions (#21808)
* Update the production deployment workflow to target the main Heroku app

Without exposing our internal Heroku app name!

* Refactor the staging deployment script a bit to match more closely

* Use the HEROKU_PRODUCTION_APP_NAME Secret in the workflow

* Add a note about the newly required environment variable for production deployment into the local deploy script

* Add critical errors if the HEROKU_PRODUCTION_APP_NAME is missing

* Extract HEROKU_PRODUCTION_APP_NAME from process.env

* Revert the critical parts of PR #21807 to no longer deploy to prod via Actions

* Don't require HEROKU_PRODUCITON_APP_NAME
2021-09-29 15:29:53 -05:00
James M. Greene
90d030a41e Deploy to the primary production Heroku App via Actions (#21807)
* Update the production deployment workflow to target the main Heroku app

Without exposing our internal Heroku app name!

* Refactor the staging deployment script a bit to match more closely

* Use the HEROKU_PRODUCTION_APP_NAME Secret in the workflow

* Add a note about the newly required environment variable for production deployment into the local deploy script

* Add critical errors if the HEROKU_PRODUCTION_APP_NAME is missing

* Extract HEROKU_PRODUCTION_APP_NAME from process.env
2021-09-29 14:43:29 -05:00
James M. Greene
12134aa84b Use staging app name module for content changes table generation (#21805)
* Use the 'script/deployment/create-staging-app-name' module when creating the content changes table comments

* Remove the shebang from the non-runnable script helper module
2021-09-29 09:00:19 -07:00
James M. Greene
469e33cbb6 Allow Heroku 500 error codes while polling (#21795)
* Extract allowable Heroku error checks into a reusable function

* Add 500 to the list of allowable Heroku errors while polling
2021-09-28 21:00:03 +00:00
James M. Greene
1d0d782342 Production deploy script (#21768)
* Create a logic branch to deploy to production via a local script

* Ignore forceRebuild default value for production

* Add soft warnings for missing-but-not-critical env vars

* Only include the Preboot delay if the Fastly env vars are present

* Add some warning emojis ⚠️

* More emojis!

* Make FASTLY_* checks all independent

* Add more comments about additional env vars recommended for a local prod deployment
2021-09-27 22:17:21 +00:00
James M. Greene
c52671408b Do not pass null config vars to Heroku on AppSetup (#21766) 2021-09-27 15:47:04 -05:00
James M. Greene
deab27360c Announce if Heroku appears to be down (#21762) 2021-09-27 20:17:05 +00:00
James M. Greene
1024ede61d Explicitly unset the DOCUBOT_REPO_PAT Heroku config var when possible (#21751) 2021-09-27 18:22:02 +00:00
James M. Greene
a76f30e5f2 Move delay for Heroku Preboot to before marking deployment successful (#21736)
* Move delay for Heroku Preboot from post-deploy to pre-success

* Shorten arbitrary delay before first Fastly purge
2021-09-24 19:35:13 -05:00
Grace Park
9c9d47f508 Prod deployment workflow (#21223)
* add production deployment

* updating existing build

* remove state

* remove PR_URL and switch to main branch

* break out into build, prepare, and deploy

* update to download-artifact

* update staging to prod

* Actions production deployment redux (#21238)

* Simplify production deployment into a single Actions job

* Force esm to install

* Switch flag ordering to match staging deploy

* Use 'npm install' for the second installation to avoid deleting the prodDeps

* Apply Heroku upload fixes

* Include `.npmrc` file in builds to omit `optionalDeps`

* Remove download-artifact action

Co-authored-by: Grace Park <gracepark@github.com>

* Script updates to prod deployment (#21247)

* updating script to use latest sha

* changing back workflowRunLog

* remove line

* update error wording

* remove comment - using commit sha

* need release.id

* Update script/deployment/deploy-to-production.js

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* remove hydro

* Update script/deployment/deploy-to-production.js

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* Update .github/workflows/prod-build-deploy-pr.yml

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* Update script/deployment/deploy-to-production.js

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* Update script/deployment/deploy-to-production.js

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* Update script/deployment/deploy-to-production.js

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* updating spacing

* add 404/429 responses while polling Heroku API for prod

* removing nested ifs

* adding SOURCE_BLOB_URL

* update for early access

* add install dotenv

* need to add persist-credentials

* Testing GET request

* update request

* Rename workflow file to remove '-pr'

We are now triggering on pushes to 'main' rather than PR merges

* Remove the unnecessary workflow step to create a failure Status

Because the production deploy is done via a single workflow rather than a 2-part workflow chain, this is thankfully unnecessary

* Install all of the npm dependencies

We'll need them!

* Add the '-z' flag to 'tar' to gzip the tarball

* Pass the Heroku upload URL via env vars for security

Prevents potential injection attacks

* Log the deployment ID and log URL as deploy step outputs

* Take notice of Heroku polling resulting in failure statuses

* Add a note to consider waiting for Heroku Preboot

* Add a script and workflow step to purge Fastly

* update response to get sha

* Switch to Octokit functions instead of 'request' method

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-09-24 16:09:08 +00:00
Francis
53ec53d5ac fix: update ghesReleaseNotesSchema's module name
Closes https://github.com/github/docs-engineering/issues/920
2021-09-23 14:33:36 -07:00
Rachael Sewell
bbc5778e4a add new options to rest schema script (#21571) 2021-09-23 19:34:56 +00:00
James M. Greene
e29a965405 Display the reason for Heroku AppSetup failure (#21683) 2021-09-23 10:51:50 -05:00
James M. Greene
0c97550a77 Take notice of Heroku polling resulting in failure statuses (#21680) 2021-09-23 09:55:58 -05:00
Robert Sese
f6d85c6d64 Security: remove Docker PR build/deploy workflows (#21599)
* Remove Docker PR build/deploy workflows

* Remove supporting Docker deploy script
2021-09-17 23:17:17 +00:00
James M. Greene
b2c8af9d31 Secure early access staging deployment (#21450)
* Explicitly ensure the early access parent directories are created when cloning

* Use explicit --file flag with tar

* Remove security hole for Staging deployment by concatenating archives

* Fail the staging builds if *.js, .npmrc, or Procfile is changed in the open source repo

* docker build: extract user-code in separate directory

* Checkout PR base branch and install dependencies

* Remove one-off package installs

* Remove selective file checkout

* Don't persist git cloning credentials

It usually makes the clone of early access content fail in the later steps

* Update .github/workflows/staging-deploy-pr-docker.yml

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* Update .github/workflows/staging-deploy-pr-docker.yml

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* Remove debugging step

* Best practice: Use environment variables to avoid potential injection attacks if the data was user-controlled

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: Robert Sese <sese@github.com>
Co-authored-by: Robert Sese <robert.sese@gmail.com>
2021-09-17 22:41:13 +00:00
James M. Greene
7ae1eea3b5 Undeploy without Environment cleanup (#21530)
* Ensure we handle multiple pages of Deployments
* Do NOT delete the Environment during undeploy
* Do NOT deploy/undeploy PRs on lock/unlock events
2021-09-15 15:11:48 +00:00
James M. Greene
54583d494c Stale environment cleanup revisions (#21508)
* Remove legacy environment name format
* Ensure we handle multiple pages of Deployments
* Track count of Deployments deleted per Environment
2021-09-14 18:37:21 +00:00
Kevin Heis
43158e8392 Upgrade NPM packages (#21480)
* Upgrade a bunch of packages

* ...and upgrade highlightjs

* ... and ajv-formats (but not ajv)

* Revert graphql changes

* Revert "Revert graphql changes"

This reverts commit a5b8a34d52a48a7c2858415f6b1081c1d4902482.

* Update build-changelog.js

* Upgrade html-entities

* Upgrade commander, following migration guide
2021-09-13 23:31:43 +00:00
Rachael Sewell
94e3c092d3 English search sync (#21446) 2021-09-13 17:30:08 +00:00
James M. Greene
1471ca2e25 Limit environment cleanup by closures, not matching names (#21443) 2021-09-10 22:09:48 +00:00
Robert Sese
6c37f45d61 Docker image deploy: set config vars (#21365)
* Add Hydro secrets as env vars

* Set app config-vars

* Add config vars previously used via app.json
2021-09-10 21:58:49 +00:00
James M. Greene
77fa552f87 Limit deployment environment cleanup per run (#21437)
* Limit deployment environment cleanup per run to reduce the likelihood of exceeding the API rate limit

* Remove the per_page size

* Change wording
2021-09-10 20:48:30 +00:00
James M. Greene
992924b1a1 Allow staging warmup requests to respond with 404 (#21423) 2021-09-10 19:00:26 +00:00
James M. Greene
b507b67493 Script+workflow to remove stale staging deployment environments (#21399)
* Add a script to remove stale staging deployment environments from GitHub
* Add second job to cleanup GitHub deployment environments
* Specify GITHUB_TOKEN permissions matrix
* Stop marking staging deployments as transient
* Update staging undeployment mechanism to clean-up deployment environments on PR merge
* Define a stale PR as one that was merged or has been closed for more than 2 hours
* Rename workflow file
2021-09-10 14:43:01 +00:00
Rachael Sewell
54cb650ee5 Fix import statement for deploy script (#21404) 2021-09-10 00:31:02 +00:00
Rachael Sewell
55397df156 update status for deploy timeout (#21349) 2021-09-09 23:13:57 +00:00
Marc-Andre Giroux
264a4f2fbc Fix example generation for "any" schema types (#21290) 2021-09-09 18:02:53 +00:00
Robert Sese
2c20d13927 Add PR author as app collaborator (#21353) 2021-09-08 00:53:42 +00:00
James M. Greene
fe767f3da0 Actions staging deployment with Status updates instead of Check Runs (#21283)
* Update Staging deployment workflow to create Status updates

* Update local Staging deployment script to create Status updates

Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-09-03 18:55:24 +00:00
Robert Sese
cbfba14ac1 Docker image deploy to Heroku (#21248)
* Start parallel Docker image deploy workflows

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@users.noreply.github.com>

* Add early access content build stage

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>

* Create Heroku App script and workflow steps

* Tag the image for Heroku

* Push the image and grab the image ID

* Set app name and image id outputs

* Add parallel deploy script for Docker

* Scope workflow run to 'docker-' and release image to Heroku

* Update .github/workflows/staging-build-pr-docker.yml

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* Exclude Docker workflow

* Cleanup Docker deploys

* Use action sha

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-09-03 16:34:48 +00:00
James M. Greene
704f699353 Allow for a few 404/429 responses while polling the Heroku API (#21191) 2021-08-30 14:47:50 +00:00
Mike Surowiec
d76c16da19 Scope markdown body (#21082)
* update article content to markdown ui component

* decouple lunr indexing from class name

* remove summary outline none rule, apply utility class instead

* improve typing

* scope more styles down to markdown-body/extended-markdown

* move all markdown-body style overrides to MarkdownContent component

* fix class targeting within css module

* clean up MarkdownContent header style

* rename data-lunr to data-search

* fix: inline code color issue

* fix: update article markdown to work with MarkdownContent
2021-08-30 14:24:49 +00:00
Rachael Sewell
df16267a8f remove cached-index-names file and dry run sync used for Algolia (#21133) 2021-08-25 22:04:26 +00:00
James M. Greene
08db1c970c Refactor Staging deployment workflow to support open source PRs (#20459)
* Add a Staging build workflow

* Remove all commented out code from build workflow

It will be handled in https://github.com/github/docs-engineering/issues/726

* Use pinned version of upload-artifact action

* Tweaks to build

* Minor deployment script refactoring

* Update the Staging deployment workflow

* Missed refactoring tweak

* Add relevant comments

* Update Heroku app naming convention for Actions deploy to include 'gha-' prefix

* Update Heroku app ConfigVars and SourceBlob for optional prebuilt app

* Remove obsolete 'dist/' dir from PR build artifact

See https://github.com/github/docs-internal/pull/20405

* Ensure a new enough version of npm is used

* Switch to creating a tarball for upload

* Remove obsolete 'layouts' dir from file list

* Ditch the verbosity for 'tar'... too many files

* Add tarball support to deploy

* Add esm workaround to deploy script

See https://github.com/actions/github-script/issues/168

* Temporarily ignore staging deploy workflow from workflow linter

* Update deployment to use a Heroku Build Source instead of a GitHub Actions Artifact

* Update undeploy workflow to use ESM workaround

See https://github.com/actions/github-script/issues/168

* Add 'esm' package to optionalDependencies to better support workaround

See https://github.com/actions/github-script/issues/168

* Add Slack notifications for workflow failures

* Wrap AppSetup polling in try-catch

* Improve dyno monitoring

* Rename 'script/deploy' to have a .js extension #esm

* Update script references to include the extension

* Use non-deprecated Sources API for Heroku

* Use normal quotes

* Stub in a step to mark deployment inactive after timing out

* Apply suggestions from code review

Co-authored-by: Rachael Sewell <rachmari@github.com>

Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-08-25 20:45:51 +00:00
Rachael Sewell
9a96a2699f Deprecation workflow updates (#20962) 2021-08-18 23:05:04 +00:00
Rachael Sewell
8e7b1a0370 Remove 2.21 from the supported list of GHES versions (#20935) 2021-08-17 15:43:06 -07:00
Lucas Costi
ee29fedb4e Remove breaking commander functions (#20825)
.passCommandToAction() is undefined, and was removed in Commander 7.0.0. See release note: a9c9f17c7e/CHANGELOG.md (deleted)
2021-08-12 20:24:56 +00:00
Rachael Sewell
a92853e40d reapply some classes for lunr indexing (#20765) 2021-08-11 15:06:01 +00:00