From b984880942b4030b48630faa63c87a509dec0771 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Wed, 23 Sep 2020 20:43:44 +0200 Subject: [PATCH] Invoke pipstrap in tox and during the CI --- .azure-pipelines/templates/jobs/packaging-jobs.yml | 8 ++++++-- .azure-pipelines/templates/steps/tox-steps.yml | 1 + tox.ini | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/templates/jobs/packaging-jobs.yml b/.azure-pipelines/templates/jobs/packaging-jobs.yml index b0c7998cb..87f1c3239 100644 --- a/.azure-pipelines/templates/jobs/packaging-jobs.yml +++ b/.azure-pipelines/templates/jobs/packaging-jobs.yml @@ -80,6 +80,7 @@ jobs: displayName: Retrieve Windows installer - script: | py -3 -m venv venv + venv\Scripts\python letsencrypt-auto-source\pieces\pipstrap.py venv\Scripts\python tools\pip_install.py -e certbot-ci displayName: Prepare Certbot-CI - script: | @@ -138,7 +139,9 @@ jobs: - script: | sudo apt-get update sudo apt-get install -y --no-install-recommends nginx-light snapd - python tools/pip_install.py -U tox + python3 -m venv venv + venv/bin/python letsencrypt-auto-source/pieces/pipstrap.py + venv/bin/python tools/pip_install.py -U tox displayName: Install dependencies - task: DownloadPipelineArtifact@2 inputs: @@ -149,7 +152,7 @@ jobs: sudo snap install --dangerous --classic snap/certbot_*_amd64.snap displayName: Install Certbot snap - script: | - python -m tox -e integration-external,apacheconftest-external-with-pebble + venv/bin/python -m tox -e integration-external,apacheconftest-external-with-pebble displayName: Run tox - job: snap_dns_run dependsOn: snaps_build @@ -171,6 +174,7 @@ jobs: displayName: Retrieve Certbot snaps - script: | python3 -m venv venv + venv/bin/python letsencrypt-auto-source/pieces/pipstrap.py venv/bin/python tools/pip_install.py -e certbot-ci displayName: Prepare Certbot-CI - script: | diff --git a/.azure-pipelines/templates/steps/tox-steps.yml b/.azure-pipelines/templates/steps/tox-steps.yml index 828552e43..ab619e613 100644 --- a/.azure-pipelines/templates/steps/tox-steps.yml +++ b/.azure-pipelines/templates/steps/tox-steps.yml @@ -30,6 +30,7 @@ steps: # set, pip updates dependencies it thinks are already satisfied to avoid some # problems with its lack of real dependency resolution. - bash: | + python letsencrypt-auto-source/pieces/pipstrap.py python tools/pip_install.py -I tox virtualenv displayName: Install runtime dependencies - task: DownloadSecureFile@1 diff --git a/tox.ini b/tox.ini index 0336a57df..e7856e79d 100644 --- a/tox.ini +++ b/tox.ini @@ -7,12 +7,11 @@ skipsdist = true envlist = modification,py3-cover,lint,mypy [base] -# pip installs the requested packages in editable mode -pip_install = python {toxinidir}/tools/pip_install_editable.py # pip installs the requested packages in editable mode and runs unit tests on # them. Each package is installed and tested in the order they are provided # before the script moves on to the next package. All dependencies are pinned # to a specific version for increased stability for developers. +pip_install = python {toxinidir}/tools/pip_install_editable.py install_and_test = python {toxinidir}/tools/install_and_test.py dns_packages = certbot-dns-cloudflare \ @@ -62,6 +61,7 @@ source_paths = [testenv] passenv = CERTBOT_NO_PIN +commands_pre = python {toxinidir}/letsencrypt-auto-source/pieces/pipstrap.py commands = !cover: {[base]install_and_test} {[base]all_packages} !cover: python tests/lock_test.py