From 4e49b2a2aec1fc5536316be5007fafdc83c6535e Mon Sep 17 00:00:00 2001 From: Nicolas Vuillamy Date: Sun, 5 Nov 2023 20:29:05 +0100 Subject: [PATCH] Auth doc --- CHANGELOG.md | 1 + docs/salesforce-ci-cd-setup-auth-azure.md | 17 +++++++++++++++ docs/salesforce-ci-cd-setup-auth-bitbucket.md | 13 ++++++++++++ docs/salesforce-ci-cd-setup-auth-github.md | 19 +++++++++++++++++ docs/salesforce-ci-cd-setup-auth-gitlab.md | 21 +++++++++++++++++++ docs/salesforce-ci-cd-setup-auth.md | 8 +++---- docs/salesforce-monitoring-config-gitlab.md | 2 +- 7 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 docs/salesforce-ci-cd-setup-auth-azure.md create mode 100644 docs/salesforce-ci-cd-setup-auth-bitbucket.md create mode 100644 docs/salesforce-ci-cd-setup-auth-github.md create mode 100644 docs/salesforce-ci-cd-setup-auth-gitlab.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 64fdd5102..ea111e8f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Note: Can be used with `sfdx plugins:install sfdx-hardis@beta` and docker image `hardisgroupcom/sfdx-hardis@beta` - Update [slack integration documentation](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-slack/) +- Add [tutorials](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-auth/#major-orgs) for authentification configuration on CI/CD servers ## [4.10.O] 2023-11-04 diff --git a/docs/salesforce-ci-cd-setup-auth-azure.md b/docs/salesforce-ci-cd-setup-auth-azure.md new file mode 100644 index 000000000..2621514e2 --- /dev/null +++ b/docs/salesforce-ci-cd-setup-auth-azure.md @@ -0,0 +1,17 @@ +--- +title: Configure Azure CI/CD variables +description: Learn how to configure CI/CD variables for CI Server authentication to automate deployments with Azure Pipelines +--- + + +## Define sfdx-hardis environment variables + +- Go to **Project -> Pipelines** +- Select your pipeline +- Click on **Edit** , then on **Variables** +- Input variable name and value +- Don't forget to click on **save** ! + +![](assets/images/screenshot-monitoring-azure-variable.png) + +More info: [Azure documentation](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=classic%2Cbatch){target=blank} \ No newline at end of file diff --git a/docs/salesforce-ci-cd-setup-auth-bitbucket.md b/docs/salesforce-ci-cd-setup-auth-bitbucket.md new file mode 100644 index 000000000..7dbbde065 --- /dev/null +++ b/docs/salesforce-ci-cd-setup-auth-bitbucket.md @@ -0,0 +1,13 @@ +--- +title: Configure Bitbucket CI/CD variables +description: Learn how to configure CI/CD variables for CI Server authentication to automate deployments with Bitbucket Pipelines +--- + + +## Define sfdx-hardis environment variables + +- Go to **Project -> Repository Settings > Repository Variables** _(you must have Bitbucket authorizations to access this menu)_ + +![](assets/images/screenshot-bitbucket-variables.png) + +More info: [BitBucket documentation](https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/#Secured-variables){target=blank} \ No newline at end of file diff --git a/docs/salesforce-ci-cd-setup-auth-github.md b/docs/salesforce-ci-cd-setup-auth-github.md new file mode 100644 index 000000000..67ba5dd82 --- /dev/null +++ b/docs/salesforce-ci-cd-setup-auth-github.md @@ -0,0 +1,19 @@ +--- +title: Configure GitHub CI/CD variables +description: Learn how to configure CI/CD variables for CI Server authentication to automate deployments with GitHub +--- + + +## Define sfdx-hardis environment variables + +- Go to **Repository -> Settings > Secret and variables -> Actions** _(you must have Github authorizations to access this menu)_ + +![](assets/images/screenshot-monitoring-github-variable.png.jpg) + +- Create the new secret with the following info: + - name: **YOUR_VARIABLE_NAME** + - value: `Your variable value` + +![](assets/images/screenshot-monitoring-github-variable-add.png.jpg) + +More info: [GitHub documentation](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository){target=blank} \ No newline at end of file diff --git a/docs/salesforce-ci-cd-setup-auth-gitlab.md b/docs/salesforce-ci-cd-setup-auth-gitlab.md new file mode 100644 index 000000000..2cd70cadd --- /dev/null +++ b/docs/salesforce-ci-cd-setup-auth-gitlab.md @@ -0,0 +1,21 @@ +--- +title: Configure Gitlab CI/CD variables +description: Learn how to configure CI/CD variables for CI Server authentication to automate deployments with Gitlab +--- + + +## Define sfdx-hardis environment variables + +- Go to **Project -> Settings > CI/CD -> Variables** _(you must have Gitlab authorizations to access this menu)_ + +![](assets/images/screenshot-gitlab-variables.png) + +- Create the variable with the following info: + - name: **YOUR_VARIABLE_NAME** + - value: `Your variable value` + - Select **Mask variable** if the value is secured, like credentials or tokens + - Unselect **Protected variable** + +![](assets/images/screenshot-add-variable-gitlab.png) + +More info: [Gitlab documentation](https://docs.gitlab.com/ee/ci/variables/#for-a-project){target=blank} \ No newline at end of file diff --git a/docs/salesforce-ci-cd-setup-auth.md b/docs/salesforce-ci-cd-setup-auth.md index 5652a4dc0..ae15e4541 100644 --- a/docs/salesforce-ci-cd-setup-auth.md +++ b/docs/salesforce-ci-cd-setup-auth.md @@ -25,10 +25,10 @@ For example, run the command for `integration`, `uat`, `preprod` and `production How to set CI variables on different Git providers: -- [Gitlab](https://docs.gitlab.com/ee/ci/variables/#for-a-project): Protect variables = false, Mask variables = true -- [Azure](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=classic%2Cbatch): Set Variables in Pipeline -> Tab **Classic** -- [GitHub](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) -- [BitBucket](https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/#Secured-variables) +- [Gitlab tutorial](salesforce-ci-cd-setup-auth-gitlab.md) +- [Azure tutorial](salesforce-ci-cd-setup-auth-azure.md) +- [GitHub tutorial](salesforce-ci-cd-setup-auth-github.md) +- [BitBucket tutorial](salesforce-ci-cd-setup-auth-bitbucket.md) > ![Under the hood](assets/images/engine.png) **_Under the hood_** > diff --git a/docs/salesforce-monitoring-config-gitlab.md b/docs/salesforce-monitoring-config-gitlab.md index bf5d1bdf8..88e6322a4 100644 --- a/docs/salesforce-monitoring-config-gitlab.md +++ b/docs/salesforce-monitoring-config-gitlab.md @@ -27,7 +27,7 @@ description: Learn how to configure a monitoring repository for a Salesforce Org ### Create CI/CD variable - Go to **Project -> Settings > CI/CD -> Variables** _(you must have Gitlab authorizations to access this menu)_ -- Create an access token with the following info: +- Create the variable with the following info: - name: **ACCESS_TOKEN** - value: Paste the value that has been generated when creating the access token in the previous step - Select **Mask variable**