Add script and generated snapcraft.yaml files (#8096)

This PR adds a proper snapcraft.yaml file for each DNS plugin, and provides a shell script to generate them.
This commit is contained in:
Adrien Ferrand
2020-06-22 17:07:08 -07:00
committed by GitHub
parent 46eb4ec7e3
commit 25d1977d4f
15 changed files with 379 additions and 1 deletions
@@ -0,0 +1,26 @@
name: certbot-dns-cloudflare
summary: Cloudflare DNS Authenticator plugin for Certbot
description: Cloudflare DNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
adopt-info: certbot-dns-cloudflare
parts:
certbot-dns-cloudflare:
plugin: python
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.6/site-packages
+26
View File
@@ -0,0 +1,26 @@
name: certbot-dns-cloudxns
summary: CloudXNS DNS Authenticator plugin for Certbot
description: CloudXNS DNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
adopt-info: certbot-dns-cloudxns
parts:
certbot-dns-cloudxns:
plugin: python
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.6/site-packages
@@ -0,0 +1,26 @@
name: certbot-dns-digitalocean
summary: DigitalOcean DNS Authenticator plugin for Certbot
description: DigitalOcean DNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
adopt-info: certbot-dns-digitalocean
parts:
certbot-dns-digitalocean:
plugin: python
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.6/site-packages
+1 -1
View File
@@ -1,6 +1,6 @@
name: certbot-dns-dnsimple
summary: DNSimple DNS Authenticator plugin for Certbot
description: TBC
description: DNSimple DNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
@@ -0,0 +1,26 @@
name: certbot-dns-dnsmadeeasy
summary: DNS Made Easy DNS Authenticator plugin for Certbot
description: DNS Made Easy DNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
adopt-info: certbot-dns-dnsmadeeasy
parts:
certbot-dns-dnsmadeeasy:
plugin: python
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.6/site-packages
+26
View File
@@ -0,0 +1,26 @@
name: certbot-dns-gehirn
summary: Gehirn Infrastructure Service DNS Authenticator plugin for Certbot
description: Gehirn Infrastructure Service DNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
adopt-info: certbot-dns-gehirn
parts:
certbot-dns-gehirn:
plugin: python
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.6/site-packages
+26
View File
@@ -0,0 +1,26 @@
name: certbot-dns-google
summary: Google Cloud DNS Authenticator plugin for Certbot
description: Google Cloud DNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
adopt-info: certbot-dns-google
parts:
certbot-dns-google:
plugin: python
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.6/site-packages
+26
View File
@@ -0,0 +1,26 @@
name: certbot-dns-linode
summary: Linode DNS Authenticator plugin for Certbot
description: Linode DNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
adopt-info: certbot-dns-linode
parts:
certbot-dns-linode:
plugin: python
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.6/site-packages
+26
View File
@@ -0,0 +1,26 @@
name: certbot-dns-luadns
summary: LuaDNS Authenticator plugin for Certbot
description: LuaDNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
adopt-info: certbot-dns-luadns
parts:
certbot-dns-luadns:
plugin: python
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.6/site-packages
+26
View File
@@ -0,0 +1,26 @@
name: certbot-dns-nsone
summary: NS1 DNS Authenticator plugin for Certbot
description: NS1 DNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
adopt-info: certbot-dns-nsone
parts:
certbot-dns-nsone:
plugin: python
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.6/site-packages
+26
View File
@@ -0,0 +1,26 @@
name: certbot-dns-ovh
summary: OVH DNS Authenticator plugin for Certbot
description: OVH DNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
adopt-info: certbot-dns-ovh
parts:
certbot-dns-ovh:
plugin: python
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.6/site-packages
+26
View File
@@ -0,0 +1,26 @@
name: certbot-dns-rfc2136
summary: RFC 2136 DNS Authenticator plugin for Certbot
description: RFC 2136 DNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
adopt-info: certbot-dns-rfc2136
parts:
certbot-dns-rfc2136:
plugin: python
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.6/site-packages
+26
View File
@@ -0,0 +1,26 @@
name: certbot-dns-route53
summary: Route53 DNS Authenticator plugin for Certbot
description: Route53 DNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
adopt-info: certbot-dns-route53
parts:
certbot-dns-route53:
plugin: python
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.6/site-packages
@@ -0,0 +1,26 @@
name: certbot-dns-sakuracloud
summary: Sakura Cloud DNS Authenticator plugin for Certbot
description: Sakura Cloud DNS Authenticator plugin for Certbot
confinement: strict
grade: devel
base: core18
adopt-info: certbot-dns-sakuracloud
parts:
certbot-dns-sakuracloud:
plugin: python
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.6/site-packages
+40
View File
@@ -0,0 +1,40 @@
#!/bin/bash
# Generate the snapcraft.yaml file for all DNS plugins
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
CERTBOT_DIR="$(dirname "${DIR}")"
for PLUGIN_PATH in "${CERTBOT_DIR}"/certbot-dns-*; do
PLUGIN=$(basename "${PLUGIN_PATH}")
DESCRIPTION=$(grep description "${PLUGIN_PATH}/setup.py" | sed -E 's|\s+description="(.*)",|\1|g')
mkdir -p "${PLUGIN_PATH}/snap"
cat <<EOF > "${PLUGIN_PATH}/snap/snapcraft.yaml"
name: ${PLUGIN}
summary: ${DESCRIPTION}
description: ${DESCRIPTION}
confinement: strict
grade: devel
base: core18
adopt-info: ${PLUGIN}
parts:
${PLUGIN}:
plugin: python
source: .
constraints: [\$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-version: python3
override-pull: |
snapcraftctl pull
snapcraftctl set-version \`grep ^version \$SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"\`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
slots:
certbot:
interface: content
content: certbot-1
read:
- \$SNAP/lib/python3.6/site-packages
EOF
done