Commit graph

90 commits

Author SHA1 Message Date
Brad Warren
a9edc0ae64 Merge branch 'master' into buildkit 2023-04-07 08:18:07 -07:00
humanoid2050
537ef57b0a removed subshell invocation of arch parsing method 2023-04-06 18:59:56 -04:00
humanoid2050
9b20628cde
Update tools/docker/lib/common
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-04-06 18:35:07 -04:00
humanoid2050
4582b7f726
Update tools/docker/lib/common
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-04-06 18:33:37 -04:00
humanoid2050
6f611a5869
Update tools/docker/lib/common
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-04-06 18:33:15 -04:00
Brad Warren
a78073812c
Always "pipstrap" when running pip_install.py (#9658)
Fixes https://github.com/certbot/certbot/issues/7921.

In all cases when we run `pip_install.py`, we first run `pipstrap.py`. This PR combines these two steps for convenience and to make always doing that less error prone. This will also help me with some of the `tox.ini` refactoring I'm planning to do.

I ran the full test suite on everything and tested the release script changes locally.

This change shouldn't have any effect on cryptography's setup because they install `certbot[test]` which depends on pip, setuptools, and wheel.

* always pipstrap

* use pip_install.py during releases
2023-04-05 16:43:26 -07:00
humanoid2050
960e678fcf improved quoting in shell scripts 2023-04-05 18:31:33 -04:00
humanoid2050
f01bc93f2c
Update tools/docker/lib/common
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-04-05 18:22:53 -04:00
humanoid2050
ec7851ca97 remove duplicate calls to multiarch install 2023-04-04 19:04:38 -04:00
humanoid2050
9de082a5f6 removed unnecessary testing script and fixed function name 2023-04-03 21:01:44 -04:00
humanoid2050
4d7ed3f692 refactor docker script arg parsing and fix merge bugs 2023-03-31 15:29:22 -04:00
humanoid2050
a8c85ab0f8
Update tools/docker/deploy_manifests.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-03-30 18:58:51 -04:00
humanoid2050
954eb02e2e
Update tools/docker/deploy_images.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-03-30 18:58:40 -04:00
humanoid2050
e43b4db3bc
Update tools/docker/lib/common
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-03-30 18:53:22 -04:00
humanoid2050
c0e33b9dfa
Update tools/docker/build.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-03-29 20:12:00 -04:00
humanoid2050
684f78c86c
Update tools/docker/build.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-03-29 20:09:42 -04:00
humanoid2050
11d765ba4b
Update tools/docker/test.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-03-29 19:51:42 -04:00
humanoid2050
c7adb00c9a
Update tools/docker/deploy_images.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-03-29 19:34:20 -04:00
humanoid2050
cebe25e26f
Update tools/docker/build.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-03-29 19:30:30 -04:00
humanoid2050
378926feac
Update tools/docker/build.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-03-29 19:30:06 -04:00
humanoid2050
811e51dde8
Update tools/docker/README.md
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-03-29 19:28:30 -04:00
humanoid2050
678b9b485d revert buildx bake to bash for-loops 2023-03-25 15:03:08 -04:00
humanoid2050
adf227fc48 purge cache for build predictability 2023-03-19 15:21:51 -04:00
humanoid2050
c10192b6d8 leverage docker buildkit bake to speed up build times 2023-03-18 23:25:12 -04:00
humanoid2050
accee97476 bugfixes 2023-03-06 18:39:25 -05:00
humanoid2050
d78cde1894 Fix docker cache patterns 2023-03-06 17:28:10 -05:00
humanoid2050
e5f13f8ab0 testing and debuggin 2023-03-05 10:56:14 -05:00
humanoid2050
971ed2542a Move to multistage Dockerfile 2023-03-04 11:15:54 -05:00
humanoid2050
644328170c Remove qemu and switch to build via buildkit 2023-03-04 11:14:55 -05:00
humanoid2050
a42cffc351
generate multiarch images for non-architecture tags (#9586)
* generate multiarch images for non-architecture tags

* lock docker build to legacy docker buider, and bugfix

* rename deploy.sh to deploy_by_arch.sh

* Update documentation related to multiarch Docker

* Consistent IFS value with respect to other scripts

Co-authored-by: humanoid2050 <humanoid2050@monolith>
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-02-22 17:53:45 -08:00
humanoid2050
ac573e758e formatting fixes 2023-02-21 21:27:45 -05:00
humanoid2050
55f67ba74a
Consistent IFS value with respect to other scripts
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-02-21 21:26:20 -05:00
humanoid2050
cd4f7fcccd Update documentation related to multiarch Docker 2023-02-18 13:36:15 -05:00
humanoid2050
02d4911e6e rename deploy.sh to deploy_by_arch.sh 2023-02-18 13:22:14 -05:00
humanoid2050
c17bb3c032 lock docker build to legacy docker buider, and bugfix 2023-02-18 11:28:59 -05:00
humanoid2050
97ad18eddd
Apply suggestions from code review
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2023-02-18 11:24:35 -05:00
humanoid2050
43e89aee00 generate multiarch images for non-architecture tags 2023-02-13 21:09:18 -05:00
Brad Warren
09af133af3
Add 2.0 release logic (#9467)
This PR:

* Deletes the 2.0 pre-release pipeline
* Causes 1.x releases to be released to Docker Hub without updating the latest tag, PyPI, and the candidate and stable channels of the snap store
* Causes 2.x releases to be released to Docker Hub, PyPI, the beta channel of the snap store, and our Windows installer
We could potentially look into how to continue to do 1.x Windows installer releases through GitHub releases and tech ops tooling, but I personally don't think it's worth it right now.

This PR DOES NOT do anything about progressive snap releases. I think we can revisit this when/if we decide (how) to do them.
2022-11-16 15:29:53 -08:00
Alex Zorin
1773edcad0 Merge remote-tracking branch 'origin/master' into 2.0.x 2022-11-11 17:25:42 +11:00
Will Greenberg
7865bbd39a
Add comment explainig the load-bearing debug flags (#9443) 2022-10-27 14:47:29 +11:00
Alex Zorin
4fcc0f7c2a Merge branch 'master' into 2.0-merge-master 2022-10-05 05:15:39 +11:00
Brad Warren
758cfb9f79
upgrade base docker image (#9415) 2022-09-26 20:36:08 +10:00
alexzorin
2574a8dfb5
remove all cloudxns-related code (#9361) 2022-08-10 11:01:11 -07:00
Will Greenberg
3b6f3450c2
Add --debug to docker push (#9286)
This'll (hopefully) help us debug the connectivity issues during
the deploy CI
2022-04-22 08:07:59 -07:00
Brad Warren
b95deaa7e4
Use the git CLI with cargo (#9223)
Hopefully this makes things more stable. This is based on Alex's suggestion [here](https://opensource.eff.org/eff-open-source/pl/ouf996zuxjnkdxwq81bihxak7e). 

* git cli in docker

* git cli in snap

* git cli in dns snaps

* use true strings
2022-03-02 12:10:01 -08:00
alexzorin
c48adc5753
docker: delete CARGO_HOME (#8839) 2021-05-11 01:03:35 +02:00
Brad Warren
74f6f734c8
remove outdated comment (#8736) 2021-03-25 08:00:47 +11:00
ohemorange
f90e93134c
Upgrade cryptography to 3.4.6 (#8730)
* Upgrade cryptography to 3.4.6

* Fix comment with instructions for how to use hashin

* run tools/rebuild_certbot_constraints.py

* add deps for building cryptography in snaps

* Update cryptography build dependencies for docker

* Update sources for test farm tests

* Remove rust if it's installed for test farm tests

* source bootstrap script and call sudo as needed
2021-03-24 10:29:12 -07:00
Adrien Ferrand
c3d6fca3eb
Make certbot constraint file independent from certbot-auto + update cryptography (#8649)
* Refactor to not depend on certbot-auto dependencies pinning anymore

* Update constraints

* Replaces references

* Upgrade AWS dependencies pinning

* Fix script

* Fix Windows installer builds

* Fixing sdists letstest script

* Pin cryptography on 3.1.1 specifically for RHEL/CentOS 7 to avoid build failures during test_sdists test.

* Finish fix

* Fix VERSION_ID in RHEL 7
2021-02-23 15:29:52 -08:00
Adrien Ferrand
d38766e05c
Enable again build isolation with proper pinning of build dependencies (#8443)
Fixes #8256

First let's sum up the problem to solve. We disabled the build isolation available in pip>=19 because it could potential break certbot build without a control on our side. Basically builds are not reproductible. Indeed the build isolation triggers build of PEP-517 enabled transitive dependencies (like `cryptography`) with the build dependencies defined in their `pyproject.toml`. For `cryptography` in particular these requirements include `setuptools>=40.6.0`, and quite logically pip will install the latest version of `setuptools` for the build. And when `setuptools` broke with the version 50, our build did the same.

But disabling the build isolation is not a long term solution, as more and more project will migrate on this approach and it basically provides a lot of benefit in how dependencies are built.

The ideal solution would be to be able to apply version constraints on our side on the build dependencies, in order to pin `setuptools` for instance, and decide precisely when we upgrade to a newer version. However for now pip does not provide a mechanism for that (like a `--build-constraint` flag or propagation of existing `--constraint` flag).

Until I saw https://github.com/pypa/pip/issues/9081 and https://github.com/pypa/pip/issues/8439.

Apart the fact that https://github.com/pypa/pip/issues/9081 shows that pip maintainers are working on this issue, it explains how pip works regarding PEP-517 and infers which workaround can be used to still pin the build dependencies. It turns out that pip invokes itself in each build isolation to install the build dependencies. It means that even if some flags (like `--constraint`) are not explicitly passed to the pip sub call, the global environment remains, in particular the environment variables.

Thus it is known that every pip flag can alternatively be set by environment variable using the following pattern for the variable name: `PIP_[FLAG_NAME_UPPERCASE]`. So for `--constraint`, it is `PIP_CONSTRAINT`. And so you can pass a constraint file to the pip sub call through that mechanism.

I made some tests with a constraint file containing pinning for `setuptools`: indeed under isolation zone, the constraint file has been honored and the provided pinned version has been used to build the dependencies (I tested it with `cryptography`).

Finally this PR takes advantage of this mechanism, by setting `PIP_CONSTRAINT` to `pip_install`, the snap building process, the Dockerfiles and the windows installer building process.

I also extracted out the requirements of the new `pipstrap.py` to be reusable in these various build processes.

* Use workaround to fix build requirements in build isolation, and renable build isolation

* Clean imports in pipstrap

* Externalize pipstrap reqs to be reusable

* Inject pipstrap constraints during pip_install

* Update docker build

* Update snapcraft build

* Prepare installer build

* Fix pipstrap constraints in snap build

* Add back --no-build-cache option in Docker images build

* Update snap/snapcraft.yaml

* Use proper flags with pip

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2020-12-16 10:49:31 -08:00