Skip to content

Commit 32fb873

Browse files
hashibot-webRubenSandwichheatlikeheatwavermainworkLeahMarieBush
authored
Repo sync (#220)
* Merge develop into main (#392) * Migrate terraform-docs-common (#227) * Migrate terraform-docs-agents (#228) * Fix content not showing up in preview and link checker checking more than *.mdx files (#226) (#231) * Broken link checker should only run on .mdx files * Add a test to catch a broken link * Edit a JSON file * Move to always using head.sha when link checking * Miss a place for the head.sha * print the changed files * Move back to using nick-fields/retry * Fix misspelling and add another test * Fix wrong var being pass in * Fix misspelling of variable * Found another misspelling :face_palm: * get-changed-files output is space not comma sep * Give action a clearer name * Fix dev-portal cache * Revert testing changes * Put back space * Migrate over terraform-cdk (#229) * API Compare tool for version metadata (#232) * Add readme * Update command in package.json * Add test output folder to gitignore * Shorten example response * Add default values for old and new APIs --------- Co-authored-by: Ruben Nic <RubenSandwich@users.noreply.github.com> * Fix merge conflict (#252) * Keep develop in sync with main (#251) * Fix content not showing up in preview and link checker checking more than *.mdx files (#226) * Broken link checker should only run on .mdx files * Add a test to catch a broken link * Edit a JSON file * Move to always using head.sha when link checking * Miss a place for the head.sha * print the changed files * Move back to using nick-fields/retry * Fix misspelling and add another test * Fix wrong var being pass in * Fix misspelling of variable * Found another misspelling :face_palm: * get-changed-files output is space not comma sep * Give action a clearer name * Fix dev-portal cache * Revert testing changes * Put back space * Enable vercel deployment protection bypass (#230) * Expand lychee command to multiple lines This makes the arguments easier to read (multiple small lines rather than one line line that stretches for miles) * Add vercel protection bypass header to lychee command * Disable prod workflows outside of public repo (#234) * Disable prod workflows outside of public repo * Moving to using job level if * Mock imports in app/utils/utils.test.ts to run without prebuild step (#238) * Mock import in app/api/content/[productSlug]/redirects/route.test.ts to run without prebuild step (#241) * Mock imports in app/api/all-docs-paths/route.test.ts to run without prebuild step (#239) * Mock imports in app/utils/allDocsPaths.test.ts to run without prebuild step (#237) * repo sync between public and internal repos for web-unifed-docs GHA (#236) * Change repo owner to hashicorp in repo-sync workflow (#242) * Mock import of version metadata in app/api/content/[productSlug]/version-metadata/route.ts (#240) * Mock import of version metadata (#244) * Mock import of versionMetadata in app/api/assets/[productSlug]/[version]/[...assetPath]/route.test.ts(#245) * Mock imports in app/api/content/[productSlug]/doc/[version]/[...docsPath]/route.test.ts (#243) * Mock imports for versionMetadata.json, docsPathsAllVersions.json, and productConfig.mjs * Remove path navigation from fixtures import (#1) (#247) * sync changes from web-unified-docs-internal * Update method from compareCommits to compareCommitsWithBasehead (#249) * Remove prebuild from test action (#250) * Add develop to target branches --------- Co-authored-by: Ruben Nic <RubenSandwich@users.noreply.github.com> Co-authored-by: Robert Main <50675045+rmainwork@users.noreply.github.com> Co-authored-by: HashiBot <62622282+hashibot-web@users.noreply.github.com> * api comparison tool: content versions (#340) * Change arg to d for drop-keys * Added functionality to test content-versions API * Add examples to the readme * Sync changes from main into develop (#344) * Fix content not showing up in preview and link checker checking more than *.mdx files (#226) * Broken link checker should only run on .mdx files * Add a test to catch a broken link * Edit a JSON file * Move to always using head.sha when link checking * Miss a place for the head.sha * print the changed files * Move back to using nick-fields/retry * Fix misspelling and add another test * Fix wrong var being pass in * Fix misspelling of variable * Found another misspelling :face_palm: * get-changed-files output is space not comma sep * Give action a clearer name * Fix dev-portal cache * Revert testing changes * Put back space * Enable vercel deployment protection bypass (#230) * Expand lychee command to multiple lines This makes the arguments easier to read (multiple small lines rather than one line line that stretches for miles) * Add vercel protection bypass header to lychee command * Disable prod workflows outside of public repo (#234) * Disable prod workflows outside of public repo * Moving to using job level if * Mock imports in app/utils/utils.test.ts to run without prebuild step (#238) * Mock import in app/api/content/[productSlug]/redirects/route.test.ts to run without prebuild step (#241) * Mock imports in app/api/all-docs-paths/route.test.ts to run without prebuild step (#239) * Mock imports in app/utils/allDocsPaths.test.ts to run without prebuild step (#237) * repo sync between public and internal repos for web-unifed-docs GHA (#236) * Change repo owner to hashicorp in repo-sync workflow (#242) * Mock import of version metadata in app/api/content/[productSlug]/version-metadata/route.ts (#240) * Mock import of version metadata (#244) * Mock import of versionMetadata in app/api/assets/[productSlug]/[version]/[...assetPath]/route.test.ts(#245) * Mock imports in app/api/content/[productSlug]/doc/[version]/[...docsPath]/route.test.ts (#243) * Mock imports for versionMetadata.json, docsPathsAllVersions.json, and productConfig.mjs * Remove path navigation from fixtures import (#1) * Remove path navigation from fixtures import (#1) (#247) * sync changes from web-unified-docs-internal * Update method from compareCommits to compareCommitsWithBasehead (#249) * Remove prebuild from test action (#250) * Add develop to target branches * Remove paths arg to allow Test & Lint action to run on every PR (#253) * Remove PR lock logic from repo-sync workflow (#263) * Repo sync (#34) * Remove path navigation from fixtures import (#1) (#247) * sync changes from web-unified-docs-internal * Update method from compareCommits to compareCommitsWithBasehead (#249) * Remove prebuild from test action (#250) * Add develop to target branches * Remove paths arg to allow Test & Lint action to run on every PR (#253) * Remove PR lock logic from repo-sync workflow (#263) --------- Co-authored-by: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> * Repo sync (#291) * Repo sync (#34) * sync changes from web-unified-docs-internal * Update method from compareCommits to compareCommitsWithBasehead (#249) * Remove prebuild from test action (#250) * Add develop to target branches * Remove paths arg to allow Test & Lint action to run on every PR (#253) * Remove PR lock logic from repo-sync workflow (#263) --------- Co-authored-by: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> * Repo sync (#38) * sync changes from web-unified-docs-internal * Update method from compareCommits to compareCommitsWithBasehead (#249) * Remove prebuild from test action (#250) * Add develop to target branches * Remove paths arg to allow Test & Lint action to run on every PR (#253) * Remove PR lock logic from repo-sync workflow (#263) --------- Co-authored-by: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> * Add Vercel link to deploy preview (#39) * Add Vercel link to deploy job (#290) * Fix for dev-portal is failing to build in UDR internal repo * Repo sync (#326) * Repo sync (#73) * Fix content loading (#235) * Use vercel protection bypass headcer Builds were previously breaking when UDR attempted to make HTTP requests to the CDN (vercel public folder) to retrieve content. Adding the `x-vercel-protection-bypass` header should fix that * Add use server directive * Revert "Add use server directive" Adding a 'use server' directive to this file causes 404s on the content API. This reverts commit 4f2ecae. --------- Co-authored-by: Ruben Nic <RubenSandwich@users.noreply.github.com> Co-authored-by: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> Co-authored-by: HashiBot <62622282+hashibot-web@users.noreply.github.com> * Remove terraform docs common (#342) * Remove terraform-docs-common from develop branch * Comment out terraform-docs-common Disable terraform-docs-common in product config * Undo removal of content dir mapping --------- Co-authored-by: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> * Add terraform-docs-agents (#345) * remove terraform-cdk docs (#347) * Re-sync terraform-docs-agents docs (#348) Co-authored-by: Ruben Nic <RubenSandwich@users.noreply.github.com> * Update image file paths for terraform-docs-agents (#350) * Change image path from public/img to img Comment out themed images and add TODO for when this is supported Add TODO to remove non-themed image once themed images are supported * Remove commented out images * Delete images from v1.15.x and v1.16.x * Copy over images from v1.17.x * Add ptfe release PR request template * Add TFE release notes workflow (#367) * Add clone services repo script * Move config files into script folder * Add execute changelog script * add create pull request script * add workflow file * Workflow needs to run once to test * Add the release notes PR url to the summary * Correctly get env.VERSION * Correctly expand PR_URL * Just don't use PR_URL as it isn't expanding * Remove push dispatch, as no longer needed * I don't believe PR_NUMBER is being set correctly * Set PR_NUMBER in multiple steps * Try each step separately * Return pr_url from ruby * Let pr_url should be a var * Should be double quotes * Fix summary output * Add gem lock file * Add push so I can test workflow * A few more places where ptfe-releases is used * Rename ptfe -> tfe * content folder should be terraform-enterprise * Forgot to update release_file loc * Prevent from running in public UDR * Output public UDR error to GITHUB_STEP_SUMMARY * Apply suggestions from code review Co-authored-by: Leah Bush <157434496+LeahMarieBush@users.noreply.github.com> * Remove commented out code --------- Co-authored-by: Leah Bush <157434496+LeahMarieBush@users.noreply.github.com> --------- Co-authored-by: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> Co-authored-by: Robert Main <50675045+rmainwork@users.noreply.github.com> Co-authored-by: HashiBot <62622282+hashibot-web@users.noreply.github.com> Co-authored-by: Leah Bush <157434496+LeahMarieBush@users.noreply.github.com> * Add tfe-releases copyright headers (#394) * Updates for tfc-agent release 1.22.2 * Undo generated removal of include policy * Compress upload into gzipped tarball (#396) * Compress upload into gzipped tarball This helps to resolve an issue that was breaking preview deploys where too many files were being uploaded at once * Move command option within parens Accidentally added the `--archive` option outside parens which would result in it not being passed to `vercel` as intended. Co-authored-by: Leah Bush <157434496+LeahMarieBush@users.noreply.github.com> * Bundle vercel deployment into tgz archive for prod Similar to 518efc4 - update the deploy UDR action to first bundle everything into a tgz archive prior to upload to vercel to avoid hitting API file count limits (8000 for enterprise plans) * Add base branch for testing to GH action * Remove branch name from pull_request_target --------- Co-authored-by: Leah Bush <157434496+LeahMarieBush@users.noreply.github.com> * feat: add all-docs-paths to compare-api-responses script (#391) * Add `terraform-plugin-mux@0.19.x` documentation (#400) * Add `terraform-plugin-testing@1.13.x` documentation (#346) * initial copy of terraform-plugin-testing 1.12.x to 1.13.x $ cp -r content/terraform-plugin-testing/v1.12.x content/terraform-plugin-testing/v1.13.x $ git add content/terraform-plugin-testing/v1.13.x * Add import mode to testing-patterns.mdx * fixup! Add import mode to testing-patterns.mdx * Update content/terraform-plugin-testing/v1.13.x/docs/plugin/testing/testing-patterns.mdx * Update content/terraform-plugin-testing/v1.13.x/docs/plugin/testing/testing-patterns.mdx Co-authored-by: Austin Valle <austinvalle@gmail.com> * Add teststep subsection for import mode * Add teststep subsection for import mode * Add teststep subsection for import mode * Expand on import mode * Update plugin/testing/acceptance-tests/index.mdx * Update acceptance-tests/index.mdx * Update acceptance-tests/index.mdx * em dash * Update acceptance-tests/continuous-integration * Update acceptance-tests/index.mdx * Update import-mode.mdx * Update acceptance-tests/index.mdx * tidy * Update testing/index.mdx * Update testing/index.mdx * Update testing nav * Update testing/index.mdx * Update testing/index.mdx * Fix code block * Update testing/* * Simplify acceptance-tests * Omit import example * Update content/terraform-plugin-testing/v1.13.x/docs/plugin/testing/acceptance-tests/environment-variables.mdx Co-authored-by: Austin Valle <austinvalle@gmail.com> * Fix environment-variables.mdx formatting * Fix environment-variables.mdx formatting * Tidy * Update content/terraform-plugin-testing/v1.13.x/docs/plugin/testing/acceptance-tests/continuous-integration.mdx Co-authored-by: Austin Valle <austinvalle@gmail.com> * Update content/terraform-plugin-testing/v1.13.x/docs/plugin/testing/acceptance-tests/import-mode.mdx Co-authored-by: Austin Valle <austinvalle@gmail.com> * Apply suggestions from code review Co-authored-by: Austin Valle <austinvalle@gmail.com> * Tidy * Make heading H1 * Tidy import-mode --------- Co-authored-by: Austin Valle <austinvalle@gmail.com> * Add `terraform-plugin-framework@v1.15.x` documentation (#355) * copy 1.14.x to new folder * Framework - Resource Identity Documentation (#361) * add skeleton of thoughts on doc updates * Initial update to reflect the addition of resource identity.mdx * Second update of documentation to address some comments * Removing extra line * Update content/terraform-plugin-framework/v1.15.x/docs/plugin/framework/resources/identity.mdx Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com> * adjust type pages * Apply suggestions from code review Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com> * remove stack + note callout * add to nav * update code examples and change name back * update identity docs * more identity updates * updates + todos * space * remove sections * last updates to identity docs --------- Co-authored-by: Rain <rainskwan@gmail.com> Co-authored-by: Rain Kwan <91649079+rainkwan@users.noreply.github.com> Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com> --------- Co-authored-by: Rain <rainskwan@gmail.com> Co-authored-by: Rain Kwan <91649079+rainkwan@users.noreply.github.com> Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com> * Make agent eng team owners of agent docs * Ignore gnu.org domain in link checker (#401) * ignore gnu domain in link checker * Test to make sure that the GNU domain is skipped * Add `terraform-plugin-sdk/v2@v2.37.x` documentation (#356) * copy v2.36.x to new folder * add identity changes (#402) * Merge develop into main in preparation for launch (#425) * Migrate terraform-docs-common (#227) * Migrate terraform-docs-agents (#228) * Fix content not showing up in preview and link checker checking more than *.mdx files (#226) (#231) * Broken link checker should only run on .mdx files * Add a test to catch a broken link * Edit a JSON file * Move to always using head.sha when link checking * Miss a place for the head.sha * print the changed files * Move back to using nick-fields/retry * Fix misspelling and add another test * Fix wrong var being pass in * Fix misspelling of variable * Found another misspelling :face_palm: * get-changed-files output is space not comma sep * Give action a clearer name * Fix dev-portal cache * Revert testing changes * Put back space * Migrate over terraform-cdk (#229) * API Compare tool for version metadata (#232) * Add readme * Update command in package.json * Add test output folder to gitignore * Shorten example response * Add default values for old and new APIs --------- Co-authored-by: Ruben Nic <RubenSandwich@users.noreply.github.com> * Fix merge conflict (#252) * Keep develop in sync with main (#251) * Fix content not showing up in preview and link checker checking more than *.mdx files (#226) * Broken link checker should only run on .mdx files * Add a test to catch a broken link * Edit a JSON file * Move to always using head.sha when link checking * Miss a place for the head.sha * print the changed files * Move back to using nick-fields/retry * Fix misspelling and add another test * Fix wrong var being pass in * Fix misspelling of variable * Found another misspelling :face_palm: * get-changed-files output is space not comma sep * Give action a clearer name * Fix dev-portal cache * Revert testing changes * Put back space * Enable vercel deployment protection bypass (#230) * Expand lychee command to multiple lines This makes the arguments easier to read (multiple small lines rather than one line line that stretches for miles) * Add vercel protection bypass header to lychee command * Disable prod workflows outside of public repo (#234) * Disable prod workflows outside of public repo * Moving to using job level if * Mock imports in app/utils/utils.test.ts to run without prebuild step (#238) * Mock import in app/api/content/[productSlug]/redirects/route.test.ts to run without prebuild step (#241) * Mock imports in app/api/all-docs-paths/route.test.ts to run without prebuild step (#239) * Mock imports in app/utils/allDocsPaths.test.ts to run without prebuild step (#237) * repo sync between public and internal repos for web-unifed-docs GHA (#236) * Change repo owner to hashicorp in repo-sync workflow (#242) * Mock import of version metadata in app/api/content/[productSlug]/version-metadata/route.ts (#240) * Mock import of version metadata (#244) * Mock import of versionMetadata in app/api/assets/[productSlug]/[version]/[...assetPath]/route.test.ts(#245) * Mock imports in app/api/content/[productSlug]/doc/[version]/[...docsPath]/route.test.ts (#243) * Mock imports for versionMetadata.json, docsPathsAllVersions.json, and productConfig.mjs * Remove path navigation from fixtures import (#1) (#247) * sync changes from web-unified-docs-internal * Update method from compareCommits to compareCommitsWithBasehead (#249) * Remove prebuild from test action (#250) * Add develop to target branches --------- Co-authored-by: Ruben Nic <RubenSandwich@users.noreply.github.com> Co-authored-by: Robert Main <50675045+rmainwork@users.noreply.github.com> Co-authored-by: HashiBot <62622282+hashibot-web@users.noreply.github.com> * api comparison tool: content versions (#340) * Change arg to d for drop-keys * Added functionality to test content-versions API * Add examples to the readme * Sync changes from main into develop (#344) * Fix content not showing up in preview and link checker checking more than *.mdx files (#226) * Broken link checker should only run on .mdx files * Add a test to catch a broken link * Edit a JSON file * Move to always using head.sha when link checking * Miss a place for the head.sha * print the changed files * Move back to using nick-fields/retry * Fix misspelling and add another test * Fix wrong var being pass in * Fix misspelling of variable * Found another misspelling :face_palm: * get-changed-files output is space not comma sep * Give action a clearer name * Fix dev-portal cache * Revert testing changes * Put back space * Enable vercel deployment protection bypass (#230) * Expand lychee command to multiple lines This makes the arguments easier to read (multiple small lines rather than one line line that stretches for miles) * Add vercel protection bypass header to lychee command * Disable prod workflows outside of public repo (#234) * Disable prod workflows outside of public repo * Moving to using job level if * Mock imports in app/utils/utils.test.ts to run without prebuild step (#238) * Mock import in app/api/content/[productSlug]/redirects/route.test.ts to run without prebuild step (#241) * Mock imports in app/api/all-docs-paths/route.test.ts to run without prebuild step (#239) * Mock imports in app/utils/allDocsPaths.test.ts to run without prebuild step (#237) * repo sync between public and internal repos for web-unifed-docs GHA (#236) * Change repo owner to hashicorp in repo-sync workflow (#242) * Mock import of version metadata in app/api/content/[productSlug]/version-metadata/route.ts (#240) * Mock import of version metadata (#244) * Mock import of versionMetadata in app/api/assets/[productSlug]/[version]/[...assetPath]/route.test.ts(#245) * Mock imports in app/api/content/[productSlug]/doc/[version]/[...docsPath]/route.test.ts (#243) * Mock imports for versionMetadata.json, docsPathsAllVersions.json, and productConfig.mjs * Remove path navigation from fixtures import (#1) * Remove path navigation from fixtures import (#1) (#247) * sync changes from web-unified-docs-internal * Update method from compareCommits to compareCommitsWithBasehead (#249) * Remove prebuild from test action (#250) * Add develop to target branches * Remove paths arg to allow Test & Lint action to run on every PR (#253) * Remove PR lock logic from repo-sync workflow (#263) * Repo sync (#34) * Remove path navigation from fixtures import (#1) (#247) * sync changes from web-unified-docs-internal * Update method from compareCommits to compareCommitsWithBasehead (#249) * Remove prebuild from test action (#250) * Add develop to target branches * Remove paths arg to allow Test & Lint action to run on every PR (#253) * Remove PR lock logic from repo-sync workflow (#263) --------- Co-authored-by: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> * Repo sync (#291) * Repo sync (#34) * sync changes from web-unified-docs-internal * Update method from compareCommits to compareCommitsWithBasehead (#249) * Remove prebuild from test action (#250) * Add develop to target branches * Remove paths arg to allow Test & Lint action to run on every PR (#253) * Remove PR lock logic from repo-sync workflow (#263) --------- Co-authored-by: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> * Repo sync (#38) * sync changes from web-unified-docs-internal * Update method from compareCommits to compareCommitsWithBasehead (#249) * Remove prebuild from test action (#250) * Add develop to target branches * Remove paths arg to allow Test & Lint action to run on every PR (#253) * Remove PR lock logic from repo-sync workflow (#263) --------- Co-authored-by: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> * Add Vercel link to deploy preview (#39) * Add Vercel link to deploy job (#290) * Fix for dev-portal is failing to build in UDR internal repo * Repo sync (#326) * Repo sync (#73) * Fix content loading (#235) * Use vercel protection bypass headcer Builds were previously breaking when UDR attempted to make HTTP requests to the CDN (vercel public folder) to retrieve content. Adding the `x-vercel-protection-bypass` header should fix that * Add use server directive * Revert "Add use server directive" Adding a 'use server' directive to this file causes 404s on the content API. This reverts commit 4f2ecae. --------- Co-authored-by: Ruben Nic <RubenSandwich@users.noreply.github.com> Co-authored-by: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> Co-authored-by: HashiBot <62622282+hashibot-web@users.noreply.github.com> * Remove terraform docs common (#342) * Remove terraform-docs-common from develop branch * Comment out terraform-docs-common Disable terraform-docs-common in product config * Undo removal of content dir mapping --------- Co-authored-by: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> * Add terraform-docs-agents (#345) * remove terraform-cdk docs (#347) * Re-sync terraform-docs-agents docs (#348) Co-authored-by: Ruben Nic <RubenSandwich@users.noreply.github.com> * Update image file paths for terraform-docs-agents (#350) * Change image path from public/img to img Comment out themed images and add TODO for when this is supported Add TODO to remove non-themed image once themed images are supported * Remove commented out images * Delete images from v1.15.x and v1.16.x * Copy over images from v1.17.x * Add ptfe release PR request template * Add TFE release notes workflow (#367) * Add clone services repo script * Move config files into script folder * Add execute changelog script * add create pull request script * add workflow file * Workflow needs to run once to test * Add the release notes PR url to the summary * Correctly get env.VERSION * Correctly expand PR_URL * Just don't use PR_URL as it isn't expanding * Remove push dispatch, as no longer needed * I don't believe PR_NUMBER is being set correctly * Set PR_NUMBER in multiple steps * Try each step separately * Return pr_url from ruby * Let pr_url should be a var * Should be double quotes * Fix summary output * Add gem lock file * Add push so I can test workflow * A few more places where ptfe-releases is used * Rename ptfe -> tfe * content folder should be terraform-enterprise * Forgot to update release_file loc * Prevent from running in public UDR * Output public UDR error to GITHUB_STEP_SUMMARY * Apply suggestions from code review Co-authored-by: Leah Bush <157434496+LeahMarieBush@users.noreply.github.com> * Remove commented out code --------- Co-authored-by: Leah Bush <157434496+LeahMarieBush@users.noreply.github.com> * Add in ptfe-releases content (#393) * Add in ptfe-releases content * Add tfe-releases copyright headers * feat: add terraform-docs-common to develop branch (#395) * Copy docs workflow (#404) * Add enough for barebones test * Add push for testing * Fix workflow name * Add test file at root to check that PR opens * login with github token * Update gh token * Try just a git push * Add back push head * merge into develop for now * Remove push action * remove comment that was messing up code * Get copy-cloud-docs-for-tfe compiling * Only building only version metadata * Refactor to remove targetRepoLastSyncFile * Downgrade remark to fix mdx v2 errors * Get Copy cloud-docs for TFE working * Check if the branch name already exists * Fix type errors * Update the README with the new name * Test the whole workflow connected together * checkout the proper workflow file before running * path should be a string * forgot a period * Use latest sha for GHA run * Forgot to build 🤦 * double check that the checkout is working * Add the current loc to checkout * try the path just "testing" * include the github workspace * It's github.workspace * checkout is deleting previous folder contents * Double check that the files are being moved over * fix move command * fix a space in path * list files for debugging * What is in our base dir * copy dot files * correct file path * For demo only add changed files in /ptfe-releases * For the sake of the demo do a clean PR * Forgot to rebuild * base against develop * new-pr checkout should be develop as well * clean up testing code * Don't copy over /architectural-details * Corrected new-pr path * prebuild-only-version-metadata exists in branch * Correctly fetch the origin branch * use working-directory * Rewrite to support two different PRs * Resolve the versionMetadataPath * Fix working dir and branch checking code * Remove branch checking code * Try a new way to check for a branch existing * try again for branch checking * should be a "do not equals" * Update bot user * Add diff PR to workflow * Update PR names * Update a bit of the wording * Remove testing code * Trigger copy docs from release notes workflow * delete old tests as they are no longer being used * Add copywrite headers * Add todos to workflow * Add parenthesis around closed message * Update README and remove code comment * Remove TODOs and base off of main * Update .github/actions/copy-cloud-docs-for-tfe/main.ts Co-authored-by: Robert Main <50675045+rmainwork@users.noreply.github.com> --------- Co-authored-by: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> Co-authored-by: Robert Main <50675045+rmainwork@users.noreply.github.com> Co-authored-by: HashiBot <62622282+hashibot-web@users.noreply.github.com> Co-authored-by: Leah Bush <157434496+LeahMarieBush@users.noreply.github.com> Co-authored-by: Leah Bush <leah.bush@hashicorp.com> * Forgot to update a path (#426) * Forgot one other path... (#428) * Actually update the path (#429) * Update path in GHA (#430) * Update path in GHA * update build output * Rename ptfe-releases to terraform-enterprise (#419) * Rename PTFE Release Folder Renames PTFE releases folder to terraform-enterprise * Change PTFE Releases Product Config to TFE * Redirect /ptfe-releases to /terraform-enterprise * Update reference to ptfe-releases Update code comments to make reference to terraform-enterprise, not pfe-releases * Add missing license header * Update mermaid README diagram Terraform is about to be migrated to UDR, so this diagram needed to be updated to reflect that * Refactor to remove references to ptfe-releases Since #425 got merged into the base branch before this PR, additional references to `/ptfe-releases` were re-introduced. These needed to be removed in order for things to build and load correctly. * Don't check compiled actions for missing copyright header (#436) The content of this action is(somewhat) auto generated by `ncc` meaning we don't have a great deal of control over its content. Therefore, we can probably safely ignore it when checking for missing copyright headers as it is isn't a source file * fix terraform docs common metadata (#438) * Assign a placeholder version for unversioned docs * Move all TFC versions to 'v0.0.x' * Give version less docs a version * Use PRODUCT_CONFIG when we can * fix sitemaps for terraform-docs-common * Check PRODUCT_CONFIG in more places * fix file path * remove console.log * fix docs route tests * change back to null * fix more tests * fix gather-version tests * fix test * put aloglia check back * fix tests * remove extra console.log --------- Co-authored-by: Leah Bush <leah.bush@hashicorp.com> * Updates for tfc-agent release 1.22.3 * chore: add terraform docs to UDR (#437) * Add `terraform-plugin-mux@0.20.x` documentation (#424) * Update codeowners for ptfe and tdc (#441) * Add terraform-docs-common CODEOWNERS * Add terraform-enterprise to CODEOWNERS * Add missing team to terraform-docs-common * chore: add terraform teams to codeowners (#442) * chore: add terraform teams to codeowners * add terraform backend codeowners * use wildcards * Sync ptfe-releases and terraform-docs-common docs (#440) * terraform-docs-common * terraform-enterprise * Apply middleware to all api routes (#451) * Initial draft * do a dirty rewrite for query params * Update diff PR to merge into release PR (#443) * Update diff PR to merge into release PR * forgot to put env before a var * fix get latest terraform-enterprise version * Update step titles to match * Added /app to dir when not needed * Update gh cli action to edit * Copy file contents not the whole file * Diff PR should start on Release PR ref * Update PRs wording * Clean up secrets and add ability to trigger notify --------- Co-authored-by: Ruben Nic <RubenSandwich@users.noreply.github.com> Co-authored-by: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> Co-authored-by: Robert Main <50675045+rmainwork@users.noreply.github.com> Co-authored-by: Leah Bush <157434496+LeahMarieBush@users.noreply.github.com> Co-authored-by: Claire Knutson <claire.knutson@hashicorp.com> Co-authored-by: Claire Knutson <117297128+claire-tfc@users.noreply.github.com> Co-authored-by: Austin Valle <austinvalle@gmail.com> Co-authored-by: Baraa Basata <bbasata@gmail.com> Co-authored-by: Rain <rainskwan@gmail.com> Co-authored-by: Rain Kwan <91649079+rainkwan@users.noreply.github.com> Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com> Co-authored-by: Krista LaFentres <lafentres@users.noreply.github.com> Co-authored-by: Leah Bush <leah.bush@hashicorp.com> Co-authored-by: Kelsi Hoyle <kelsi.hoyle@hashicorp.com>
1 parent 54777d8 commit 32fb873

File tree

2 files changed

+93
-69
lines changed

2 files changed

+93
-69
lines changed

.github/workflows/copy-cloud-docs-for-tfe.yml

Lines changed: 82 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
branch:
7-
description: 'Ex: docs-tfe-releases/v123456-1; ptfe-releases/v123456-1'
7+
description: 'Release branch. (Ex: docs-tfe-releases/v123456-1, ptfe-releases/v123456-1)'
88
required: true
99

1010
env:
@@ -69,55 +69,45 @@ jobs:
6969
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
7070
with:
7171
ref: ${{env.release_branch}}
72-
path: "${{github.workspace}}/release"
72+
path: '${{github.workspace}}/release'
7373

74-
- name: Checkout main for new docs version ACTUAL PR
74+
# MAKE THE RELEASE PR
75+
- name: Checkout main for new docs version RELEASE PR
7576
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
7677
with:
77-
path: "${{github.workspace}}/new-docs-pr"
78-
79-
- name: Checkout main for new docs version DIFF PR
80-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
81-
with:
82-
path: "${{github.workspace}}/new-docs-diff-pr"
78+
path: '${{github.workspace}}/new-docs-pr'
8379

8480
- name: Generate version-metadata for workflow
85-
working-directory: "${{github.workspace}}/release"
81+
working-directory: '${{github.workspace}}/release'
8682
run: |
8783
npm i
8884
npm run prebuild-only-version-metadata
8985
90-
# MAKING THE DIFF PR
91-
- name: Copy files for new docs version DIFF PR
92-
uses: ./release/.github/actions/copy-cloud-docs-for-tfe
93-
with:
94-
source_path: "${{github.workspace}}/release"
95-
target_path: "${{github.workspace}}/new-docs-diff-pr"
86+
- name: Create the new TFE version folder for RELEASE PR
87+
run: |
88+
version=$(jq -r '.["terraform-enterprise"][] | select(.isLatest == true) | .version' "${{github.workspace}}/release/app/api/versionMetadata.json")
89+
echo "Latest terraform-enterprise version: ${version}"
90+
echo "LATEST_TFE_VERSION=$version" >> $GITHUB_ENV
91+
92+
mkdir -p "${{github.workspace}}/new-docs-pr/content/terraform-enterprise/${{env.SERIES}}-${{env.RELEASE}}"
9693
97-
- name: Open new docs docs version DIFF PR
98-
working-directory: "${{github.workspace}}/new-docs-diff-pr"
94+
cp -a "${{github.workspace}}/release/content/terraform-enterprise/${version}/." "${{github.workspace}}/new-docs-pr/content/terraform-enterprise/${{env.SERIES}}-${{env.RELEASE}}"
95+
96+
- name: Open new docs version RELEASE PR
97+
working-directory: '${{github.workspace}}/new-docs-pr'
9998
env:
100-
branch_name: docs-diff/${{env.SERIES}}-${{env.RELEASE}}
99+
branch_name: docs/${{env.SERIES}}-${{env.RELEASE}}
101100
pr_body: |
102-
# Automated Docs DIFF PR for TFE ${{env.SERIES}}-${{env.RELEASE}}
103-
104-
**❗ DO NOT MERGE THIS PR, IT IS FOR DIFFS ONLY ❗**
101+
# Automated Docs Release PR for TFE ${{env.SERIES}}-${{env.RELEASE}}
105102
106103
**TFE Series**: ${{ env.SERIES }}
107104
**TFE Release**: ${{ env.RELEASE }}
108105
109-
This copies over `cloud-docs` from:
110-
- ${{github.server_url}}/${{github.repository}}/tree/${{env.release_branch}}
111-
112-
This PR was created via:
113-
- ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}
114-
115-
Triggered by creation of branch:
116-
- ${{github.server_url}}/${{github.repository}}/tree/${{env.release_branch}}
106+
...Waiting for the diff PR to be created, before finishing this PR's description...
117107
118-
# secrets.WORKFLOW_TESTING_TOKEN requires permissions read:org, repo, workflow
108+
# secrets.TFE_WORKFLOWS_GITHUB_TOKEN requires permissions read:org, repo, workflow
119109
run: |
120-
echo ${{ secrets.WORKFLOW_TESTING_TOKEN }} | gh auth login --with-token
110+
echo ${{ secrets.TFE_WORKFLOWS_GITHUB_TOKEN }} | gh auth login --with-token
121111
git config --global user.email "team-rel-eng@hashicorp.com"
122112
git config --global user.name "tfe-release-bot"
123113
@@ -132,64 +122,63 @@ jobs:
132122
git checkout -b ${{env.branch_name}}
133123
git add .
134124
135-
git commit -m "Automated Docs DIFF PR" --no-verify
125+
git commit -m "Automated Release Docs PR" --no-verify
136126
git push origin HEAD
137127
138128
gh pr create \
139129
--body="${{env.pr_body}}" \
140-
--title="Automated Docs DIFF PR for TFE ${{env.SERIES}}-${{env.RELEASE}}" \
130+
--title="Automated Docs Release PR for TFE ${{env.SERIES}}-${{env.RELEASE}}" \
141131
--draft \
142132
--head ${{env.branch_name}} \
143133
--base main
144134
145-
diff_pr_url=$(gh pr view --json url --jq '.url')
146-
echo "DIFF_PR_URL=${diff_pr_url}" >> $GITHUB_ENV
147-
echo "**Automated DIFF PR URL**: ${diff_pr_url}" >> $GITHUB_STEP_SUMMARY
148-
149-
echo "(Closed DIFF PR at ${diff_pr_url} in order to prevent an accidental merge)" >> $GITHUB_STEP_SUMMARY
150-
gh pr close "${diff_pr_url}"
135+
pr_url=$(gh pr view --json url --jq '.url')
136+
echo "PR_URL=${pr_url}" >> $GITHUB_ENV
137+
echo "**Automated Release PR URL**: ${pr_url}" >> $GITHUB_STEP_SUMMARY
151138
139+
# MAKE THE DIFF PR
140+
- name: Checkout main for new docs version DIFF PR
141+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
142+
with:
143+
path: '${{github.workspace}}/new-docs-diff-pr'
144+
ref: docs/${{env.SERIES}}-${{env.RELEASE}}
152145

153-
# MAKING THE ACTUAL PR
154-
- name: Copy files for new docs version ACTUAL PR
146+
- name: Copy files for new docs version DIFF PR
155147
uses: ./release/.github/actions/copy-cloud-docs-for-tfe
156148
with:
157-
source_path: "${{github.workspace}}/release"
158-
target_path: "${{github.workspace}}/new-docs-pr"
149+
source_path: '${{github.workspace}}/release'
150+
target_path: '${{github.workspace}}/new-docs-diff-pr'
159151
new_TFE_version: ${{env.SERIES}}-${{env.RELEASE}}
160152

161-
- name: Open new docs version ACTUAL PR
162-
working-directory: "${{github.workspace}}/new-docs-pr"
153+
- name: Open new docs version DIFF PR
154+
working-directory: '${{github.workspace}}/new-docs-diff-pr'
163155
env:
164-
branch_name: docs/${{env.SERIES}}-${{env.RELEASE}}
156+
release_branch_name: docs/${{env.SERIES}}-${{env.RELEASE}}
157+
branch_name: docs-diff/${{env.SERIES}}-${{env.RELEASE}}
165158
pr_body: |
166-
# Automated Docs PR for TFE ${{env.SERIES}}-${{env.RELEASE}}
159+
# Automated Docs Diff PR for TFE ${{env.SERIES}}-${{env.RELEASE}}
167160
168161
**TFE Series**: ${{ env.SERIES }}
169162
**TFE Release**: ${{ env.RELEASE }}
170163
171-
This copies over `cloud-docs` from:
172-
- ${{github.server_url}}/${{github.repository}}/tree/${{env.release_branch}}
173-
174164
This PR was created via:
175165
- ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}
176166
177167
Triggered by creation of branch:
178168
- ${{github.server_url}}/${{github.repository}}/tree/${{env.release_branch}}
179169
180-
Changes against the current TFE docs:
181-
- ${{ env.DIFF_PR_URL }}
182-
183-
### Reviewers
170+
Copies over `content/terraform-docs-common/docs/cloud-docs` from:
171+
- ${{github.server_url}}/${{github.repository}}/tree/${{env.release_branch}}
184172
185-
> **Note**: The `digital-content-events` GH App currently does not have permissions to request PR reviews from teams.
173+
Merges into the docs release branch:
174+
- ${{ env.PR_URL }}
186175
176+
### Reviewers
187177
- [ ] @hashicorp/ptfe-review
188178
- [ ] @hashicorp/web-platform
189179
190-
# secrets.WORKFLOW_TESTING_TOKEN requires permissions read:org, repo, workflow
191180
run: |
192-
echo ${{ secrets.WORKFLOW_TESTING_TOKEN }} | gh auth login --with-token
181+
echo ${{ secrets.TFE_WORKFLOWS_GITHUB_TOKEN }} | gh auth login --with-token
193182
git config --global user.email "team-rel-eng@hashicorp.com"
194183
git config --global user.name "tfe-release-bot"
195184
@@ -204,16 +193,45 @@ jobs:
204193
git checkout -b ${{env.branch_name}}
205194
git add .
206195
207-
git commit -m "Automated Docs PR" --no-verify
196+
git commit -m "Automated Docs Diff PR" --no-verify
208197
git push origin HEAD
209198
210199
gh pr create \
211200
--body="${{env.pr_body}}" \
212-
--title="Automated Docs PR for TFE ${{env.SERIES}}-${{env.RELEASE}}" \
201+
--title="Automated Docs Diff PR for TFE ${{env.SERIES}}-${{env.RELEASE}}" \
213202
--draft \
214203
--head ${{env.branch_name}} \
215-
--base main
204+
--base ${{env.release_branch_name}}
216205
217-
pr_url=$(gh pr view --json url --jq '.url')
218-
echo "PR_URL=${pr_url}" >> $GITHUB_ENV
219-
echo "**Automated ACTUAL PR URL**: ${pr_url}" >> $GITHUB_STEP_SUMMARY
206+
diff_pr_url=$(gh pr view --json url --jq '.url')
207+
echo "DIFF_PR_URL=${diff_pr_url}" >> $GITHUB_ENV
208+
echo "**Automated DIFF PR URL**: ${diff_pr_url}" >> $GITHUB_STEP_SUMMARY
209+
210+
- name: Update RELEASE PR with DIFF PR URL
211+
env:
212+
branch_name: docs/${{env.SERIES}}-${{env.RELEASE}}
213+
pr_body: |
214+
# Automated Docs Release PR for TFE ${{env.SERIES}}-${{env.RELEASE}}
215+
216+
**TFE Series**: ${{ env.SERIES }}
217+
**TFE Release**: ${{ env.RELEASE }}
218+
219+
This PR was created via:
220+
- ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}
221+
222+
Triggered by creation of branch:
223+
- ${{github.server_url}}/${{github.repository}}/tree/${{env.release_branch}}
224+
225+
Changes since last release, diff PR:
226+
- ${{ env.DIFF_PR_URL }}
227+
228+
### Reviewers
229+
- [ ] @hashicorp/ptfe-review
230+
- [ ] @hashicorp/web-platform
231+
run: |
232+
echo ${{ secrets.TFE_WORKFLOWS_GITHUB_TOKEN }} | gh auth login --with-token
233+
git config --global user.email "team-rel-eng@hashicorp.com"
234+
git config --global user.name "tfe-release-bot"
235+
236+
gh pr edit ${{env.PR_URL}} \
237+
--body="${{env.pr_body}}"

