From ecfac9efce24d020fc0772b13574c805b8f229c6 Mon Sep 17 00:00:00 2001 From: aptalca Date: Sun, 20 Nov 2022 20:38:10 -0500 Subject: [PATCH] external trigger based on arch base releases --- .github/workflows/external_trigger.yml | 2 +- Jenkinsfile | 4 ++-- jenkins-vars.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index 34c4b57..fff0535 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -18,7 +18,7 @@ jobs: fi echo "**** External trigger running off of arch branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_BASEIMAGE_RDESKTOP_ARCH\". ****" echo "**** Retrieving external version ****" - EXT_RELEASE=$(curl -sL 'https://aur.archlinux.org/rpc/?v=5&type=info&arg[]=xorgxrdp&arg[]=xrdp&arg[]=pulseaudio-module-xrdp' | jq -r '.results[].Version' | tr -d '\n') + EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET 'https://api.github.com/repos/linuxserver/docker-baseimage-arch/releases/latest' | jq -r '. | .tag_name' | sed 's|-ls.*||') if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then echo "**** Can't retrieve external version, exiting ****" FAILURE_REASON="Can't retrieve external version for baseimage-rdesktop branch arch" diff --git a/Jenkinsfile b/Jenkinsfile index 2b122df..c74b5d8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0') GITLAB_NAMESPACE=credentials('gitlab-namespace-id') SCARF_TOKEN=credentials('scarf_api_key') - BUILD_VERSION_ARG = 'XRDP_VERSION' + BUILD_VERSION_ARG = 'BASE_VERSION' LS_USER = 'linuxserver' LS_REPO = 'docker-baseimage-rdesktop' CONTAINER_NAME = 'baseimage-rdesktop' @@ -104,7 +104,7 @@ pipeline { steps{ script{ env.EXT_RELEASE = sh( - script: ''' curl -sL 'https://aur.archlinux.org/rpc/?v=5&type=info&arg[]=xorgxrdp&arg[]=xrdp&arg[]=pulseaudio-module-xrdp' | jq -r '.results[].Version' | tr -d '\n' ''', + script: ''' curl -sX GET 'https://api.github.com/repos/linuxserver/docker-baseimage-arch/releases/latest' | jq -r '. | .tag_name' | sed 's|-ls.*||' ''', returnStdout: true).trim() env.RELEASE_LINK = 'custom_command' } diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 1d55946..2d0a2b6 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -3,12 +3,12 @@ # jenkins variables project_name: docker-baseimage-rdesktop external_type: na -custom_version_command: "curl -sL 'https://aur.archlinux.org/rpc/?v=5&type=info&arg[]=xorgxrdp&arg[]=xrdp&arg[]=pulseaudio-module-xrdp' | jq -r '.results[].Version' | tr -d '\\n'" +custom_version_command: "curl -sX GET 'https://api.github.com/repos/linuxserver/docker-baseimage-arch/releases/latest' | jq -r '. | .tag_name' | sed 's|-ls.*||'" release_type: prerelease release_tag: arch ls_branch: arch repo_vars: - - BUILD_VERSION_ARG = 'XRDP_VERSION' + - BUILD_VERSION_ARG = 'BASE_VERSION' - LS_USER = 'linuxserver' - LS_REPO = 'docker-baseimage-rdesktop' - CONTAINER_NAME = 'baseimage-rdesktop'