Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/snap
diff options
context:
space:
mode:
authorAdrien Ferrand <adrien.ferrand@eff.org>2019-08-22 00:45:04 +0300
committerBrad Warren <bmw@eff.org>2020-04-22 02:36:49 +0300
commit2c622944ddaa8c4641df33bb2386839a8d74e9ef (patch)
tree460e50dea0e352cc45828e1e95bff0de478c8290 /snap
parente0b72d9a62db7260ff5114422f839dd80e40c5ae (diff)
Various optimizations part 2
* Revert logic of building against a tag * Fix schema, add nginx * Update snapcraft.yaml * Update snapcraft.yaml * Update snapcraft.yaml * Update test.sh * Update test.sh * Update test.sh * Update test.sh * Config tests * Add an apache test * Relaunch CI * Clean config * Install venv * Decompose steps * Update test.sh * Use virtual environment * Update python-augeas * Add fork python-augeas * Update .travis.yml * Exclusion rule * Try with after
Diffstat (limited to 'snap')
-rw-r--r--snap/.travis.yml23
-rw-r--r--snap/get_latest_version.py21
-rw-r--r--snap/snapcraft.yaml19
-rw-r--r--snap/test.sh11
4 files changed, 26 insertions, 48 deletions
diff --git a/snap/.travis.yml b/snap/.travis.yml
index 5e5b17037..3c934b7bd 100644
--- a/snap/.travis.yml
+++ b/snap/.travis.yml
@@ -1,24 +1,15 @@
-dist: xenial
-language: bash
+language: python
+before_install:
+ - sudo -E apt-get -yq --no-install-suggests --no-install-recommends install nginx-light snapd python3-venv
+ - sudo -E /etc/init.d/nginx stop
install:
- - EXPORT CERTBOT_VERSION=$(python3 get_latest_version.py)
- - git clone https://github.com/certbot/certbot.git certbot --branch ${CERTBOT_VERSION}
+ - 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"
script:
- - docker run -v $(pwd):$(pwd) -t -e CERTBOT_VERSION=${CERTBOT_VERSION} snapcore/snapcraft sh -c "apt-get update -qq && apt-get install -qq git && cd $(pwd) && snapcraft"
- sudo snap install --dangerous --classic *.snap
- sudo bash test.sh
-sudo: required
-addons:
- apt:
- packages:
- - snapd
- - nginx-light
- - python3-venv
- - python3-requests
- - python3-packaging
-services:
- - docker
deploy:
'on':
branch: master
diff --git a/snap/get_latest_version.py b/snap/get_latest_version.py
deleted file mode 100644
index b9a57e2aa..000000000
--- a/snap/get_latest_version.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env python3
-import sys
-
-import requests
-from packaging import version
-
-
-def main():
- result = requests.get('https://api.github.com/repos/certbot/certbot/tags')
- result.raise_for_status()
-
- tags = [version.parse(entry['name'].replace('v', '')) for entry in result.json()]
- tags.sort()
-
- latest_tag = 'v{0}'.format(tags[-1])
-
- sys.stdout.write(latest_tag)
-
-
-if __name__ == '__main__':
- main()
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 0a3772ad6..b7bfab9ca 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -2,7 +2,6 @@ name: certbot
version: script
version-script: cd parts/certbot/src && git describe|sed s/^v//
summary: Automatically configure HTTPS using Let's Encrypt
-base: core18
description: |
The objective of Certbot, Let's Encrypt, and the ACME (Automated
Certificate Management Environment) protocol is to make it possible
@@ -38,6 +37,12 @@ apps:
timer: 00:00~24:00/2
parts:
+ python-augeas:
+ plugin: python
+ source: git://github.com/basak/python-augeas
+ source-branch: snap
+ python-version: python3
+ build-packages: [libaugeas-dev]
acme:
plugin: python
source: certbot
@@ -49,8 +54,6 @@ parts:
source: certbot
constraints: $SNAPCRAFT_PART_SRC/constraints.txt
python-version: python3
- python-packages:
- - acme
after: [acme]
certbot-apache:
plugin: python
@@ -58,8 +61,12 @@ parts:
source-subdir: certbot-apache
constraints: $SNAPCRAFT_PART_SRC/constraints.txt
python-version: python3
- python-packages:
- - certbot
- build-packages: [libaugeas-dev]
+ after: [python-augeas, certbot]
stage-packages: [libaugeas0]
+ certbot-nginx:
+ plugin: python
+ source: certbot
+ source-subdir: certbot-nginx
+ constraints: $SNAPCRAFT_PART_SRC/constraints.txt
+ python-version: python3
after: [certbot]
diff --git a/snap/test.sh b/snap/test.sh
index cf2418448..e89743d47 100644
--- a/snap/test.sh
+++ b/snap/test.sh
@@ -1,10 +1,11 @@
#!/bin/bash
set -ex
-cd certbot
-
python3 -m venv venv
-. venv/bin/activate
-pip install -e certbot-ci
+venv/bin/python -m pip install -e certbot/certbot-ci
+venv/bin/python -m pytest certbot/certbot-ci/certbot_integration_tests -n 4
-pytest certbot-ci/certbot_integration_tests/certbot_tests --numprocesses 4 --acme-server=pebble
+# DO NOT RUN `apache-conf-test` LOCALLY, IT WILL BREAK YOUR APACHE CONFIGURATION!
+if [ -n "$TRAVIS" ]; then
+ venv/bin/python certbot/certbot-apache/certbot_apache/tests/apache-conf-files/apache-conf-test-pebble.py --debian-modules
+fi