.github/workflows/create-tfe-release-notes.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ on:
1818
type: boolean
1919
required: false
2020
default: false
21+
notify:
22+
description: 'Whether to send a Slack notification for the changelog PR'
23+
type: boolean
24+
required: false
25+
default: true
2126

2227
env:
23-
GITHUB_TOKEN: ${{ secrets.TFE_GITHUB_TOKEN_010623 }}
24-
GITHUB_USER: ${{ secrets.TFE_GITHUB_USER_010623 }}
28+
GITHUB_TOKEN: ${{ secrets.TFE_WORKFLOWS_GITHUB_TOKEN }}
29+
GITHUB_USER: team-rel-eng@hashicorp.com
2530
DEV: ${{ inputs.dev-mode }}
31+
NOTIFY: ${{ inputs.notify }}
2632
VERSION: ${{ inputs.version }}
2733
RELEASE_BRANCH: ${{ inputs.release-branch }}
2834
LAST_RELEASE_TAG: ${{ inputs.last-release-tag }}
@@ -64,9 +70,9 @@ jobs:
6470
6571
- name: Slack notification
6672
id: slack
67-
if: ${{ env.DEV == 'false' }}
73+
if: ${{ env.DEV == 'false' }} && ${{ env.NOTIFY == 'true' }}
6874
env:
69-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
75+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TFE_WEBHOOK_URL }}
7076
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
7177
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
7278
with:
@@ -116,4 +122,4 @@ jobs:
116122
inputs: {
117123
branch: 'docs-tfe-releases/${{ env.VERSION }}'
118124
},
119-
})
125+
})

0 commit comments

Comments
 (0)