From a1853ebc17a38ea8502a8872249ce26e59d7bc24 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:27:12 -0400 Subject: [PATCH] check for assets in external trigger --- jenkins-vars.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 9cb68528..17f3e019 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -6,7 +6,13 @@ external_type: custom_json release_type: prerelease release_tag: beta ls_branch: beta -custom_external_trigger: true +external_artifact_check: | + assets=$(curl -u "${{ '{{' }} secrets.CR_USER {{ '}}' }}:${{ '{{' }} secrets.CR_PAT {{ '}}' }}" -sX GET "https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/tags/${EXT_RELEASE}" | jq -r '.assets[].browser_download_url') + if grep -q "emby-server-deb_${EXT_RELEASE}_arm64.deb$" <<< "${assets}" && grep -q "emby-server-deb_${EXT_RELEASE}_amd64.deb$" <<< "${assets}"; then + artifacts_found="true" + else + artifacts_found="false" + fi repo_vars: - JSON_URL = 'https://api.github.com/repos/MediaBrowser/Emby.Releases/releases' - JSON_PATH = 'first(.[] | select(.prerelease==true )) | .tag_name'