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

Commit

Permalink
shift to using the certbot version for tagging of releases
Browse files Browse the repository at this point in the history
  • Loading branch information
thelamer committed Feb 4, 2019
1 parent c3b8dfb commit f87266e
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 14 deletions.
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM lsiobase/alpine.nginx:3.8
# set version label
ARG BUILD_DATE
ARG VERSION
ARG CERTBOT_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"

Expand Down Expand Up @@ -63,10 +64,15 @@ RUN \
py2-future \
py2-pip && \
echo "**** install certbot plugins ****" && \
if [ -z ${CERTBOT_VERSION+x} ]; then \
CERTBOT="certbot"; \
else \
CERTBOT="certbot==${CERTBOT_VERSION}"; \
fi && \
pip install -U --no-cache-dir \
pip && \
pip install -U --no-cache-dir \
certbot \
${CERTBOT} \
certbot-dns-cloudflare \
certbot-dns-cloudxns \
certbot-dns-digitalocean \
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ COPY qemu-aarch64-static /usr/bin
# set version label
ARG BUILD_DATE
ARG VERSION
ARG CERTBOT_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"

Expand Down Expand Up @@ -66,10 +67,15 @@ RUN \
py2-future \
py2-pip && \
echo "**** install certbot plugins ****" && \
if [ -z ${CERTBOT_VERSION+x} ]; then \
CERTBOT="certbot"; \
else \
CERTBOT="certbot==${CERTBOT_VERSION}"; \
fi && \
pip install -U --no-cache-dir \
pip && \
pip install -U --no-cache-dir \
certbot \
${CERTBOT} \
certbot-dns-cloudflare \
certbot-dns-cloudxns \
certbot-dns-digitalocean \
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile.armhf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ COPY qemu-arm-static /usr/bin
# set version label
ARG BUILD_DATE
ARG VERSION
ARG CERTBOT_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"

Expand Down Expand Up @@ -66,10 +67,15 @@ RUN \
py2-future \
py2-pip && \
echo "**** install certbot plugins ****" && \
if [ -z ${CERTBOT_VERSION+x} ]; then \
CERTBOT="certbot"; \
else \
CERTBOT="certbot==${CERTBOT_VERSION}"; \
fi && \
pip install -U --no-cache-dir \
pip && \
pip install -U --no-cache-dir \
certbot \
${CERTBOT} \
certbot-dns-cloudflare \
certbot-dns-cloudxns \
certbot-dns-digitalocean \
Expand Down
20 changes: 11 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ pipeline {
environment {
BUILDS_DISCORD=credentials('build_webhook_url')
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
BUILD_VERSION_ARG = 'LETSENCRYPT_VERSION'
EXT_PIP = 'certbot'
BUILD_VERSION_ARG = 'CERTBOT_VERSION'
LS_USER = 'linuxserver'
LS_REPO = 'docker-letsencrypt'
CONTAINER_NAME = 'letsencrypt'
Expand Down Expand Up @@ -91,16 +92,17 @@ pipeline {
/* ########################
External Release Tagging
######################## */
// If this is an os release set release type to none to indicate no external release
stage("Set ENV os"){
// If this is a pip release set the external tag to the pip version
stage("Set ENV pip_version"){
steps{
script{
env.EXT_RELEASE = env.PACKAGE_TAG
env.RELEASE_LINK = 'none'
env.EXT_RELEASE = sh(
script: '''curl -sL https://pypi.python.org/pypi/${EXT_PIP}/json |jq -r '. | .info.version' ''',
returnStdout: true).trim()
env.RELEASE_LINK = 'https://pypi.python.org/pypi/' + env.EXT_PIP
}
}
}
// Sanitize the release tag and strip illegal docker or github characters
} // Sanitize the release tag and strip illegal docker or github characters
stage("Sanitize tag"){
steps{
script{
Expand Down Expand Up @@ -528,11 +530,11 @@ pipeline {
"tagger": {"name": "LinuxServer Jenkins","email": "[email protected]","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
echo "Updating PIP version of ${EXT_PIP} to ${EXT_RELEASE_CLEAN}" > releasebody.json
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
"target_commitish": "master",\
"name": "'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**OS Changes:**\\n\\n' > start
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**PIP Changes:**\\n\\n' > start
printf '","draft": false,"prerelease": false}' >> releasebody.json
paste -d'\\0' start releasebody.json > releasebody.json.done
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
Expand Down
5 changes: 3 additions & 2 deletions jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

# jenkins variables
project_name: docker-letsencrypt
external_type: os
external_type: pip_version
release_type: stable
release_tag: latest
ls_branch: master
repo_vars:
- BUILD_VERSION_ARG = 'LETSENCRYPT_VERSION'
- EXT_PIP = 'certbot'
- BUILD_VERSION_ARG = 'CERTBOT_VERSION'
- LS_USER = 'linuxserver'
- LS_REPO = 'docker-letsencrypt'
- CONTAINER_NAME = 'letsencrypt'
Expand Down

0 comments on commit f87266e

Please sign in to comment.