Commit graph

290 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
6b7dd05126 Merge branch 'master' into snap-remotebuild 2020-07-21 01:02:41 +02:00
Brad Warren
ebf1349b15
Update to IPython with Python 3.8 support. (#8152) 2020-07-17 13:01:04 -07: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
Adrien Ferrand
183ccc64b1
Some improvements (#8132)
Short PR to improve some things during snap builds:
* cleanup snapcraft assets before a build, in order to avoid some weird errors when two builds are executed consecutively without cleanup
* use python3 explicitly in `tools/simple_http_server.py` because on several recent distributions, `python` binary is not exposed anymore, only `python2` or `python3`.
2020-07-06 16:04:59 -07:00
Adrien Ferrand
8a3a8c7097
Migrate the CI pipeline from Travis to Azure Pipeline (#8098)
Fixes #8071 and fixes https://github.com/certbot/certbot/issues/8110.

This PR migrates every job from Travis in Azure Pipeline.

This PR essentially converts the Travis jobs into Azure Pipeline with a complete iso-fonctionality (or I made a mistake). The jobs are added in the relevant existing pipelines (`main`, `nightly`, `advanced-test`, `release`). A global refactoring thanks to the templating system is done to reduce greatly the verbosity of the pipeline descriptions.

A specific feature (not present in Travis) is added: the stage `On_Failure`. Using directly the Mattermost API, it allows to notify pipeline failure in a Mattermost channel with a link to the failed pipelines without the need to authenticate to Microsoft.

See https://github.com/certbot/certbot/pull/8098#issuecomment-649873641 for the post merge actions to do at the end of this work.
2020-07-02 15:01:21 -07:00
ohemorange
bce14ae65f
Make DNS plugin snaps use core20 (#8106)
Fixes #8103.

* Update the DNS plugin generator script to core20 syntax

* Generate new snapcraft.yamls for the DNS plugins

* Update certbot.wrapper to search for python3.8 paths
2020-06-23 09:31:08 -07:00
Adrien Ferrand
25d1977d4f
Add script and generated snapcraft.yaml files (#8096)
This PR adds a proper snapcraft.yaml file for each DNS plugin, and provides a shell script to generate them.
2020-06-22 17:07:08 -07:00
Brad Warren
1b2328f18b
Add comment about pyca's use of tools script (#8044) 2020-06-08 12:14:02 -07:00
ohemorange
2acc1dcc89
Fix TLS-ALPN tests with newer versions of OpenSSL (#8026)
Fixes #7988. As described there, the steps involved are:

1. Update our tests so they fail due to this problem.
2. Update the keys used in the tests so they pass with the new changes.

For 1, see a [failing travis run](https://travis-ci.com/github/certbot/certbot/jobs/340710511) with the included change. And for the full output to confirm that this is what is failing, see a [run on debian 10](https://github.com/certbot/certbot/files/4692350/debian_run_log.txt).

This PR adds `rsa4096_key.pem` and `rsa4096_cert.pem`, updates the `TLS-ALPN` test to use those keys in place of the 1024-bit versions, and fixes the README in that `testdata` folder with correct instructions to generate these files.

* export PIP_NO_BINARY in pip install subshell in test_sdists.sh

* set environment variable on the line that installs most packages

* Generate 4096-bit rsa key and cert, and fix README instructions to do so.

* Update TLS_ALPN test to use 4096-bit key instead of 1024-bit key.

* Update changelog

* Older versions of Python have an error when both VIRTUAL_NO_DOWNLOAD and PIP_NO_BINARY are set, so only apply the latter at the install phase.

* Add enum34 constraint manually, since rebuild_dependencies.py seems to be broken.

* only delete key if it exists

* Check OpenSSL version before trying to set PIP_NO_BINARY

* Add comment explaining why we only set PIP_NO_BINARY at the install step
2020-06-01 15:18:38 -07:00
Brad Warren
5b749ff8f7
Use Python 3 in the release script. (#7918)
Fixes #7902.
2020-04-20 14:44:53 -07:00
Karan Suthar
8e4dc0a48c
Minor bugfixes (#7891)
* Fix dangerous default argument

* Remove unused imports

* Remove unnecessary comprehension

* Use literal syntax to create data structure

* Use literal syntax instead of function calls to create data structure

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2020-04-13 10:41:39 -07:00
m0namon
1285297b23
[Apache v2] Load apacheconfig tree and gate related tests (#7710)
* Load apacheconfig dependency, gate behind flag

* Bump apacheconfig dependency to latest version and install dev version of apache for coverage tests

* Move augeasnode_test tests to more generic parsernode_test

* Revert "Move augeasnode_test tests to more generic parsernode_test"

This reverts commit 6bb986ef78.

* Mock AugeasNode into DualNode's place, and run augeasnode tests exclusively on AugeasNode

* Don't calculate coverage for skeleton functions

* clean up helper function in augeasnode_test
2020-03-23 17:05:22 -07:00
Brad Warren
69aec55ead
Remove --no-site-packages outside of certbot-auto. (#7832) 2020-03-09 13:05:35 -07:00