Skip to content

Commit

Permalink
Pass in artifactory server to build script (#1458)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanseay authored Jul 23, 2019
1 parent 061874d commit ee6b0c5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/build-probe-binaries
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ if [ $# -ge 4 ]; then

if [ "RHEL" = "$KERNEL_TYPE" ]; then
INTERNAL_ARTIFACTORY_API_KEY=$5
INTERNAL_ARTIFACTORY_SERVER=$6
fi
fi

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ee6b0c5

Please sign in to comment.