Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebase to arch linux #12

Merged
merged 3 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .github/workflows/external_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
22 changes: 9 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
FROM ghcr.io/linuxserver/baseimage-kasmvnc:alpine317
FROM ghcr.io/linuxserver/baseimage-kasmvnc:arch

# set version label
ARG BUILD_DATE
ARG VERSION
ARG DARKTABLE_VERSION
ARG DIGIKAM_VERSION
thelamer marked this conversation as resolved.
Show resolved Hide resolved
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"

# title
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 -Syu --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
22 changes: 9 additions & 13 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
FROM ghcr.io/linuxserver/baseimage-kasmvnc:arm64v8-alpine317
FROM ghcr.io/linuxserver/baseimage-kasmvnc:arm64v8-arch

# set version label
ARG BUILD_DATE
ARG VERSION
ARG DARKTABLE_VERSION
ARG DIGIKAM_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"

# title
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 -Syu --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
18 changes: 7 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
}
}
}
Expand Down Expand Up @@ -855,11 +851,11 @@ pipeline {
"tagger": {"name": "LinuxServer Jenkins","email": "[email protected]","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'''
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 3 additions & 5 deletions jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
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: "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." }
Expand Down