From ee6b0c536fb4dd88d0554a7a061f521acacf8f26 Mon Sep 17 00:00:00 2001 From: Bryan Seay <42394778+bryanseay@users.noreply.github.com> Date: Tue, 23 Jul 2019 08:42:39 -0400 Subject: [PATCH] Pass in artifactory server to build script (#1458) --- scripts/build-probe-binaries | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/build-probe-binaries b/scripts/build-probe-binaries index 4cfe20ee5f..cd4357aaf7 100755 --- a/scripts/build-probe-binaries +++ b/scripts/build-probe-binaries @@ -41,6 +41,7 @@ if [ $# -ge 4 ]; then if [ "RHEL" = "$KERNEL_TYPE" ]; then INTERNAL_ARTIFACTORY_API_KEY=$5 + INTERNAL_ARTIFACTORY_SERVER=$6 fi fi @@ -752,14 +753,14 @@ elif [ "RHEL" = "$KERNEL_TYPE" ]; then echo Building RHEL from Stored Sources # We're using aql to query for all of the objects in the repo - JSON_RESULT=$(curl -H 'Content-Type: text/plain' -H "X-JFrog-Art-Api:$INTERNAL_ARTIFACTORY_API_KEY" -X POST -d 'items.find({"repo":"redhat-sources"})' https://artifactory.internal.sysdig.com/artifactory/api/search/aql) + JSON_RESULT=$(curl -H 'Content-Type: text/plain' -H "X-JFrog-Art-Api:$INTERNAL_ARTIFACTORY_API_KEY" -X POST -d 'items.find({"repo":"redhat-sources"})' https://$INTERNAL_ARTIFACTORY_SERVER/artifactory/api/search/aql) # Use jq to parse the json to get the rpms - URLS=$(echo "$JSON_RESULT"| jq -r '.results[].name as $o | $o | select(endswith(".rpm")) | "https://artifactory.internal.sysdig.com/artifactory/redhat-sources/" + $o') + URLS=$(echo "$JSON_RESULT"| jq -r '.results[].name as $o | $o | select(endswith(".rpm")) | $o') for URL in $URLS do - rhel_build $URL $INTERNAL_ARTIFACTORY_API_KEY + rhel_build https://$INTERNAL_ARTIFACTORY_SERVER/artifactory/redhat-sources/$URL $INTERNAL_ARTIFACTORY_API_KEY done elif [ "OL6-UEK" = "$KERNEL_TYPE" ]; then