rebase to ubuntu and build latest from source

This commit is contained in:
aptalca 2021-04-13 22:36:21 -04:00
parent 2d2ca05ac3
commit 4c7c5d9401
7 changed files with 168 additions and 67 deletions

View file

@ -18,8 +18,7 @@ jobs:
fi fi
echo "**** External trigger running off of main branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_AUDACITY_MAIN\". ****" echo "**** External trigger running off of main branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_AUDACITY_MAIN\". ****"
echo "**** Retrieving external version ****" echo "**** Retrieving external version ****"
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ EXT_RELEASE=$(curl -sX GET https://api.github.com/repos/audacity/audacity/releases/latest | jq -r '.tag_name' | sed 's|^Audacity-||')
&& awk '/^P:'"audacity"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "**** Can't retrieve external version, exiting ****" echo "**** Can't retrieve external version, exiting ****"
FAILURE_REASON="Can't retrieve external version for audacity branch main" FAILURE_REASON="Can't retrieve external version for audacity branch main"

View file

@ -1,30 +1,66 @@
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:alpine FROM ghcr.io/linuxserver/baseimage-rdesktop-web:focal as buildstage
ARG AUDACITY_VERSION
RUN \
echo "**** install build packages ****" && \
apt-get update && \
apt-get install -y \
build-essential \
cmake \
curl \
gcc \
git \
libasound2-dev \
libavformat-dev \
libgtk2.0-dev \
python3-minimal \
libjack-jackd2-dev && \
echo "**** build audacity ****" && \
if [ -z ${AUDACITY_VERSION+x} ]; then \
AUDACITY_VERSION=$(curl -sX GET "https://api.github.com/repos/audacity/audacity/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^Audacity-||'); \
fi && \
mkdir -p /app/audacity/build && \
curl -o \
/tmp/audacity.tar.xz -L \
"https://github.com/audacity/audacity/releases/download/Audacity-${AUDACITY_VERSION}/audacity-minsrc-${AUDACITY_VERSION}.tar.xz" && \
tar xf \
/tmp/audacity.tar.xz -C \
/app/audacity --strip-components=1 && \
cd /app/audacity/build && \
cmake -DCMAKE_BUILD_TYPE=Release -Daudacity_use_wxwidgets=local -Daudacity_use_ffmpeg=loaded .. && \
make -j6 && \
make install
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:focal
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
ARG VERSION ARG VERSION
ARG AUDACITY_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca" LABEL maintainer="aptalca"
RUN \ RUN \
echo "**** install packages ****" && \ echo "**** install packages ****" && \
apk add --no-cache --virtual=build-dependencies \ apt-get update && \
curl && \ apt-get install -y \
if [ -z ${AUDACITY_VERSION+x} ]; then \ libasound2 \
AUDACITY_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ libavformat58 \
&& awk '/^P:audacity$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ libgtk2.0-0 \
fi && \ libjack-jackd2-0 \
apk add --no-cache \ python3-minimal && \
audacity==${AUDACITY_VERSION} && \ echo "**** cleanup ****" && \
echo "**** cleanup ****" && \ rm -rf \
apk del --purge \ /tmp/*
build-dependencies && \
rm -rf \
/tmp/*
# add local files # add local files
COPY /root / COPY /root /
COPY --from=buildstage /usr/local/share/audacity /usr/local/share/audacity
COPY --from=buildstage /usr/local/lib/audacity /usr/local/lib/audacity
COPY --from=buildstage /usr/local/bin/audacity /usr/local/bin/audacity
COPY --from=buildstage /app/audacity/build/bin/Release/locale /usr/local/share/locale
# ports and volumes # ports and volumes
EXPOSE 3000 EXPOSE 3000

View file

@ -1,30 +1,66 @@
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm64v8-alpine FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm64v8-focal as buildstage
ARG AUDACITY_VERSION
RUN \
echo "**** install build packages ****" && \
apt-get update && \
apt-get install -y \
build-essential \
cmake \
curl \
gcc \
git \
libasound2-dev \
libavformat-dev \
libgtk2.0-dev \
python3-minimal \
libjack-jackd2-dev && \
echo "**** build audacity ****" && \
if [ -z ${AUDACITY_VERSION+x} ]; then \
AUDACITY_VERSION=$(curl -sX GET "https://api.github.com/repos/audacity/audacity/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^Audacity-||'); \
fi && \
mkdir -p /app/audacity/build && \
curl -o \
/tmp/audacity.tar.xz -L \
"https://github.com/audacity/audacity/releases/download/Audacity-${AUDACITY_VERSION}/audacity-minsrc-${AUDACITY_VERSION}.tar.xz" && \
tar xf \
/tmp/audacity.tar.xz -C \
/app/audacity --strip-components=1 && \
cd /app/audacity/build && \
cmake -DCMAKE_BUILD_TYPE=Release -Daudacity_use_wxwidgets=local -Daudacity_use_ffmpeg=loaded .. && \
make -j6 && \
make install
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm64v8-focal
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
ARG VERSION ARG VERSION
ARG AUDACITY_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca" LABEL maintainer="aptalca"
RUN \ RUN \
echo "**** install packages ****" && \ echo "**** install packages ****" && \
apk add --no-cache --virtual=build-dependencies \ apt-get update && \
curl && \ apt-get install -y \
if [ -z ${AUDACITY_VERSION+x} ]; then \ libasound2 \
AUDACITY_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ libavformat58 \
&& awk '/^P:audacity$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ libgtk2.0-0 \
fi && \ libjack-jackd2-0 \
apk add --no-cache \ python3-minimal && \
audacity==${AUDACITY_VERSION} && \ echo "**** cleanup ****" && \
echo "**** cleanup ****" && \ rm -rf \
apk del --purge \ /tmp/*
build-dependencies && \
rm -rf \
/tmp/*
# add local files # add local files
COPY /root / COPY /root /
COPY --from=buildstage /usr/local/share/audacity /usr/local/share/audacity
COPY --from=buildstage /usr/local/lib/audacity /usr/local/lib/audacity
COPY --from=buildstage /usr/local/bin/audacity /usr/local/bin/audacity
COPY --from=buildstage /app/audacity/build/bin/Release/locale /usr/local/share/locale
# ports and volumes # ports and volumes
EXPOSE 3000 EXPOSE 3000

View file

@ -1,30 +1,66 @@
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm32v7-alpine FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm32v7-focal as buildstage
ARG AUDACITY_VERSION
RUN \
echo "**** install build packages ****" && \
apt-get update && \
apt-get install -y \
build-essential \
cmake \
curl \
gcc \
git \
libasound2-dev \
libavformat-dev \
libgtk2.0-dev \
python3-minimal \
libjack-jackd2-dev && \
echo "**** build audacity ****" && \
if [ -z ${AUDACITY_VERSION+x} ]; then \
AUDACITY_VERSION=$(curl -sX GET "https://api.github.com/repos/audacity/audacity/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^Audacity-||'); \
fi && \
mkdir -p /app/audacity/build && \
curl -o \
/tmp/audacity.tar.xz -L \
"https://github.com/audacity/audacity/releases/download/Audacity-${AUDACITY_VERSION}/audacity-minsrc-${AUDACITY_VERSION}.tar.xz" && \
tar xf \
/tmp/audacity.tar.xz -C \
/app/audacity --strip-components=1 && \
cd /app/audacity/build && \
cmake -DCMAKE_BUILD_TYPE=Release -Daudacity_use_wxwidgets=local -Daudacity_use_ffmpeg=loaded .. && \
make -j6 && \
make install
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm32v7-focal
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
ARG VERSION ARG VERSION
ARG AUDACITY_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca" LABEL maintainer="aptalca"
RUN \ RUN \
echo "**** install packages ****" && \ echo "**** install packages ****" && \
apk add --no-cache --virtual=build-dependencies \ apt-get update && \
curl && \ apt-get install -y \
if [ -z ${AUDACITY_VERSION+x} ]; then \ libasound2 \
AUDACITY_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ libavformat58 \
&& awk '/^P:audacity$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ libgtk2.0-0 \
fi && \ libjack-jackd2-0 \
apk add --no-cache \ python3-minimal && \
audacity==${AUDACITY_VERSION} && \ echo "**** cleanup ****" && \
echo "**** cleanup ****" && \ rm -rf \
apk del --purge \ /tmp/*
build-dependencies && \
rm -rf \
/tmp/*
# add local files # add local files
COPY /root / COPY /root /
COPY --from=buildstage /usr/local/share/audacity /usr/local/share/audacity
COPY --from=buildstage /usr/local/lib/audacity /usr/local/lib/audacity
COPY --from=buildstage /usr/local/bin/audacity /usr/local/bin/audacity
COPY --from=buildstage /app/audacity/build/bin/Release/locale /usr/local/share/locale
# ports and volumes # ports and volumes
EXPOSE 3000 EXPOSE 3000

18
Jenkinsfile vendored
View file

@ -23,10 +23,7 @@ pipeline {
DOCKERHUB_IMAGE = 'linuxserver/audacity' DOCKERHUB_IMAGE = 'linuxserver/audacity'
DEV_DOCKERHUB_IMAGE = 'lsiodev/audacity' DEV_DOCKERHUB_IMAGE = 'lsiodev/audacity'
PR_DOCKERHUB_IMAGE = 'lspipepr/audacity' PR_DOCKERHUB_IMAGE = 'lspipepr/audacity'
DIST_IMAGE = 'alpine' DIST_IMAGE = 'ubuntu'
DIST_TAG = '3.13'
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.13/community/'
DIST_REPO_PACKAGES = 'audacity'
MULTIARCH = 'true' MULTIARCH = 'true'
CI = 'true' CI = 'true'
CI_WEB = 'true' CI_WEB = 'true'
@ -101,15 +98,14 @@ pipeline {
/* ######################## /* ########################
External Release Tagging External Release Tagging
######################## */ ######################## */
// If this is an alpine repo change for external version determine an md5 from the version string // If this is a custom command to determine version use that command
stage("Set tag Alpine Repo"){ stage("Set tag custom bash"){
steps{ steps{
script{ script{
env.EXT_RELEASE = sh( env.EXT_RELEASE = sh(
script: '''curl -sL "${DIST_REPO}x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ script: ''' curl -sX GET https://api.github.com/repos/audacity/audacity/releases/latest | jq -r '.tag_name' | sed 's|^Audacity-||' ''',
&& awk '/^P:'"${DIST_REPO_PACKAGES}"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://' ''',
returnStdout: true).trim() returnStdout: true).trim()
env.RELEASE_LINK = 'alpine_repo' env.RELEASE_LINK = 'custom_command'
} }
} }
} }
@ -740,11 +736,11 @@ pipeline {
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' ''' "tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag" echo "Pushing New release for Tag"
sh '''#! /bin/bash 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}'",\ echo '{"tag_name":"'${META_TAG}'",\
"target_commitish": "main",\ "target_commitish": "main",\
"name": "'${META_TAG}'",\ "name": "'${META_TAG}'",\
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**Repo 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 printf '","draft": false,"prerelease": false}' >> releasebody.json
paste -d'\\0' start releasebody.json > releasebody.json.done 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''' curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''

View file

@ -2,7 +2,8 @@
# jenkins variables # jenkins variables
project_name: docker-audacity project_name: docker-audacity
external_type: alpine_repo external_type: na
custom_version_command: "curl -sX GET https://api.github.com/repos/audacity/audacity/releases/latest | jq -r '.tag_name' | sed 's|^Audacity-||'"
release_type: stable release_type: stable
release_tag: latest release_tag: latest
ls_branch: main ls_branch: main
@ -14,10 +15,7 @@ repo_vars:
- DOCKERHUB_IMAGE = 'linuxserver/audacity' - DOCKERHUB_IMAGE = 'linuxserver/audacity'
- DEV_DOCKERHUB_IMAGE = 'lsiodev/audacity' - DEV_DOCKERHUB_IMAGE = 'lsiodev/audacity'
- PR_DOCKERHUB_IMAGE = 'lspipepr/audacity' - PR_DOCKERHUB_IMAGE = 'lspipepr/audacity'
- DIST_IMAGE = 'alpine' - DIST_IMAGE = 'ubuntu'
- DIST_TAG = '3.13'
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.13/community/'
- DIST_REPO_PACKAGES = 'audacity'
- MULTIARCH = 'true' - MULTIARCH = 'true'
- CI = 'true' - CI = 'true'
- CI_WEB = 'true' - CI_WEB = 'true'

View file

@ -1 +1 @@
audacity LD_LIBRARY_PATH="/usr/local/lib/audacity" audacity