Compare commits
8 Commits
3c5357bc-p
...
11517-ls7
Author | SHA1 | Date | |
---|---|---|---|
02b4c12dc1 | |||
9e9470eab5 | |||
fb2c75179c | |||
1cafe3e38b | |||
9beff939fe | |||
ce79a74de0 | |||
22d3d9f323 | |||
9e04fd2a5b |
@ -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"
|
||||
|
||||
@ -18,6 +19,7 @@ RUN \
|
||||
make \
|
||||
libressl-dev \
|
||||
pcsc-lite-dev \
|
||||
subversion \
|
||||
tar && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
@ -28,7 +30,10 @@ RUN \
|
||||
pcsc-lite \
|
||||
pcsc-lite-libs && \
|
||||
echo "**** compile oscam ****" && \
|
||||
bzr branch lp:oscam /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 \
|
||||
|
@ -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"
|
||||
|
||||
@ -18,6 +19,7 @@ RUN \
|
||||
make \
|
||||
libressl-dev \
|
||||
pcsc-lite-dev \
|
||||
subversion \
|
||||
tar && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
@ -28,7 +30,10 @@ RUN \
|
||||
pcsc-lite \
|
||||
pcsc-lite-libs && \
|
||||
echo "**** compile oscam ****" && \
|
||||
bzr branch lp:oscam /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 \
|
||||
|
@ -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"
|
||||
|
||||
@ -18,6 +19,7 @@ RUN \
|
||||
make \
|
||||
libressl-dev \
|
||||
pcsc-lite-dev \
|
||||
subversion \
|
||||
tar && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
@ -28,7 +30,10 @@ RUN \
|
||||
pcsc-lite \
|
||||
pcsc-lite-libs && \
|
||||
echo "**** compile oscam ****" && \
|
||||
bzr branch lp:oscam /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 \
|
||||
|
42
Jenkinsfile
vendored
42
Jenkinsfile
vendored
@ -35,7 +35,7 @@ pipeline {
|
||||
script{
|
||||
env.EXIT_STATUS = ''
|
||||
env.LS_RELEASE = sh(
|
||||
script: '''curl -s https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/latest | jq -r '. | .tag_name' ''',
|
||||
script: '''docker run --rm alexeiled/skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':latest 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
||||
returnStdout: true).trim()
|
||||
env.LS_RELEASE_NOTES = sh(
|
||||
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
|
||||
@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -228,7 +230,7 @@ pipeline {
|
||||
fi
|
||||
mkdir -p ${TEMPDIR}/gitbook
|
||||
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation
|
||||
if [ "${BRANCH_NAME}" = "master" ] && [ ! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md ] || [ "$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" ]; then
|
||||
if [[ "${BRANCH_NAME}" == "master" ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
|
||||
cp ${TEMPDIR}/${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
|
||||
cd ${TEMPDIR}/gitbook/docker-documentation/
|
||||
git add images/docker-${CONTAINER_NAME}.md
|
||||
@ -303,15 +305,13 @@ pipeline {
|
||||
sh '''#! /bin/bash
|
||||
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
|
||||
'''
|
||||
sh "curl https://lsio-ci.ams3.digitaloceanspaces.com/qemu-arm-static -o qemu-arm-static"
|
||||
sh "chmod +x qemu-*"
|
||||
sh "docker build --no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
sh "docker push lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
sh '''docker rmi \
|
||||
${IMAGE}:arm32v7-${META_TAG} \
|
||||
lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} '''
|
||||
lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -332,15 +332,13 @@ pipeline {
|
||||
sh '''#! /bin/bash
|
||||
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
|
||||
'''
|
||||
sh "curl https://lsio-ci.ams3.digitaloceanspaces.com/qemu-aarch64-static -o qemu-aarch64-static"
|
||||
sh "chmod +x qemu-*"
|
||||
sh "docker build --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
sh "docker push lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
sh '''docker rmi \
|
||||
${IMAGE}:arm64v8-${META_TAG} \
|
||||
lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} '''
|
||||
lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -504,7 +502,7 @@ pipeline {
|
||||
sh "docker push ${IMAGE}:${META_TAG}"
|
||||
sh '''docker rmi \
|
||||
${IMAGE}:${META_TAG} \
|
||||
${IMAGE}:latest '''
|
||||
${IMAGE}:latest || :'''
|
||||
|
||||
}
|
||||
}
|
||||
@ -561,7 +559,7 @@ pipeline {
|
||||
${IMAGE}:arm64v8-${META_TAG} \
|
||||
${IMAGE}:arm64v8-latest \
|
||||
lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
|
||||
lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} '''
|
||||
lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -570,26 +568,26 @@ pipeline {
|
||||
when {
|
||||
branch "master"
|
||||
expression {
|
||||
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-ls' + env.LS_TAG_NUMBER
|
||||
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
}
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
echo "Pushing New tag for current commit ${EXT_RELEASE_CLEAN}-pkg-${PACKAGE_TAG}-ls${LS_TAG_NUMBER}"
|
||||
echo "Pushing New tag for current commit ${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}"
|
||||
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
||||
-d '{"tag":"'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
|
||||
-d '{"tag":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
||||
"object": "'${COMMIT_SHA}'",\
|
||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}' to master",\
|
||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
|
||||
"type": "commit",\
|
||||
"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 '{"tag_name":"'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
|
||||
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
|
||||
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-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
|
||||
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
||||
"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'''
|
||||
|
40
README.md
40
README.md
@ -164,15 +164,6 @@ Below are the instructions for updating containers:
|
||||
* Start the new container: `docker start oscam`
|
||||
* You can also remove the old dangling images: `docker image prune`
|
||||
|
||||
### Via Taisun auto-updater (especially useful if you don't remember the original parameters)
|
||||
* Pull the latest image at its tag and replace it with the same env variables in one shot:
|
||||
```
|
||||
docker run --rm \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock taisun/updater \
|
||||
--oneshot oscam
|
||||
```
|
||||
* You can also remove the old dangling images: `docker image prune`
|
||||
|
||||
### Via Docker Compose
|
||||
* Update all images: `docker-compose pull`
|
||||
* or update a single image: `docker-compose pull oscam`
|
||||
@ -180,8 +171,39 @@ Below are the instructions for updating containers:
|
||||
* or update a single container: `docker-compose up -d oscam`
|
||||
* You can also remove the old dangling images: `docker image prune`
|
||||
|
||||
### Via Watchtower auto-updater (especially useful if you don't remember the original parameters)
|
||||
* Pull the latest image at its tag and replace it with the same env variables in one run:
|
||||
```
|
||||
docker run --rm \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
containrrr/watchtower \
|
||||
--run-once oscam
|
||||
```
|
||||
* You can also remove the old dangling images: `docker image prune`
|
||||
|
||||
## Building locally
|
||||
|
||||
If you want to make local modifications to these images for development purposes or just to customize the logic:
|
||||
```
|
||||
git clone https://github.com/linuxserver/docker-oscam.git
|
||||
cd docker-oscam
|
||||
docker build \
|
||||
--no-cache \
|
||||
--pull \
|
||||
-t linuxserver/oscam:latest .
|
||||
```
|
||||
|
||||
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||
```
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
```
|
||||
|
||||
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||
|
||||
## 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.
|
||||
* **03.01.18:** - Deprecate cpu_core routine lack of scaling.
|
||||
|
@ -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
|
||||
|
@ -28,7 +28,7 @@ readline-7.0.003-r0
|
||||
scanelf-1.2.3-r0
|
||||
shadow-4.5-r0
|
||||
ssl_client-1.28.4-r3
|
||||
tzdata-2018f-r0
|
||||
tzdata-2019a-r0
|
||||
xz-5.2.4-r0
|
||||
xz-libs-5.2.4-r0
|
||||
zlib-1.2.11-r1
|
||||
|
@ -73,6 +73,8 @@ 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." }
|
||||
- { date: "03.01.18:", desc: "Deprecate cpu_core routine lack of scaling." }
|
||||
|
Reference in New Issue
Block a user