mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 08:08:00 +02: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
+7
-16
@@ -1,24 +1,15 @@
|
|||||||
dist: xenial
|
language: python
|
||||||
language: bash
|
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:
|
install:
|
||||||
- EXPORT CERTBOT_VERSION=$(python3 get_latest_version.py)
|
- git clone https://github.com/certbot/certbot.git certbot --branch master
|
||||||
- git clone https://github.com/certbot/certbot.git certbot --branch ${CERTBOT_VERSION}
|
|
||||||
- certbot/tools/strip_hashes.py certbot/letsencrypt-auto-source/pieces/dependency-requirements.txt > certbot/constraints.txt
|
- 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:
|
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 snap install --dangerous --classic *.snap
|
||||||
- sudo bash test.sh
|
- sudo bash test.sh
|
||||||
sudo: required
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- snapd
|
|
||||||
- nginx-light
|
|
||||||
- python3-venv
|
|
||||||
- python3-requests
|
|
||||||
- python3-packaging
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
deploy:
|
deploy:
|
||||||
'on':
|
'on':
|
||||||
branch: master
|
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()
|
|
||||||
+13
-6
@@ -2,7 +2,6 @@ name: certbot
|
|||||||
version: script
|
version: script
|
||||||
version-script: cd parts/certbot/src && git describe|sed s/^v//
|
version-script: cd parts/certbot/src && git describe|sed s/^v//
|
||||||
summary: Automatically configure HTTPS using Let's Encrypt
|
summary: Automatically configure HTTPS using Let's Encrypt
|
||||||
base: core18
|
|
||||||
description: |
|
description: |
|
||||||
The objective of Certbot, Let's Encrypt, and the ACME (Automated
|
The objective of Certbot, Let's Encrypt, and the ACME (Automated
|
||||||
Certificate Management Environment) protocol is to make it possible
|
Certificate Management Environment) protocol is to make it possible
|
||||||
@@ -38,6 +37,12 @@ apps:
|
|||||||
timer: 00:00~24:00/2
|
timer: 00:00~24:00/2
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
|
python-augeas:
|
||||||
|
plugin: python
|
||||||
|
source: git://github.com/basak/python-augeas
|
||||||
|
source-branch: snap
|
||||||
|
python-version: python3
|
||||||
|
build-packages: [libaugeas-dev]
|
||||||
acme:
|
acme:
|
||||||
plugin: python
|
plugin: python
|
||||||
source: certbot
|
source: certbot
|
||||||
@@ -49,8 +54,6 @@ parts:
|
|||||||
source: certbot
|
source: certbot
|
||||||
constraints: $SNAPCRAFT_PART_SRC/constraints.txt
|
constraints: $SNAPCRAFT_PART_SRC/constraints.txt
|
||||||
python-version: python3
|
python-version: python3
|
||||||
python-packages:
|
|
||||||
- acme
|
|
||||||
after: [acme]
|
after: [acme]
|
||||||
certbot-apache:
|
certbot-apache:
|
||||||
plugin: python
|
plugin: python
|
||||||
@@ -58,8 +61,12 @@ parts:
|
|||||||
source-subdir: certbot-apache
|
source-subdir: certbot-apache
|
||||||
constraints: $SNAPCRAFT_PART_SRC/constraints.txt
|
constraints: $SNAPCRAFT_PART_SRC/constraints.txt
|
||||||
python-version: python3
|
python-version: python3
|
||||||
python-packages:
|
after: [python-augeas, certbot]
|
||||||
- certbot
|
|
||||||
build-packages: [libaugeas-dev]
|
|
||||||
stage-packages: [libaugeas0]
|
stage-packages: [libaugeas0]
|
||||||
|
certbot-nginx:
|
||||||
|
plugin: python
|
||||||
|
source: certbot
|
||||||
|
source-subdir: certbot-nginx
|
||||||
|
constraints: $SNAPCRAFT_PART_SRC/constraints.txt
|
||||||
|
python-version: python3
|
||||||
after: [certbot]
|
after: [certbot]
|
||||||
|
|||||||
+6
-5
@@ -1,10 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
cd certbot
|
|
||||||
|
|
||||||
python3 -m venv venv
|
python3 -m venv venv
|
||||||
. venv/bin/activate
|
venv/bin/python -m pip install -e certbot/certbot-ci
|
||||||
pip install -e 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