Commit graph

9850 commits

Author SHA1 Message Date
Adrien Ferrand
3d1c882e79 Split each dns snap build job 2020-07-08 23:24:40 +02:00
Adrien Ferrand
48b9733814 Merge branch 'master' into snap-dns-builds
# Conflicts:
#	.azure-pipelines/templates/stages/deploy-stage.yml
2020-07-08 22:53:56 +02:00
Adrien Ferrand
4443399459 Fixes 2020-07-08 22:47:33 +02:00
Adrien Ferrand
a0da6a5025 Integrate DNS snap tests into certbot-ci 2020-07-08 22:38:29 +02:00
Adrien Ferrand
dc145191d6 More accurate way to get the plugin snap name 2020-07-08 22:07:58 +02:00
Adrien Ferrand
3967ecf98b
Update .azure-pipelines/templates/stages/deploy-stage.yml
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2020-07-08 22:05:14 +02:00
Adrien Ferrand
12d835e238
Update .azure-pipelines/templates/jobs/packaging-jobs.yml
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2020-07-08 22:05:01 +02:00
Adrien Ferrand
16bd16bff9 Makes snap run tests depends also on the Certbot snap build 2020-07-08 22:04:39 +02:00
Adrien Ferrand
4d893d87ec Skip QEMU jobs only for test branches 2020-07-08 22:03:30 +02:00
Brad Warren
f82e2cc714
s/snapcraft push/snapcraft upload/g (#8137) 2020-07-08 08:05:33 +02:00
Brad Warren
433c6f391c
Merge pull request #8136 from certbot/candidate-1.6.0
Update files from 1.6.0 release
2020-07-07 11:45:39 -07:00
Brad Warren
590eeca38a Bump version to 1.7.0 2020-07-07 10:33:16 -07:00
Brad Warren
b9a25c3987 Add contents to certbot/CHANGELOG.md for next version 2020-07-07 10:33:15 -07:00
Brad Warren
41b99eba79
Release 1.6.0 2020-07-07 10:33:13 -07:00
Brad Warren
de39a42e6a Update changelog for 1.6.0 release 2020-07-07 10:13:21 -07:00
Adrien Ferrand
970d2aee48 Merge branch 'master' into snap-dns-builds
# Conflicts:
#	tools/snap/build.sh
2020-07-07 01:19:50 +02: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
Brad Warren
6bca930752
Remove unnecessary symlink (#8135)
This isn't needed anymore thanks to the line:
```
AWS_EC2_PEM_FILE: $(testFarmPem.secureFilePath)
```
2020-07-06 15:31:24 -07:00
Adrien Ferrand
7fa29c657c Apply normal config for pipelines 2020-07-06 23:38:37 +02:00
Adrien Ferrand
393f012f99 Preserve env 2020-07-06 23:09:22 +02:00
Adrien Ferrand
13bc45ec72 Add test job in Azure 2020-07-06 22:59:07 +02:00
Adrien Ferrand
e2daada6b7 Add a test 2020-07-06 22:42:51 +02:00
Brad Warren
cd993cdfb1
Remove grade devel from Certbot snap. (#8128)
If you go to a URL like https://snapcraft.io/certbot/releases and try to move the Certbot snap into the candidate or stable channels, you cannot do so. There is a tooltip which says that revisions with the grade devel cannot be promoted to candidate or stable channels.

The documentation for `grade` can be found at https://snapcraft.io/docs/snapcraft-yaml-reference where it says the value is optional and

> Defines the quality grade of the snap.
Type: enum
Can be either devel (i.e. a development version of the snap, so not to be published to the stable or candidate channels) or stable (i.e. a stable release or release candidate, which can be released to all channels)
Example: [stable or devel]

I'm working on a proposal for our next steps for snaps which involves moving the Certbot snap to the stable channel. I of course won't make those changes without giving others a chance to share their opinion, but I'd like to avoid the situation where we're technically unable to move the Certbot 1.6.0 snap to the stable channel despite wanting to do so.

I started to make the same changes to the DNS plugins, but I personally think it's too soon to propose stable versions of those yet and `grade` is a simple way to ensure we don't accidentally promote something there.

You can see the snap being built and run successfully with this change at https://dev.azure.com/certbot/certbot/_build/results?buildId=2246&view=results.
2020-07-06 12:31:55 -07:00
Brad Warren
9f994d7a50
Run at 4:30 UTC to have Azure reparse YAML file. (#8133) 2020-07-06 20:41:26 +02:00
Adrien Ferrand
750cf43ff0 Clean before build 2020-07-05 21:36:31 +02:00
Adrien Ferrand
288c61b9c8 Use python3 2020-07-05 21:29:02 +02:00
Adrien Ferrand
ada9339c57 Loop for publication 2020-07-03 15:53:51 +02:00
Adrien Ferrand
d4bc6404a8 Set final suspend value 2020-07-03 15:08:17 +02:00
Adrien Ferrand
d51b3cac79 Set final suspend logic 2020-07-03 15:02:34 +02:00
Adrien Ferrand
f74e6b8d32 Prepare conditional suspend 2020-07-03 15:00:21 +02:00
Adrien Ferrand
2d3219838b Add extra index 2020-07-03 13:56:58 +02:00
Adrien Ferrand
4935eb8f91 Trigger all architectures 2020-07-03 13:50:44 +02:00
Adrien Ferrand
1e30720778 Focus on packaging 2020-07-03 13:42:08 +02:00
Adrien Ferrand
c8d52267cb Configure a script to build DNS snaps 2020-07-03 13:41:43 +02:00
Brad Warren
4f3dc8862d
Switch build status to nightly pipeline. (#8127)
The advanced pipeline no longer exists.
2020-07-02 16:05:28 -07:00
Brad Warren
48139f382d
Do not build pushes to master. (#8126) 2020-07-03 01:00:35 +02: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
cb3ff9ef18
Set up CentOS 8 test farm tests (#8122)
Fixes #7420.

* Set up CentOS 8 test farm tests

* Don't add to apache2_targets until 7273 is resolved

* Start upgrade test from a version that works on centos 8

* remove when possible from targets
2020-07-01 17:07:41 -07:00
alexzorin
f743dbec3a
certbot: add --preferred-chain (#8080)
* acme: add support for alternative cert. chains

* certbot: add --preferred-chain

* remove support for issuer SKI matching

* show --preferred-chain in "run" help

* warn if no chain matched and it's not a dry-run

* fix existing failing tests

* add unit, integration tests

* bump acme dependency to dev version

* simplify test to avoid py2.7 recursion bug

* add preferred_chain to STR_CONFIG_ITEMS

* reduce preferred_chain warning to info level

* acme: fix some docstrings in .messages

* certbot: fix docstring in crypto_util

* try to fix certbot-nginx acme dep problem
2020-06-30 17:45:39 -07:00
ohemorange
2af297d72f
Make each DNS plugin respect EXCLUDE_CERTBOT_DEPS (#8117)
* Don't include certbot deps when EXCLUDE_CERTBOT_DEPS is set

* import os
2020-06-29 16:58:26 -07:00
Brad Warren
95ef53e5d5
Add missing spaces to manual plugin help. (#8116) 2020-06-29 13:34:24 -07:00
Brad Warren
24c5fab8b6
Add awscli to requirements.txt (#8113) 2020-06-25 16:52:56 -07:00
ohemorange
713b91495b
Fix paths when calling out to programs outside of snap (#8108)
Fixes #8093.

This PR modifies and audits all uses of `subprocess` and `Popen` outside of tests, `certbot-ci/`, `certbot-compatibility-test/`, `letsencrypt-auto-source/`, `tools/`, and `windows-installer/`. Calls to outside programs have their `env` modified to remove the `SNAP` components of paths, if they exist. This includes any calls made from hooks, calls to `apachectl` and `nginx`, and to `openssl` from `ocsp.py`.

For testing manually, rsync flags will look something like:

```
rsync -avzhe ssh root@focal.domain:/home/certbot/certbot/certbot_*_amd64.snap .
rsync -avzhe ssh certbot_*_amd64.snap root@centos7.domain:/root/certbot/
```

With these modifications, `certbot plugins --prepare` now passes on Centos 7.

If I'm wrong and we package the `openssl` binary, the modifications should be removed from `ocsp.py`, and `env` should be passed into `run_script` rather than set internally in its calls from nginx and apache.

One caveat with this approach is the disconnect between why it's a problem (packaging) and where it's solved (internal to Certbot). I considered a wrapping approach, but we'd still have to audit specific calls. I think the best way to address this is robust testing; specifically, running the snap on other systems.

For hooks, all calls will remove the snap paths if they exist. This is probably fine, because even if the hook intends to call back into certbot, it can do that, it'll just create a new snap.

I'm not sure if we need these modifications for the Mac OS X/ Darwin calls, but they can't hurt.

* Add method to plugins util to get env without snap paths

* Use modified environment in Nginx plugin

* Pass through env to certbot.util.run_script

* Use modified environment in Apache plugin

* move env_no_snap_for_external_calls to certbot.util

* Set env internally to run_script, since we use that only to call out

* Add env to mac subprocess calls in certbot.util

* Add env to openssl call in ocsp.py

* Add env for hooks calls in certbot.compat.misc.

* Pass env into execute_command to avoid circular dependency

* Update hook test to assert called with env

* Fix mypy type hint to account for new param

* Change signature to include Optional

* go back to using CERTBOT_PLUGIN_PATH

* no need to modify PYTHONPATH in env

* robustly detect when we're in a snap

* Improve env util fxn docstring

* Update changelog

* Add unit tests for env_no_snap_for_external_calls

* Import compat.os
2020-06-25 15:36:29 -07:00
dmmortimer
0f4c31c9c7
Generalize renewal rate limit UI warning message (#3456) (#8061)
- Old text hard codes the rate limit
 - Let's Encrypt CA might change its rate limit
 - Other CAs might have different rate limits

Update CHANGELOG.md
2020-06-25 11:43:08 -07:00
dkp
b9a8248541
Remove SSL Labs From Certbot Output (#8109)
The Apache plugin expects clients to support SNI, but
SSL Labs tries without SNI and includes the results
in their score.

Closes certbot/certbot#7728
2020-06-25 11:42:07 -07:00
Brad Warren
8027430625
Correct plugin constraints. (#8104) 2020-06-23 14:16:41 -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
46eb4ec7e3
Remove unneeded step to create constraints file. (#8102) 2020-06-22 16:48:50 -07:00
Brad Warren
3ae8fa640b
Remove snap-plugin from README (#8101) 2020-06-22 15:49:18 -07:00