diff --git a/Dockerfile b/Dockerfile index d525925..3383d3e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,8 @@ RUN \ if [ -z ${SABNZBD_VERSION+x} ]; then \ SABNZBD="sabnzbdplus"; \ else \ - SABNZBD="sabnzbdplus=${SABNZBD_VERSION}"; \ + SABNZBD_CLEAN=$(echo "${SABNZBD_VERSION}"| sed 's/..$//') && \ + SABNZBD="sabnzbdplus=${SABNZBD_CLEAN}"; \ fi && \ apt-get update && \ apt-get install -y \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 030131d..fdd04af 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -26,7 +26,8 @@ RUN \ if [ -z ${SABNZBD_VERSION+x} ]; then \ SABNZBD="sabnzbdplus"; \ else \ - SABNZBD="sabnzbdplus=${SABNZBD_VERSION}"; \ + SABNZBD_CLEAN=$(echo "${SABNZBD_VERSION}"| sed 's/..$//') && \ + SABNZBD="sabnzbdplus=${SABNZBD_CLEAN}"; \ fi && \ apt-get update && \ apt-get install -y \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index dab0a68..88107e9 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -26,7 +26,8 @@ RUN \ if [ -z ${SABNZBD_VERSION+x} ]; then \ SABNZBD="sabnzbdplus"; \ else \ - SABNZBD="sabnzbdplus=${SABNZBD_VERSION}"; \ + SABNZBD_CLEAN=$(echo "${SABNZBD_VERSION}"| sed 's/..$//') && \ + SABNZBD="sabnzbdplus=${SABNZBD_CLEAN}"; \ fi && \ apt-get update && \ apt-get install -y \ diff --git a/Jenkinsfile b/Jenkinsfile index 796583b..747fbc5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -96,7 +96,7 @@ pipeline { steps{ script{ env.EXT_RELEASE = sh( - script: ''' curl -sX GET http://ppa.launchpad.net/jcfp/ppa/ubuntu/dists/xenial/main/binary-amd64/Packages.gz | gunzip |grep -A 7 -m 1 'Package: sabnzbdplus' | awk -F ': ' '/Version/{print $2;exit}' ''', + script: ''' curl -sX GET http://ppa.launchpad.net/jcfp/ppa/ubuntu/dists/xenial/main/binary-amd64/Packages.gz | gunzip |grep -A 7 -m 1 'Package: sabnzbdplus' | awk -F ': ' '/Version/{print $2;exit}' | sed 's/$/-u/' ''', returnStdout: true).trim() env.RELEASE_LINK = 'custom_command' } @@ -199,6 +199,15 @@ pipeline { else echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} 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 + 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 + git commit -m 'Bot Updating Templated Files' + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all + fi rm -Rf ${TEMPDIR}''' script{ env.FILES_UPDATED = sh( diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 9ce380d..e6de214 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -3,7 +3,7 @@ # jenkins variables project_name: docker-sabnzbd external_type: na -custom_version_command: "curl -sX GET http://ppa.launchpad.net/jcfp/ppa/ubuntu/dists/xenial/main/binary-amd64/Packages.gz | gunzip |grep -A 7 -m 1 'Package: sabnzbdplus' | awk -F ': ' '/Version/{print $2;exit}'" +custom_version_command: "curl -sX GET http://ppa.launchpad.net/jcfp/ppa/ubuntu/dists/xenial/main/binary-amd64/Packages.gz | gunzip |grep -A 7 -m 1 'Package: sabnzbdplus' | awk -F ': ' '/Version/{print $2;exit}' | sed 's/$/-u/'" release_type: prerelease release_tag: unstable ls_branch: unstable