mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
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
This commit is contained in:
committed by
Brad Warren
parent
e0b72d9a62
commit
2c622944dd
@@ -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
|
||||
|
||||
@@ -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()
|
||||
@@ -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]
|
||||
|
||||
11
snap/test.sh
11
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
|
||||
|
||||
Reference in New Issue
Block a user