Skip to content

Commit

Permalink
Merge pull request #19 from linuxserver/variables
Browse files Browse the repository at this point in the history
Add revision check, so pipeline can build new revisions
  • Loading branch information
tobbenb authored Apr 29, 2019
2 parents 22d3d9f + 1cafe3e commit fb2c751
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 10 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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 \
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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 \
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile.armhf
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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 \
Expand Down
14 changes: 8 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
}
Expand Down Expand Up @@ -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'''
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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." }
Expand Down

0 comments on commit fb2c751

Please sign in to comment.