mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
Continued improvements
* Remove legacy Store upload credentials These have not been needed since 5d7969a. * Work around dev part dependency failure case Get pip to install certbot from its VCS repository directly during the build of the nginx and apache plugin parts. This works around issue #12 when it affects the interaction between the apache or nginx plugin and certbot itself. It does not work around the case where the same problem occurs in the interaction between certbot and acme. This looks harder to work around because pip's VCS URL handling doesn't appear to include a facility to install from a subdirectory of a git repository and this is where the acme source is located. * Switch to using lxd for the snapcraft run The Docker image is 16.04 only. Before we can switch to 18.04, we need to remove Docker, which means using the snapcraft snap using Travis' new snap support, and then using the lxd functionality in snapcraft so that it is enabled to build in the appropriate environment. * Switch build to use core 18 Fixes: #14 * Move constraints into a list This seems to be a requirement either either newer snapcraft, snapcraft in lxd or in the move to core18 (it isn't clear to me which). This fixes the error: Failed to load plugin: properties failed to load for certbot: The 'constraints' property does not match the required schema: '$SNAPCRAFT_PART_SRC/constraints.txt' is not of type 'array' * version-script -> snapcraftctl set-version The use of version-script seems to break with either newer snapcraft, snapcraft with lxd or core18 (it's not clear to me which). The breakage is related to "parts/certbot/src" not being found. This can be fixed with $SNAPCRAFT_PART_SRC, but this doesn't seem to be defined at "version-script time". However https://snapcraft.io/docs/deprecation-notices/dn10 deprecates the use of version-script, and if we convert to the recommended new way, then we use override-pull instead and $SNAPCRAFT_PART_SRC is defined there, so this conveniently fixes both problems at once. * Do not explicitly install snapd Since this is now handled by the Travis addon, we do not need to do it explicitly.
This commit is contained in:
parent
2c622944dd
commit
b69f5588f4
3 changed files with 23 additions and 8 deletions
Binary file not shown.
|
|
@ -1,12 +1,15 @@
|
|||
language: python
|
||||
before_install:
|
||||
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends install nginx-light snapd python3-venv
|
||||
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends install nginx-light python3-venv
|
||||
- sudo -E /etc/init.d/nginx stop
|
||||
install:
|
||||
- sudo /snap/bin/lxd.migrate -yes
|
||||
- sudo /snap/bin/lxd waitready
|
||||
- sudo /snap/bin/lxd init --auto
|
||||
- git clone https://github.com/certbot/certbot.git certbot --branch master
|
||||
- certbot/tools/strip_hashes.py certbot/letsencrypt-auto-source/pieces/dependency-requirements.txt > certbot/constraints.txt
|
||||
before_script:
|
||||
- docker run -v $(pwd):$(pwd) -t snapcore/snapcraft sh -c "apt-get update -qq && apt-get install -qq git && cd $(pwd) && snapcraft"
|
||||
- sudo snapcraft --use-lxd
|
||||
script:
|
||||
- sudo snap install --dangerous --classic *.snap
|
||||
- sudo bash test.sh
|
||||
|
|
@ -21,3 +24,10 @@ notifications:
|
|||
email:
|
||||
recipients: [robie.basak@canonical.com]
|
||||
on_failure: change
|
||||
addons:
|
||||
snaps:
|
||||
- name: snapcraft
|
||||
channel: stable
|
||||
classic: true
|
||||
- name: lxd
|
||||
channel: stable
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
name: certbot
|
||||
version: script
|
||||
version-script: cd parts/certbot/src && git describe|sed s/^v//
|
||||
summary: Automatically configure HTTPS using Let's Encrypt
|
||||
description: |
|
||||
The objective of Certbot, Let's Encrypt, and the ACME (Automated
|
||||
|
|
@ -17,6 +15,8 @@ description: |
|
|||
- Help you revoke the certificate if that ever becomes necessary.
|
||||
confinement: classic
|
||||
grade: devel
|
||||
base: core18
|
||||
adopt-info: certbot
|
||||
|
||||
apps:
|
||||
certbot:
|
||||
|
|
@ -47,26 +47,31 @@ parts:
|
|||
plugin: python
|
||||
source: certbot
|
||||
source-subdir: acme
|
||||
constraints: $SNAPCRAFT_PART_SRC/constraints.txt
|
||||
constraints: [$SNAPCRAFT_PART_SRC/constraints.txt]
|
||||
python-version: python3
|
||||
certbot:
|
||||
plugin: python
|
||||
source: certbot
|
||||
constraints: $SNAPCRAFT_PART_SRC/constraints.txt
|
||||
constraints: [$SNAPCRAFT_PART_SRC/constraints.txt]
|
||||
python-version: python3
|
||||
after: [acme]
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
snapcraftctl set-version `cd $SNAPCRAFT_PART_SRC && git describe|sed s/^v//`
|
||||
certbot-apache:
|
||||
plugin: python
|
||||
source: certbot
|
||||
source-subdir: certbot-apache
|
||||
constraints: $SNAPCRAFT_PART_SRC/constraints.txt
|
||||
constraints: [$SNAPCRAFT_PART_SRC/constraints.txt]
|
||||
python-version: python3
|
||||
after: [python-augeas, certbot]
|
||||
stage-packages: [libaugeas0]
|
||||
python-packages: ['git+https://github.com/certbot/certbot.git'] # workaround for #12
|
||||
certbot-nginx:
|
||||
plugin: python
|
||||
source: certbot
|
||||
source-subdir: certbot-nginx
|
||||
constraints: $SNAPCRAFT_PART_SRC/constraints.txt
|
||||
constraints: [$SNAPCRAFT_PART_SRC/constraints.txt]
|
||||
python-version: python3
|
||||
after: [certbot]
|
||||
python-packages: ['git+https://github.com/certbot/certbot.git'] # workaround for #12
|
||||
|
|
|
|||
Loading…
Reference in a new issue