diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index 1dce988..e978501 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -20,8 +20,7 @@ jobs: echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_DARKTABLE_MASTER\". ****" echo "External trigger running off of master branch. To disable this trigger, set a Github secret named \`PAUSE_EXTERNAL_TRIGGER_DARKTABLE_MASTER\`" >> $GITHUB_STEP_SUMMARY echo "**** Retrieving external version ****" - EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ - && awk '/^P:'"darktable"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') + EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/linuxserver/docker-baseimage-kasmvnc/releases | jq -r 'first(.[] | select(.tag_name | startswith("arch-"))) | .tag_name' | sed 's|arch-||' | sed 's|-ls.*||') if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then echo "**** Can't retrieve external version, exiting ****" FAILURE_REASON="Can't retrieve external version for darktable branch master" @@ -74,14 +73,6 @@ jobs: echo "**** Version ${EXT_RELEASE} already pushed, exiting ****" echo "Version ${EXT_RELEASE} already pushed, exiting" >> $GITHUB_STEP_SUMMARY exit 0 - elif [[ $(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.17/community/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"darktable"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]; then - echo "**** New version ${EXT_RELEASE} found; but not all arch repos updated yet; exiting ****" - echo "New version ${EXT_RELEASE} found; but not all arch repos updated yet; exiting" >> $GITHUB_STEP_SUMMARY - FAILURE_REASON="New version ${EXT_RELEASE} for darktable tag latest is detected, however not all arch repos are updated yet. Will try again later." - curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903, - "description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}], - "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} - exit 0 elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-darktable/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****" echo "New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY diff --git a/Dockerfile b/Dockerfile index ec43159..bfe4efb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-kasmvnc:alpine317 +FROM ghcr.io/linuxserver/baseimage-kasmvnc:arch # set version label ARG BUILD_DATE @@ -11,22 +11,18 @@ LABEL maintainer="thelamer" ENV TITLE=darktable RUN \ - echo "**** install packages ****" && \ - if [ -z ${DARKTABLE_VERSION+x} ]; then \ - DARKTABLE_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ - && awk '/^P:darktable$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ - fi && \ - apk add --no-cache \ - darktable==${DARKTABLE_VERSION} && \ - mkdir -p /usr/share/locale && \ + echo "**** install runtime packages ****" && \ + pacman -Sy --noconfirm --needed \ + darktable \ + portmidi && \ echo "**** cleanup ****" && \ rm -rf \ - /tmp/* + /tmp/* \ + /var/cache/pacman/pkg/* \ + /var/lib/pacman/sync/* # add local files COPY /root / # ports and volumes EXPOSE 3000 - -VOLUME /config diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index efae872..6101b10 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-kasmvnc:arm64v8-alpine317 +FROM ghcr.io/linuxserver/baseimage-kasmvnc:arm64v8-arch # set version label ARG BUILD_DATE @@ -11,22 +11,18 @@ LABEL maintainer="thelamer" ENV TITLE=darktable RUN \ - echo "**** install packages ****" && \ - if [ -z ${DARKTABLE_VERSION+x} ]; then \ - DARKTABLE_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ - && awk '/^P:darktable$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ - fi && \ - apk add --no-cache \ - darktable==${DARKTABLE_VERSION} && \ - mkdir -p /usr/share/locale && \ + echo "**** install runtime packages ****" && \ + pacman -Sy --noconfirm --needed \ + darktable \ + portmidi && \ echo "**** cleanup ****" && \ rm -rf \ - /tmp/* + /tmp/* \ + /var/cache/pacman/pkg/* \ + /var/lib/pacman/sync/* # add local files COPY /root / # ports and volumes EXPOSE 3000 - -VOLUME /config diff --git a/Jenkinsfile b/Jenkinsfile index 0942292..3e10b88 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,10 +24,7 @@ pipeline { DOCKERHUB_IMAGE = 'linuxserver/darktable' DEV_DOCKERHUB_IMAGE = 'lsiodev/darktable' PR_DOCKERHUB_IMAGE = 'lspipepr/darktable' - DIST_IMAGE = 'alpine' - DIST_TAG = '3.17' - DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.17/community/' - DIST_REPO_PACKAGES = 'darktable' + DIST_IMAGE = 'arch' MULTIARCH = 'true' CI = 'true' CI_WEB = 'true' @@ -113,15 +110,14 @@ pipeline { /* ######################## External Release Tagging ######################## */ - // If this is an alpine repo change for external version determine an md5 from the version string - stage("Set tag Alpine Repo"){ + // If this is a custom command to determine version use that command + stage("Set tag custom bash"){ steps{ script{ env.EXT_RELEASE = sh( - script: '''curl -sL "${DIST_REPO}x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ - && awk '/^P:'"${DIST_REPO_PACKAGES}"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://' ''', + script: ''' curl -sX GET https://api.github.com/repos/linuxserver/docker-baseimage-kasmvnc/releases | jq -r 'first(.[] | select(.tag_name | startswith("arch-"))) | .tag_name' | sed 's|arch-||' | sed 's|-ls.*||' ''', returnStdout: true).trim() - env.RELEASE_LINK = 'alpine_repo' + env.RELEASE_LINK = 'custom_command' } } } @@ -855,11 +851,11 @@ pipeline { "tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' ''' echo "Pushing New release for Tag" sh '''#! /bin/bash - echo "Updating external repo packages to ${EXT_RELEASE_CLEAN}" > releasebody.json + echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json echo '{"tag_name":"'${META_TAG}'",\ "target_commitish": "master",\ "name": "'${META_TAG}'",\ - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Repo Changes:**\\n\\n' > start + "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\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 647bcc2..8027bb7 100644 --- a/README.md +++ b/README.md @@ -311,6 +311,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **21.01.24:** - Rebase to Arch as Alpine not longer offers aarch64. * **18.03.23:** - Rebase to KasmVNC base image. * **23.10.22:** - Rebase to Alpine 3.16, migrate to s6v3. * **31.12.21:** - Rebase to Alpine 3.15. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 150b315..9ac182a 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -2,7 +2,8 @@ # jenkins variables project_name: docker-darktable -external_type: alpine_repo +external_type: na +custom_version_command: "curl -sX GET https://api.github.com/repos/linuxserver/docker-baseimage-kasmvnc/releases | jq -r 'first(.[] | select(.tag_name | startswith(\"arch-\"))) | .tag_name' | sed 's|arch-||' | sed 's|-ls.*||'" release_type: stable release_tag: latest ls_branch: master @@ -15,10 +16,7 @@ repo_vars: - DOCKERHUB_IMAGE = 'linuxserver/darktable' - DEV_DOCKERHUB_IMAGE = 'lsiodev/darktable' - PR_DOCKERHUB_IMAGE = 'lspipepr/darktable' - - DIST_IMAGE = 'alpine' - - DIST_TAG = '3.17' - - DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.17/community/' - - DIST_REPO_PACKAGES = 'darktable' + - DIST_IMAGE = 'arch' - MULTIARCH = 'true' - CI = 'true' - CI_WEB = 'true' diff --git a/readme-vars.yml b/readme-vars.yml index 5fd0baa..65e69eb 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -73,6 +73,7 @@ app_setup_block: | # changelog changelogs: + - { date: "21.01.24:", desc: "Rebase to Arch as Alpine not longer offers aarch64." } - { date: "18.03.23:", desc: "Rebase to KasmVNC base image." } - { date: "23.10.22:", desc: "Rebase to Alpine 3.16, migrate to s6v3." } - { date: "31.12.21:", desc: "Rebase to Alpine 3.15." }