Merge pull request #69 from linuxserver/nightly-wf

custom trigger to limit builds to every 6 hrs
This commit is contained in:
aptalca
2020-11-24 20:47:30 -05:00
committed by GitHub
2 changed files with 4 additions and 0 deletions

View File

@@ -65,6 +65,9 @@ jobs:
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-jellyfin/job/nightly/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 ****"
exit 0
elif [[ $(( $(date +%s%3N) - $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-jellyfin/job/nightly/lastBuild/api/json | jq -r '.timestamp') )) -lt $(( 6 * 3600000 )) ]]; then
echo "**** New version ${EXT_RELEASE} found; but the last build was less than 6 hours ago; skipping trigger ****"
exit 0
else
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
response=$(curl -iX POST \

View File

@@ -7,6 +7,7 @@ custom_version_command: "curl -sX GET https://repo.jellyfin.org/ubuntu/dists/foc
release_type: prerelease
release_tag: nightly
ls_branch: nightly
external_trigger_delay_hours: 6
repo_vars:
- BUILD_VERSION_ARG = 'JELLYFIN_RELEASE'
- LS_USER = 'linuxserver'