From b160c7709f2f2ea3ec24802cfba5e5d8b10a9d6e Mon Sep 17 00:00:00 2001 From: thelamer Date: Fri, 12 Dec 2025 09:17:09 -0500 Subject: [PATCH] update trigger to use rpc --- .github/workflows/external_trigger.yml | 3 ++- Jenkinsfile | 3 ++- jenkins-vars.yml | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index 580cf5a..bc84852 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -29,7 +29,8 @@ jobs: echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY echo "> External trigger running off of master branch. To disable this trigger, add \`citron_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 -sL https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=citron | awk -F'=' '/^pkgver=/ {print $2}') + EXT_RELEASE=$(curl -s 'https://aur.archlinux.org/rpc/v5/info?arg[]=citron' | jq -r '.results[] | select(.Name == "citron") | .Version' +) echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY if grep -q "^citron_master_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY diff --git a/Jenkinsfile b/Jenkinsfile index 2b60067..473b33d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -147,7 +147,8 @@ pipeline { steps{ script{ env.EXT_RELEASE = sh( - script: ''' curl -sL https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=citron | awk -F'=' '/^pkgver=/ {print $2}' ''', + script: ''' curl -s 'https://aur.archlinux.org/rpc/v5/info?arg[]=citron' | jq -r '.results[] | select(.Name == "citron") | .Version' + ''', returnStdout: true).trim() env.RELEASE_LINK = 'custom_command' } diff --git a/jenkins-vars.yml b/jenkins-vars.yml index f09cc6f..4c0f31e 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -3,7 +3,8 @@ # jenkins variables project_name: docker-citron external_type: na -custom_version_command: "curl -sL https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=citron | awk -F'=' '/^pkgver=/ {print $2}'" +custom_version_command: | + curl -s 'https://aur.archlinux.org/rpc/v5/info?arg[]=citron' | jq -r '.results[] | select(.Name == "citron") | .Version' release_type: stable release_tag: latest ls_branch: master