shifting to os type and hard coding overlay version to avoid tag collision

pull/16/head
thelamer 2019-03-15 23:54:02 -07:00
rodzic 5a7f371af3
commit ecc16600da
5 zmienionych plików z 16 dodań i 43 usunięć

Wyświetl plik

@ -29,7 +29,7 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL MAINTAINER="sparkyballs,TheLamer"
# set version for s6 overlay
ARG OVERLAY_VERSION
ARG OVERLAY_VERSION="v1.22.0.0"
ARG OVERLAY_ARCH="amd64"
# set environment variables
@ -87,10 +87,6 @@ RUN \
echo "**** generate locale ****" && \
locale-gen en_US.UTF-8 && \
echo "**** add s6 overlay ****" && \
if [ -z ${OVERLAY_VERSION+x} ]; then \
OVERLAY_VERSION=$(curl -sX GET "https://api.github.com/repos/just-containers/s6-overlay/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/s6-overlay.tar.gz -L \
"https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}.tar.gz" && \

Wyświetl plik

@ -31,7 +31,7 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL MAINTAINER="sparkyballs,TheLamer"
# set version for s6 overlay
ARG OVERLAY_VERSION
ARG OVERLAY_VERSION="v1.22.0.0"
ARG OVERLAY_ARCH="aarch64"
# set environment variables
@ -89,10 +89,6 @@ RUN \
echo "**** generate locale ****" && \
locale-gen en_US.UTF-8 && \
echo "**** add s6 overlay ****" && \
if [ -z ${OVERLAY_VERSION+x} ]; then \
OVERLAY_VERSION=$(curl -sX GET "https://api.github.com/repos/just-containers/s6-overlay/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/s6-overlay.tar.gz -L \
"https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}.tar.gz" && \

Wyświetl plik

@ -31,7 +31,7 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL MAINTAINER="sparkyballs,TheLamer"
# set version for s6 overlay
ARG OVERLAY_VERSION
ARG OVERLAY_VERSION="v1.22.0.0"
ARG OVERLAY_ARCH="arm"
# set environment variables
@ -89,10 +89,6 @@ RUN \
echo "**** generate locale ****" && \
locale-gen en_US.UTF-8 && \
echo "**** add s6 overlay ****" && \
if [ -z ${OVERLAY_VERSION+x} ]; then \
OVERLAY_VERSION=$(curl -sX GET "https://api.github.com/repos/just-containers/s6-overlay/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/s6-overlay.tar.gz -L \
"https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}.tar.gz" && \

34
Jenkinsfile vendored
Wyświetl plik

@ -10,10 +10,7 @@ pipeline {
environment {
BUILDS_DISCORD=credentials('build_webhook_url')
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
EXT_GIT_BRANCH = 'master'
EXT_USER = 'just-containers'
EXT_REPO = 's6-overlay'
BUILD_VERSION_ARG = 'OVERLAY_VERSION'
BUILD_VERSION_ARG = 'OS'
LS_USER = 'linuxserver'
LS_REPO = 'docker-baseimage-ubuntu'
CONTAINER_NAME = 'baseimage-ubuntu'
@ -94,23 +91,14 @@ pipeline {
/* ########################
External Release Tagging
######################## */
// If this is a stable github release use the latest endpoint from github to determine the ext tag
stage("Set ENV github_stable"){
steps{
script{
env.EXT_RELEASE = sh(
script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''',
returnStdout: true).trim()
}
}
}
// If this is a stable or devel github release generate the link for the build message
stage("Set ENV github_link"){
steps{
script{
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE
}
}
// If this is an os release set release type to none to indicate no external release
stage("Set ENV os"){
steps{
script{
env.EXT_RELEASE = env.PACKAGE_TAG
env.RELEASE_LINK = 'none'
}
}
}
// Sanitize the release tag and strip illegal docker or github characters
stage("Sanitize tag"){
@ -533,11 +521,11 @@ pipeline {
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
"target_commitish": "bionic",\
"name": "'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**OS 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'''

Wyświetl plik

@ -2,15 +2,12 @@
# jenkins variables
project_name: docker-baseimage-ubuntu
external_type: github_stable
external_type: os
release_type: stable
release_tag: bionic
ls_branch: bionic
repo_vars:
- EXT_GIT_BRANCH = 'master'
- EXT_USER = 'just-containers'
- EXT_REPO = 's6-overlay'
- BUILD_VERSION_ARG = 'OVERLAY_VERSION'
- BUILD_VERSION_ARG = 'OS'
- LS_USER = 'linuxserver'
- LS_REPO = 'docker-baseimage-ubuntu'
- CONTAINER_NAME = 'baseimage-ubuntu'