diff --git a/.editorconfig b/.editorconfig old mode 100755 new mode 100644 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md old mode 100755 new mode 100644 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml old mode 100755 new mode 100644 diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml old mode 100755 new mode 100644 diff --git a/.github/ISSUE_TEMPLATE/issue.bug.yml b/.github/ISSUE_TEMPLATE/issue.bug.yml old mode 100755 new mode 100644 diff --git a/.github/ISSUE_TEMPLATE/issue.feature.yml b/.github/ISSUE_TEMPLATE/issue.feature.yml old mode 100755 new mode 100644 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md old mode 100755 new mode 100644 diff --git a/.github/workflows/call_issue_pr_tracker.yml b/.github/workflows/call_issue_pr_tracker.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/call_issues_cron.yml b/.github/workflows/call_issues_cron.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml old mode 100755 new mode 100644 index 869fa04..d1fad1c --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -29,8 +29,8 @@ jobs: echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY echo "> External trigger running off of master branch. To disable this trigger, add \`mstream_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY - EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/IrosTheBeggar/mStream/releases/latest" | jq -r '. | .tag_name') - echo "Type is \`github_stable\`" >> $GITHUB_STEP_SUMMARY + EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/IrosTheBeggar/mStream/releases | jq -r '.[] | select(.prerelease != true) | select(.tag_name | contains("DESKTOP") | not) .tag_name' | head -1) + echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY if grep -q "^mstream_master_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/external_trigger_scheduler.yml b/.github/workflows/external_trigger_scheduler.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/package_trigger_scheduler.yml b/.github/workflows/package_trigger_scheduler.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/permissions.yml b/.github/workflows/permissions.yml old mode 100755 new mode 100644 diff --git a/Dockerfile b/Dockerfile index 438e9e9..c8eb433 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,16 +14,18 @@ ENV HOME="/config" RUN \ echo "**** install runtime packages ****" && \ apk add --no-cache --upgrade \ + ffmpeg \ nodejs \ - openssl && \ + openssl \ + yt-dlp && \ apk add --no-cache --upgrade --virtual=build-dependencies \ npm && \ echo "**** install app ****" && \ mkdir -p \ /app/mstream && \ if [ -z ${MSTREAM_RELEASE+x} ]; then \ - MSTREAM_RELEASE=$(curl -sX GET "https://api.github.com/repos/IrosTheBeggar/mStream/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + MSTREAM_RELEASE=$(curl -sX GET https://api.github.com/repos/IrosTheBeggar/mStream/releases \ + | jq -r '.[] | select(.prerelease != true) | select(.tag_name | contains("DESKTOP") | not) .tag_name' | head -1); \ fi && \ curl -o \ /tmp/mstream.tar.gz -L \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index b7c3815..52380f0 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -14,16 +14,18 @@ ENV HOME="/config" RUN \ echo "**** install runtime packages ****" && \ apk add --no-cache --upgrade \ + ffmpeg \ nodejs \ - openssl && \ + openssl \ + yt-dlp && \ apk add --no-cache --upgrade --virtual=build-dependencies \ npm && \ echo "**** install app ****" && \ mkdir -p \ /app/mstream && \ if [ -z ${MSTREAM_RELEASE+x} ]; then \ - MSTREAM_RELEASE=$(curl -sX GET "https://api.github.com/repos/IrosTheBeggar/mStream/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + MSTREAM_RELEASE=$(curl -sX GET https://api.github.com/repos/IrosTheBeggar/mStream/releases \ + | jq -r '.[] | select(.prerelease != true) | select(.tag_name | contains("DESKTOP") | not) .tag_name' | head -1); \ fi && \ curl -o \ /tmp/mstream.tar.gz -L \ diff --git a/Jenkinsfile b/Jenkinsfile index 63e75b9..17785e3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,9 +19,6 @@ pipeline { DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat') QUAYIO_API_TOKEN=credentials('quayio-repo-api-token') GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f') - EXT_GIT_BRANCH = 'master' - EXT_USER = 'IrosTheBeggar' - EXT_REPO = 'mStream' BUILD_VERSION_ARG = 'MSTREAM_RELEASE' LS_USER = 'linuxserver' LS_REPO = 'docker-mstream' @@ -146,23 +143,16 @@ pipeline { /* ######################## External Release Tagging ######################## */ - // If this is a stable github release use the latest endpoint from github to determine the ext tag - stage("Set ENV github_stable"){ - steps{ - script{ - env.EXT_RELEASE = sh( - script: '''curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''', - returnStdout: true).trim() - } - } - } - // If this is a stable or devel github release generate the link for the build message - stage("Set ENV github_link"){ - steps{ - script{ - env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE - } - } + // 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 -sX GET https://api.github.com/repos/IrosTheBeggar/mStream/releases | jq -r '.[] | select(.prerelease != true) | select(.tag_name | contains("DESKTOP") | not) .tag_name' | head -1 ''', + returnStdout: true).trim() + env.RELEASE_LINK = 'custom_command' + } + } } // Sanitize the release tag and strip illegal docker or github characters stage("Sanitize tag"){ @@ -1032,7 +1022,7 @@ pipeline { "type": "commit",\ "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' echo "Pushing New release for Tag" - curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. |.body' > releasebody.json + echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json jq -n \ --arg tag_name "$META_TAG" \ --arg target_commitish "master" \ diff --git a/README.md b/README.md index 4a017af..81da0fd 100644 --- a/README.md +++ b/README.md @@ -282,6 +282,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **07.04.26:** - Add ffmpeg and yt-dlp. * **06.04.26:** - Rebase to Alpine 3.23. * **27.06.24:** - Rebase to Alpine 3.20. * **12.12.23:** - Rebase to Alpine 3.19, move binaries to /app. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 75f882c..e1530be 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -1,14 +1,12 @@ --- # jenkins variables project_name: docker-mstream -external_type: github_stable +external_type: na +custom_version_command: "curl -sX GET https://api.github.com/repos/IrosTheBeggar/mStream/releases | jq -r '.[] | select(.prerelease != true) | select(.tag_name | contains(\"DESKTOP\") | not) .tag_name' | head -1" release_type: stable release_tag: latest ls_branch: master repo_vars: - - EXT_GIT_BRANCH = 'master' - - EXT_USER = 'IrosTheBeggar' - - EXT_REPO = 'mStream' - BUILD_VERSION_ARG = 'MSTREAM_RELEASE' - LS_USER = 'linuxserver' - LS_REPO = 'docker-mstream' diff --git a/readme-vars.yml b/readme-vars.yml index f4d5f0c..4497971 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -72,6 +72,7 @@ init_diagram: | "mstream:latest" <- Base Images # changelog changelogs: + - {date: "07.04.26:", desc: "Add ffmpeg and yt-dlp."} - {date: "06.04.26:", desc: "Rebase to Alpine 3.23."} - {date: "27.06.24:", desc: "Rebase to Alpine 3.20."} - {date: "12.12.23:", desc: "Rebase to Alpine 3.19, move binaries to /app."}