Skip to content
This repository was archived by the owner on Jan 6, 2021. It is now read-only.

Commit d877f82

Browse files
authored
Merge pull request #263 from linuxserver/pip-version
shift to using the certbot version for tagging of releases
2 parents 6279428 + f87266e commit d877f82

5 files changed

+35
-14
lines changed

Dockerfile

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM lsiobase/alpine.nginx:3.8
33
# set version label
44
ARG BUILD_DATE
55
ARG VERSION
6+
ARG CERTBOT_VERSION
67
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
78
LABEL maintainer="aptalca"
89

@@ -63,10 +64,15 @@ RUN \
6364
py2-future \
6465
py2-pip && \
6566
echo "**** install certbot plugins ****" && \
67+
if [ -z ${CERTBOT_VERSION+x} ]; then \
68+
CERTBOT="certbot"; \
69+
else \
70+
CERTBOT="certbot==${CERTBOT_VERSION}"; \
71+
fi && \
6672
pip install -U --no-cache-dir \
6773
pip && \
6874
pip install -U --no-cache-dir \
69-
certbot \
75+
${CERTBOT} \
7076
certbot-dns-cloudflare \
7177
certbot-dns-cloudxns \
7278
certbot-dns-digitalocean \

Dockerfile.aarch64

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ COPY qemu-aarch64-static /usr/bin
66
# set version label
77
ARG BUILD_DATE
88
ARG VERSION
9+
ARG CERTBOT_VERSION
910
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
1011
LABEL maintainer="aptalca"
1112

@@ -66,10 +67,15 @@ RUN \
6667
py2-future \
6768
py2-pip && \
6869
echo "**** install certbot plugins ****" && \
70+
if [ -z ${CERTBOT_VERSION+x} ]; then \
71+
CERTBOT="certbot"; \
72+
else \
73+
CERTBOT="certbot==${CERTBOT_VERSION}"; \
74+
fi && \
6975
pip install -U --no-cache-dir \
7076
pip && \
7177
pip install -U --no-cache-dir \
72-
certbot \
78+
${CERTBOT} \
7379
certbot-dns-cloudflare \
7480
certbot-dns-cloudxns \
7581
certbot-dns-digitalocean \

Dockerfile.armhf

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ COPY qemu-arm-static /usr/bin
66
# set version label
77
ARG BUILD_DATE
88
ARG VERSION
9+
ARG CERTBOT_VERSION
910
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
1011
LABEL maintainer="aptalca"
1112

@@ -66,10 +67,15 @@ RUN \
6667
py2-future \
6768
py2-pip && \
6869
echo "**** install certbot plugins ****" && \
70+
if [ -z ${CERTBOT_VERSION+x} ]; then \
71+
CERTBOT="certbot"; \
72+
else \
73+
CERTBOT="certbot==${CERTBOT_VERSION}"; \
74+
fi && \
6975
pip install -U --no-cache-dir \
7076
pip && \
7177
pip install -U --no-cache-dir \
72-
certbot \
78+
${CERTBOT} \
7379
certbot-dns-cloudflare \
7480
certbot-dns-cloudxns \
7581
certbot-dns-digitalocean \

Jenkinsfile

+11-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ pipeline {
1010
environment {
1111
BUILDS_DISCORD=credentials('build_webhook_url')
1212
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
13-
BUILD_VERSION_ARG = 'LETSENCRYPT_VERSION'
13+
EXT_PIP = 'certbot'
14+
BUILD_VERSION_ARG = 'CERTBOT_VERSION'
1415
LS_USER = 'linuxserver'
1516
LS_REPO = 'docker-letsencrypt'
1617
CONTAINER_NAME = 'letsencrypt'
@@ -91,16 +92,17 @@ pipeline {
9192
/* ########################
9293
External Release Tagging
9394
######################## */
94-
// If this is an os release set release type to none to indicate no external release
95-
stage("Set ENV os"){
95+
// If this is a pip release set the external tag to the pip version
96+
stage("Set ENV pip_version"){
9697
steps{
9798
script{
98-
env.EXT_RELEASE = env.PACKAGE_TAG
99-
env.RELEASE_LINK = 'none'
99+
env.EXT_RELEASE = sh(
100+
script: '''curl -sL https://pypi.python.org/pypi/${EXT_PIP}/json |jq -r '. | .info.version' ''',
101+
returnStdout: true).trim()
102+
env.RELEASE_LINK = 'https://pypi.python.org/pypi/' + env.EXT_PIP
100103
}
101104
}
102-
}
103-
// Sanitize the release tag and strip illegal docker or github characters
105+
} // Sanitize the release tag and strip illegal docker or github characters
104106
stage("Sanitize tag"){
105107
steps{
106108
script{
@@ -528,11 +530,11 @@ pipeline {
528530
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
529531
echo "Pushing New release for Tag"
530532
sh '''#! /bin/bash
531-
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
533+
echo "Updating PIP version of ${EXT_PIP} to ${EXT_RELEASE_CLEAN}" > releasebody.json
532534
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
533535
"target_commitish": "master",\
534536
"name": "'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
535-
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**OS Changes:**\\n\\n' > start
537+
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**PIP Changes:**\\n\\n' > start
536538
printf '","draft": false,"prerelease": false}' >> releasebody.json
537539
paste -d'\\0' start releasebody.json > releasebody.json.done
538540
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''

jenkins-vars.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
# jenkins variables
44
project_name: docker-letsencrypt
5-
external_type: os
5+
external_type: pip_version
66
release_type: stable
77
release_tag: latest
88
ls_branch: master
99
repo_vars:
10-
- BUILD_VERSION_ARG = 'LETSENCRYPT_VERSION'
10+
- EXT_PIP = 'certbot'
11+
- BUILD_VERSION_ARG = 'CERTBOT_VERSION'
1112
- LS_USER = 'linuxserver'
1213
- LS_REPO = 'docker-letsencrypt'
1314
- CONTAINER_NAME = 'letsencrypt'

0 commit comments

Comments
 (0)