diff --git a/snap/.snapcraft/travis_snapcraft.cfg b/snap/.snapcraft/travis_snapcraft.cfg deleted file mode 100644 index d54f41155..000000000 Binary files a/snap/.snapcraft/travis_snapcraft.cfg and /dev/null differ diff --git a/snap/.travis.yml b/snap/.travis.yml index 3c934b7bd..418407558 100644 --- a/snap/.travis.yml +++ b/snap/.travis.yml @@ -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 diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index b7bfab9ca..38d32ed0b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -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