From e7d7b08105ae9e542903b267f1db4b92c8445a8b Mon Sep 17 00:00:00 2001 From: thelamer Date: Fri, 5 Jul 2019 08:59:22 -0700 Subject: [PATCH 1/2] filter out pull requests from api response --- Jenkinsfile | 2 +- jenkins-vars.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5d52ad3..a06b256 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -104,7 +104,7 @@ pipeline { steps{ script{ env.EXT_RELEASE = sh( - script: ''' curl -sL GET https://ci.appveyor.com/api/projects/galli-leo/radarr-usby1/history?recordsNumber=100 | jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="aphrodite")) | .version' ''', + script: ''' curl -sL GET https://ci.appveyor.com/api/projects/galli-leo/radarr-usby1/history?recordsNumber=100 | jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="aphrodite") | select(.pullRequestId == null)) | .version' ''', returnStdout: true).trim() env.RELEASE_LINK = 'custom_command' } diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 2a619e1..c3185d6 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -3,7 +3,7 @@ # jenkins variables project_name: docker-radarr external_type: na -custom_version_command: curl -sL GET https://ci.appveyor.com/api/projects/galli-leo/radarr-usby1/history?recordsNumber=100 | jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="aphrodite")) | .version' +custom_version_command: curl -sL GET https://ci.appveyor.com/api/projects/galli-leo/radarr-usby1/history?recordsNumber=100 | jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="aphrodite") | select(.pullRequestId == null)) | .version' release_type: prerelease release_tag: preview ls_branch: preview From f2b1c7bc7c0780364a606503f51f76a72e4c763e Mon Sep 17 00:00:00 2001 From: thelamer Date: Fri, 5 Jul 2019 09:49:15 -0700 Subject: [PATCH 2/2] udpate dockerfiles also --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- Dockerfile.armhf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index be02fd3..57161f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN \ echo "**** install radarr ****" && \ if [ -z ${RADARR_RELEASE+x} ]; then \ RADARR_RELEASE=$(curl -sL GET https://ci.appveyor.com/api/projects/galli-leo/radarr-usby1/history?recordsNumber=100 | \ - jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="aphrodite")) | .version'); \ + jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="aphrodite") | select(.pullRequestId == null)) | .version'); \ fi && \ RADARR_JOBID=$(curl -s "https://ci.appveyor.com/api/projects/galli-leo/radarr-usby1/build/${RADARR_RELEASE}" | jq -jr '. | .build.jobs[0].jobId') \ RADARR_DURL="https://ci.appveyor.com/api/buildjobs/${RADARR_JOBID}/artifacts/_artifacts/Radarr.aphrodite.${RADARR_RELEASE}.linux.tar.gz"; \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 75a01c1..5319e01 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -19,7 +19,7 @@ RUN \ echo "**** install radarr ****" && \ if [ -z ${RADARR_RELEASE+x} ]; then \ RADARR_RELEASE=$(curl -sL GET https://ci.appveyor.com/api/projects/galli-leo/radarr-usby1/history?recordsNumber=100 | \ - jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="aphrodite")) | .version'); \ + jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="aphrodite") | select(.pullRequestId == null)) | .version'); \ fi && \ RADARR_JOBID=$(curl -s "https://ci.appveyor.com/api/projects/galli-leo/radarr-usby1/build/${RADARR_RELEASE}" | jq -jr '. | .build.jobs[0].jobId') \ RADARR_DURL="https://ci.appveyor.com/api/buildjobs/${RADARR_JOBID}/artifacts/_artifacts/Radarr.aphrodite.${RADARR_RELEASE}.linux.tar.gz"; \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 4ea29f5..f033c29 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -19,7 +19,7 @@ RUN \ echo "**** install radarr ****" && \ if [ -z ${RADARR_RELEASE+x} ]; then \ RADARR_RELEASE=$(curl -sL GET https://ci.appveyor.com/api/projects/galli-leo/radarr-usby1/history?recordsNumber=100 | \ - jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="aphrodite")) | .version'); \ + jq -r '. | first(.builds[] | select(.status == "success") | select(.branch =="aphrodite") | select(.pullRequestId == null)) | .version'); \ fi && \ RADARR_JOBID=$(curl -s "https://ci.appveyor.com/api/projects/galli-leo/radarr-usby1/build/${RADARR_RELEASE}" | jq -jr '. | .build.jobs[0].jobId') \ RADARR_DURL="https://ci.appveyor.com/api/buildjobs/${RADARR_JOBID}/artifacts/_artifacts/Radarr.aphrodite.${RADARR_RELEASE}.linux.tar.gz"; \