mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 16:19:13 +02:00
v1.9.0
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9ee4831f78 |
Make externally snapped plugin updates more stable (#8145)
Fixes #7863. Connect command is `sudo snap connect certbot-dns-dnsimple:certbot-metadata certbot:certbot-metadata` Logs are `cat /var/snap/certbot-dns-dnsimple/current/debuglog` Echos in hook are only printed to terminal when it exits 0; otherwise, check logs in `debuglog` mentioned above. Manual tests include all iterations of connected, unconnected, installed for the first, second time, etc, with passing and failing version checks. * Make dnsimple not update if certbot is too old * create an interface to read cb version * add missing newline * fix syntax * trying to figure out the consumer syntax * trying to figure out the consumer syntax, again * only check post first install * valid setting name * test for first install differently * snapctl doesn't error if it fails I guess * time to do some print debugging * continue playing with syntax * once again, fooled by bash int vs string comparisons! * debugging * if we use post and pre together we can do this * is this how content interface syntax works * it's a directory? * more debug * what's that error message again? * try other syntax * if it's not documented just guess at syntax * actually, I think this is the syntax * oops didn't set for new hook * test passing information along connection * interface attributes can only be set during the execution of prepare hooks * just do it with main connection * undo last few test changes * Add some printing to make sure we understand what's going on * create empty directory to bind to * put mkdir in the correct part * let's inspect the environment * it can't run bash directly. * perhaps only directories can be shared via the contente interface * update name of folder * echo to debug log to understand what's going on exactly. we have file access though! * update grep for new file * more printing * echo to the debug log * ok NOW all print statements are going to the log * why does echo need two >s * remove unnecessary extra check, just check if the init file is available * check if certbot version will be available post-refresh after all * pre-refresh hook is not necessary to get certbot version * update mkdir so we don't have to clean each time * try comparing version numbers in python * it's python3 * we need different prints for if we succeed or if we fail. * improve bash syntax * remove some debugging code * Remove debug script * remove spaces for clarity * consolidate parts and remove more test code * s/certbot-version/certbot-metadata/g * use sys.exit instead of exit * find and save certbot version on the certbot side * change presence test to new file * switch to using packaging.version.parse instead of LooseVersion * switch to requiring certbot version >= plugin version * add plugin snap changes to generate script * Add comment to generation file saying not to edit generated files manually * Create post-refresh hook for all plugins with script * generate files using new script * update snapcraft.yaml files for plugins * bin/sh comes first * Add packaging to install_requires * Check that refresh is allowed in integration test * switch plug and slot names in integration test * Update tools/generate_dnsplugins_postrefreshhook.sh Co-authored-by: Brad Warren <bmw@users.noreply.github.com> * small bash fixes * Update snap readme with new instructions * Run tools/generate_dnsplugins_postrefreshhook.sh * Update tools/snap/generate_dnsplugins_postrefreshhook.sh Co-authored-by: Brad Warren <bmw@users.noreply.github.com> Co-authored-by: Brad Warren <bmw@users.noreply.github.com> |
||
|
|
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> |