Commit graph

38 commits

Author SHA1 Message Date
Adrien Ferrand
6ea9fa2825 Few optimizations 2020-07-22 23:07:02 +02:00
Adrien Ferrand
32f6baec9e Retry on build failures 2020-07-22 17:04:58 +02:00
Adrien Ferrand
3b05fb17a5 Better loop to extract lines 2020-07-22 17:04:58 +02:00
Adrien Ferrand
6091bac71b Troubleshoot 2020-07-22 17:04:57 +02:00
Adrien Ferrand
b799cffa84 Consistent use of single/double quotes 2020-07-21 23:07:57 +02:00
Adrien Ferrand
5ba77dda4d Start log 2020-07-21 23:03:10 +02:00
Adrien Ferrand
904f7dafdf Use f-string and format expressions 2020-07-21 22:57:26 +02:00
Adrien Ferrand
6652e43798 Check snapcraft execution interruption with exit codes 2020-07-21 22:11:46 +02:00
Adrien Ferrand
2d0c776747 Some nice refactorings 2020-07-21 21:56:58 +02:00
Adrien Ferrand
08e1ef6d13 Use Pool as a context manager 2020-07-21 21:43:55 +02:00
Adrien Ferrand
432a32cecb Use Manager() as a context manager 2020-07-21 21:40:58 +02:00
Adrien Ferrand
a8506f623a Lint 2020-07-17 21:41:13 +02:00
Adrien Ferrand
89d5eb6492 Update snapcraft.yaml 2020-07-17 21:40:52 +02:00
Adrien Ferrand
81472e8db2 Exit properly 2020-07-17 21:37:35 +02:00
Adrien Ferrand
913e9ae49e Allow retries if the remote build does not start 2020-07-17 20:41:05 +02:00
Adrien Ferrand
0fd6bc48c5 Dynamic display, take the maximum timeout for snap build job 2020-07-17 20:35:20 +02:00
Adrien Ferrand
e7d72bf855 Use explicit status 2020-07-17 16:28:35 +02:00
Adrien Ferrand
86c986194b Updates 2020-07-17 14:58:31 +02:00
Adrien Ferrand
fbf3afe3e3 Print 2020-07-17 14:34:22 +02:00
Adrien Ferrand
a9cc75cb1a Simplify 2020-07-17 14:28:31 +02:00
Adrien Ferrand
1c353b6084 Protect 2020-07-17 14:21:59 +02:00
Adrien Ferrand
1d36f53bd3 Nice UI 2020-07-17 14:14:35 +02:00
Adrien Ferrand
877632326d Add executable permissions 2020-07-17 13:02:48 +02:00
Adrien Ferrand
269d81fd93 Check existence 2020-07-10 14:32:59 +02:00
Adrien Ferrand
a514470066 Fix call 2020-07-10 13:57:29 +02:00
Adrien Ferrand
4b15773607 Exit code 2020-07-10 13:51:21 +02:00
Adrien Ferrand
6b7147d007 Generate constraints 2020-07-10 13:48:57 +02:00
Adrien Ferrand
3ec8c8e28a Handle the fact that snap builds may be taken from cache 2020-07-10 12:47:29 +02:00
Adrien Ferrand
7a6f935928 Reorganize the pipeline 2020-07-10 12:10:17 +02:00
Adrien Ferrand
2ad65b03c6 Fix script 2020-07-10 12:03:27 +02:00
Adrien Ferrand
8c4cb569ca Corrections 2020-07-10 10:30:19 +02:00
Adrien Ferrand
d3a052b9c1 Convert to a python logic 2020-07-10 10:28:29 +02:00
Adrien Ferrand
b20cce03aa Add dev dependencies to build cffi and cryptography 2020-07-10 01:04:06 +02:00
Adrien Ferrand
1957bcf5f9 Launch all builds in parallel 2020-07-10 00:53:06 +02:00
Adrien Ferrand
410c0cd1b4 Fixes 2020-07-09 22:53:47 +02:00
Adrien Ferrand
ca4df60ce9 Setup pipeline to use remote builds 2020-07-09 22:48:35 +02:00
Adrien Ferrand
ed7915c1dd Define scripts 2020-07-09 22:29:05 +02:00
Adrien Ferrand
d434b92945
Build the DNS plugins snaps (#8129)
Fixes #8041

This PR makes Azure Pipeline build the DNS plugins snaps for the 3 architectures during the CI.

It leverages the existing logic for building the Certbot snap in order to deploy a QEMU environment with Docker, and leverages the local PyPI index to speed up the build when installing `cffi` and `cryptography`.

All DNS plugins snaps are constructed in one unique docker container, in order to save the time required to install the system dependencies upon first start of `snapcraft`, and so speed up significantly the build.

Finally, all `amd64` DNS plugins snaps are built within 6 minutes. For `arm64` and `armhf`, it is around 40 mins: this is quite fast in fact, considering that 14 DNS plugins snaps are built.

However, this is still an extremely heavy task to make the full 3 architectures builds, even for Azure Pipelines and its 10 parallel jobs capability. That is why I make the `arm64` and `armhf` builds be skipped for the `full-test-suite`, and let them run only for `nightly` and `release`. This means however that these builds will not be done for the release branches. If this is a problem, I can put a more elaborate suspend condition to triggers the builds in this case.

All snaps are stored in the pipeline artifacts storage, making them available for publication during a `release` pipeline.

The PR is set as Draft for now, because I use temporarily `pr_test-suite` to validate the packaging jobs when commits are pushed. Once the PR is ready, I will revert it back to the normal configuration (run the standard tests).

* Configure a script to build DNS snaps

* Focus on packaging

* Trigger all architectures

* Add extra index

* Prepare conditional suspend

* Set final suspend logic

* Set final suspend value

* Loop for publication

* Use python3

* Clean before build

* Add a test

* Add test job in Azure

* Preserve env

* Apply normal config for pipelines

* Skip QEMU jobs only for test branches

* Makes snap run tests depends also on the Certbot snap build

* Update .azure-pipelines/templates/jobs/packaging-jobs.yml

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>

* Update .azure-pipelines/templates/stages/deploy-stage.yml

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>

* More accurate way to get the plugin snap name

* Integrate DNS snap tests into certbot-ci

* Fixes

* Update certbot-ci/snap_integration_tests/conftest.py

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>

* Update certbot-ci/snap_integration_tests/conftest.py

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>

* Clean an _init_.py file

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2020-07-09 11:33:25 -07:00