From c1f4b86d34c8637dc2a179aea0300f33a17b4602 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 8 Oct 2019 16:12:02 -0700 Subject: [PATCH] Use shared variable group (#7431) When setting up Azure Pipelines, I didn't like having to define codecov_token for each pipeline. This works around it by using a shared variable group. You can see this working successfully at https://dev.azure.com/certbot/certbot/_build/results?buildId=3. * Use certbot-common. * update instructions --- .azure-pipelines/INSTALL.md | 8 +++++--- .azure-pipelines/templates/tests-suite.yml | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/INSTALL.md b/.azure-pipelines/INSTALL.md index b5f79e525..9c1e4bff7 100644 --- a/.azure-pipelines/INSTALL.md +++ b/.azure-pipelines/INSTALL.md @@ -112,6 +112,8 @@ steps: CODECOV_TOKEN: $(codecov_token) ``` -- On Azure DevOps, go to you organization, project, pipeline tab -- Select the pipeline, click "Edit" button, then click "Variables" button -- Set name (eg `codecov_token`), value, tick "Keep this value secret" +To set up a variable that is shared between pipelines, follow the instructions +at +https://docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups. +When adding variables to a group, don't forget to tick "Keep this value secret" +if it shouldn't be shared publcily. diff --git a/.azure-pipelines/templates/tests-suite.yml b/.azure-pipelines/templates/tests-suite.yml index 3fe0abf74..bb54c8eee 100644 --- a/.azure-pipelines/templates/tests-suite.yml +++ b/.azure-pipelines/templates/tests-suite.yml @@ -14,6 +14,8 @@ jobs: PYTHON_VERSION: 3.7 TOXENV: integration-certbot PYTEST_ADDOPTS: --numprocesses 4 + variables: + - group: certbot-common steps: - task: UsePythonVersion@0 inputs: