From ce7e8be5f365ee5790976aae62de4d8d4efecf74 Mon Sep 17 00:00:00 2001 From: Joel Timothy Oh Date: Wed, 21 Aug 2024 20:25:28 +0000 Subject: [PATCH] Enhancement (ci): Improve samples CI templates directory structure --- README.md | 10 +++++----- .../{custom => }/azure-pipelines.generate-params.yml | 0 .../{generic => }/azure-pipelines.linux-container.yml | 0 .../{generic => }/azure-pipelines.linux.yml | 0 .../{generic => }/azure-pipelines.macos.yml | 0 .../{custom => }/azure-pipelines.release-params.yml | 0 .../azure-pipelines.windows-powershell-5_1.yml | 0 .../{generic => }/azure-pipelines.windows-pwsh.yml | 0 .../{generic => }/github-workflows.linux-container.yml | 0 .../ci/github/{generic => }/github-workflows.linux.yml | 0 10 files changed, 5 insertions(+), 5 deletions(-) rename docs/samples/ci/azure-pipelines/{custom => }/azure-pipelines.generate-params.yml (100%) rename docs/samples/ci/azure-pipelines/{generic => }/azure-pipelines.linux-container.yml (100%) rename docs/samples/ci/azure-pipelines/{generic => }/azure-pipelines.linux.yml (100%) rename docs/samples/ci/azure-pipelines/{generic => }/azure-pipelines.macos.yml (100%) rename docs/samples/ci/azure-pipelines/{custom => }/azure-pipelines.release-params.yml (100%) rename docs/samples/ci/azure-pipelines/{generic => }/azure-pipelines.windows-powershell-5_1.yml (100%) rename docs/samples/ci/azure-pipelines/{generic => }/azure-pipelines.windows-pwsh.yml (100%) rename docs/samples/ci/github/{generic => }/github-workflows.linux-container.yml (100%) rename docs/samples/ci/github/{generic => }/github-workflows.linux.yml (100%) diff --git a/README.md b/README.md index 634d786..bda223a 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Configure the following CI settings for your main project if `PSRepositoryReleas Add a secret variable `GITHUB_API_TOKEN` containing your [GitHub API token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens), ensuring it has write permissions to the repository. -In the case where GitHub Actions is used for releases, the job token [`GITHUB_TOKEN`](docs/samples/ci/github/generic/github-workflows.linux-container.yml#L58) may be used for creating releases should it have write permissions to the repository. +In the case where GitHub Actions is used for releases, the job token [`GITHUB_TOKEN`](docs/samples/ci/github/github-workflows.linux-container.yml#L58) may be used for creating releases should it have write permissions to the repository. #### Environment variables @@ -170,19 +170,19 @@ pwsh -NoLogo -NonInteractive -NoProfile -Command './PSRepositoryReleaseManager/s **Note:** Ensure the environment variable [`GITHUB_API_TOKEN`](#github-api-token) is defined prior to creating releases. -Sample CI files demonstrating use of this approach can be found [here](docs/samples/ci/github/generic). +Sample CI files demonstrating use of this approach can be found [here](docs/samples/ci/github). #### via Submodule and CI remote templates ##### Generating release notes -To generate release notes, reference the appropriate [`generate.yml`](templates/azure-pipelines/entrypoint) entrypoint CI remote template provided by this project from your main project's CI file. The `generate.yml` templates also support the following [parameters](docs/samples/ci/azure-pipelines/custom/azure-pipelines.generate-params.yml#L4-#L7) for customizing the generation of release notes. +To generate release notes, reference the appropriate [`generate.yml`](templates/azure-pipelines/entrypoint) entrypoint CI remote template provided by this project from your main project's CI file. The `generate.yml` templates also support the following [parameters](docs/samples/ci/azure-pipelines/azure-pipelines.generate-params.yml#L4-#L7) for customizing the generation of release notes. ##### Creating releases **Note:** Ensure your main project's CI file(s) and/or settings are configured to run CI jobs for tag refs, and that the environment variable [`GITHUB_API_TOKEN`](#github-api-token) is defined prior to creating releases. -To create releases, reference the appropriate [`release.yml`](templates/azure-pipelines/entrypoint) entrypoint CI remote template provided by this project from your main project's CI file. The `release.yml` templates also support the following [parameters](docs/samples/ci/azure-pipelines/custom/azure-pipelines.release-params.yml#L4-#L21) for customizing the creation of releases. +To create releases, reference the appropriate [`release.yml`](templates/azure-pipelines/entrypoint) entrypoint CI remote template provided by this project from your main project's CI file. The `release.yml` templates also support the following [parameters](docs/samples/ci/azure-pipelines/azure-pipelines.release-params.yml#L4-#L21) for customizing the creation of releases. ## Maintenance @@ -214,4 +214,4 @@ git commit -am 'Bump PSRepositoryReleaseManager to vx.x.x' ## Best practices - Use only tag refs of `PSRepositoryReleaseManager` in your main project. -- If using the project as a [Submodule with CI remote templates](#submodule), ensure your main project's CI file(s) is configured to use the [CI remote templates](docs/samples/ci/azure-pipelines/generic/azure-pipelines.linux-container.yml#L15-#L19) of `PSRepositoryReleaseManager`, and that the ref matches that of the `PSRepositoryReleaseManager` submodule used in your main project. +- If using the project as a [Submodule with CI remote templates](#submodule), ensure your main project's CI file(s) is configured to use the [CI remote templates](docs/samples/ci/azure-pipelines/azure-pipelines.linux-container.yml#L15-#L19) of `PSRepositoryReleaseManager`, and that the ref matches that of the `PSRepositoryReleaseManager` submodule used in your main project. diff --git a/docs/samples/ci/azure-pipelines/custom/azure-pipelines.generate-params.yml b/docs/samples/ci/azure-pipelines/azure-pipelines.generate-params.yml similarity index 100% rename from docs/samples/ci/azure-pipelines/custom/azure-pipelines.generate-params.yml rename to docs/samples/ci/azure-pipelines/azure-pipelines.generate-params.yml diff --git a/docs/samples/ci/azure-pipelines/generic/azure-pipelines.linux-container.yml b/docs/samples/ci/azure-pipelines/azure-pipelines.linux-container.yml similarity index 100% rename from docs/samples/ci/azure-pipelines/generic/azure-pipelines.linux-container.yml rename to docs/samples/ci/azure-pipelines/azure-pipelines.linux-container.yml diff --git a/docs/samples/ci/azure-pipelines/generic/azure-pipelines.linux.yml b/docs/samples/ci/azure-pipelines/azure-pipelines.linux.yml similarity index 100% rename from docs/samples/ci/azure-pipelines/generic/azure-pipelines.linux.yml rename to docs/samples/ci/azure-pipelines/azure-pipelines.linux.yml diff --git a/docs/samples/ci/azure-pipelines/generic/azure-pipelines.macos.yml b/docs/samples/ci/azure-pipelines/azure-pipelines.macos.yml similarity index 100% rename from docs/samples/ci/azure-pipelines/generic/azure-pipelines.macos.yml rename to docs/samples/ci/azure-pipelines/azure-pipelines.macos.yml diff --git a/docs/samples/ci/azure-pipelines/custom/azure-pipelines.release-params.yml b/docs/samples/ci/azure-pipelines/azure-pipelines.release-params.yml similarity index 100% rename from docs/samples/ci/azure-pipelines/custom/azure-pipelines.release-params.yml rename to docs/samples/ci/azure-pipelines/azure-pipelines.release-params.yml diff --git a/docs/samples/ci/azure-pipelines/generic/azure-pipelines.windows-powershell-5_1.yml b/docs/samples/ci/azure-pipelines/azure-pipelines.windows-powershell-5_1.yml similarity index 100% rename from docs/samples/ci/azure-pipelines/generic/azure-pipelines.windows-powershell-5_1.yml rename to docs/samples/ci/azure-pipelines/azure-pipelines.windows-powershell-5_1.yml diff --git a/docs/samples/ci/azure-pipelines/generic/azure-pipelines.windows-pwsh.yml b/docs/samples/ci/azure-pipelines/azure-pipelines.windows-pwsh.yml similarity index 100% rename from docs/samples/ci/azure-pipelines/generic/azure-pipelines.windows-pwsh.yml rename to docs/samples/ci/azure-pipelines/azure-pipelines.windows-pwsh.yml diff --git a/docs/samples/ci/github/generic/github-workflows.linux-container.yml b/docs/samples/ci/github/github-workflows.linux-container.yml similarity index 100% rename from docs/samples/ci/github/generic/github-workflows.linux-container.yml rename to docs/samples/ci/github/github-workflows.linux-container.yml diff --git a/docs/samples/ci/github/generic/github-workflows.linux.yml b/docs/samples/ci/github/github-workflows.linux.yml similarity index 100% rename from docs/samples/ci/github/generic/github-workflows.linux.yml rename to docs/samples/ci/github/github-workflows.linux.yml