diff --git a/Dockerfile b/Dockerfile index a62be2c..62e9f67 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ FROM lsiobase/alpine:3.8 # set version label ARG BUILD_DATE ARG VERSION +ARG OSCAM_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="saarg" @@ -29,7 +30,10 @@ RUN \ pcsc-lite \ pcsc-lite-libs && \ echo "**** compile oscam ****" && \ - svn checkout http://www.streamboard.tv/svn/oscam/trunk /tmp/oscam-svn && \ + if [ -z ${OSCAM_VERSION+x} ]; then \ + OSCAM_VERSION=$(svn info --show-item revision http://www.streamboard.tv/svn/oscam/trunk ); \ + fi && \ + svn checkout http://www.streamboard.tv/svn/oscam/trunk@${OSCAM_VERSION} /tmp/oscam-svn && \ cd /tmp/oscam-svn && \ ./config.sh \ --enable all \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 78de16e..f63e275 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -3,6 +3,7 @@ FROM lsiobase/alpine:arm64v8-3.8 # set version label ARG BUILD_DATE ARG VERSION +ARG OSCAM_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="saarg" @@ -29,7 +30,10 @@ RUN \ pcsc-lite \ pcsc-lite-libs && \ echo "**** compile oscam ****" && \ - svn checkout http://www.streamboard.tv/svn/oscam/trunk /tmp/oscam-svn && \ + if [ -z ${OSCAM_VERSION+x} ]; then \ + OSCAM_VERSION=$(svn info --show-item revision http://www.streamboard.tv/svn/oscam/trunk ); \ + fi && \ + svn checkout http://www.streamboard.tv/svn/oscam/trunk@${OSCAM_VERSION} /tmp/oscam-svn && \ cd /tmp/oscam-svn && \ ./config.sh \ --enable all \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 80c4bb7..90f4712 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -3,6 +3,7 @@ FROM lsiobase/alpine:arm32v7-3.8 # set version label ARG BUILD_DATE ARG VERSION +ARG OSCAM_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="saarg" @@ -29,7 +30,10 @@ RUN \ pcsc-lite \ pcsc-lite-libs && \ echo "**** compile oscam ****" && \ - svn checkout http://www.streamboard.tv/svn/oscam/trunk /tmp/oscam-svn && \ + if [ -z ${OSCAM_VERSION+x} ]; then \ + OSCAM_VERSION=$(svn info --show-item revision http://www.streamboard.tv/svn/oscam/trunk ); \ + fi && \ + svn checkout http://www.streamboard.tv/svn/oscam/trunk@${OSCAM_VERSION} /tmp/oscam-svn && \ cd /tmp/oscam-svn && \ ./config.sh \ --enable all \ diff --git a/Jenkinsfile b/Jenkinsfile index 0d6da31..be21682 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -91,12 +91,14 @@ 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 custom command to determine version use that command + stage("Set tag custom bash"){ steps{ script{ - env.EXT_RELEASE = env.PACKAGE_TAG - env.RELEASE_LINK = 'none' + env.EXT_RELEASE = sh( + script: ''' docker run --rm alpine:3.9 sh -c 'apk add subversion > /dev/null 2>&1 && svn info --show-item revision http://www.streamboard.tv/svn/oscam/trunk' ''', + returnStdout: true).trim() + env.RELEASE_LINK = 'custom_command' } } } @@ -585,11 +587,11 @@ pipeline { "tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' ''' echo "Pushing New release for Tag" sh '''#! /bin/bash - echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json + echo "Updating 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**Remote 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''' diff --git a/README.md b/README.md index 5aa7a07..7ddae32 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,7 @@ Below are the instructions for updating containers: ## Versions +* **29.04.19:** - Add revision check, so pipeline can build new revisions. * **28.04.19:** - Switch back to streamboard svn to fix version not showing in UI. * **23.03.19:** - Switching to new Base images, shift to arm32v7 tag. * **19.02.19:** - Add pipeline logic and multi arch, rebase to Alpine 3.8. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index c0c6095..c9f656c 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -2,7 +2,8 @@ # jenkins variables project_name: docker-oscam -external_type: os +external_type: na +custom_version_command: "docker run --rm alpine:3.9 sh -c 'apk add subversion > /dev/null 2>&1 && svn info --show-item revision http://www.streamboard.tv/svn/oscam/trunk'" release_type: stable release_tag: latest ls_branch: master diff --git a/readme-vars.yml b/readme-vars.yml index 4b7280f..f51609b 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -73,6 +73,7 @@ app_setup_block: | # changelog changelogs: + - { date: "29.04.19:", desc: "Add revision check, so pipeline can build new revisions." } - { date: "28.04.19:", desc: "Switch back to streamboard svn to fix version not showing in UI." } - { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." } - { date: "19.02.19:", desc: "Add pipeline logic and multi arch, rebase to Alpine 3.8." }