Skip to content

Commit

Permalink
Add the codes for download GSKit from Artifactory
Browse files Browse the repository at this point in the history
  • Loading branch information
taoliult committed Nov 1, 2023
1 parent fad31ea commit 8a34a5a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
18 changes: 13 additions & 5 deletions closed/get_j9_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ usage() {
echo " -openjceplus-reference a local repo to use as a clone reference"
echo " -with-gskit-bin the GSKit binary url"
echo " -with-gskit-sdk-bin the GSKIT SDK binary url"
echo " -with-gskit-bin-credential the credential for downloading the GSKit and GSKit SDK"
echo " -with-gskit-bin-username the username for downloading the GSKit and GSKit SDK from artifactory"
echo " -with-gskit-bin-credential the credential for downloading the GSKit and GSKit SDK from repository or artifactory"
echo " -parallel (boolean) if 'true' then the clone j9 repository commands run in parallel, default is false"
echo ""
exit 1
Expand Down Expand Up @@ -135,6 +136,10 @@ for i in "$@" ; do
gskit_sdk_bin="${i#*=}"
;;

-with-gskit-bin-username=* )
gskit_bin_username="${i#*=}"
;;

-with-gskit-bin-credential=* )
gskit_bin_credential="${i#*=}"
;;
Expand Down Expand Up @@ -219,11 +224,14 @@ if [ "${git_urls[$openjceplus_source]}" ]; then
cd $openjceplus_source
mkdir -p ./icc/jgsk_sdk/lib64/

if [ $gskit_bin_credential ]; then
curl -H "Authorization: Bearer $gskit_bin_credential" -H "Accept: application/octet-stream" -L $gskit_bin --output ./icc/jgsk_crypto.tar
curl -H "Authorization: Bearer $gskit_bin_credential" -H "Accept: application/octet-stream" -L $gskit_sdk_bin --output ./icc/jgsk_crypto_sdk.tar
if [ $gskit_bin_username ]; then
# $gskit_bin_username exist, download using username and token from artifactory
curl -vk -u "$gskit_bin_username:$gskit_bin_credential" -X GET $gskit_bin > ./icc/jgsk_crypto.tar
curl -vk -u "t$gskit_bin_username:$gskit_bin_credential" -X GET $gskit_sdk_bin > ./icc/jgsk_crypto_sdk.tar
else
echo "-with-gskit-bin-credential is empty, will add curl command HERE without credential once there are binaries in open repo."
# $gskit_bin_username doesn't exist, download using token from repository
curl -H "Authorization: Bearer $gskit_bin_credential" -H "Accept: application/octet-stream" -L $gskit_bin --output ./icc/jgsk_crypto.tar
curl -H "Authorization: Bearer $gskit_bin_credential" -H "Accept: application/octet-stream" -L $gskit_sdk_bin --output ./icc/jgsk_crypto_sdk.tar
fi

tar -xf ./icc/jgsk_crypto_sdk.tar -C ./icc/
Expand Down
5 changes: 3 additions & 2 deletions get_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ usage() {
echo " -openjceplus-reference a local repo to use as a clone reference"
echo " -with-gskit-bin the GSKit binary url"
echo " -with-gskit-sdk-bin the GSKIT SDK binary url"
echo " -with-gskit-bin-credential the credential for downloading the GSKit and GSKit SDK"
echo " -with-gskit-bin-username the username for downloading the GSKit and GSKit SDK from artifactory"
echo " -with-gskit-bin-credential the credential for downloading the GSKit and GSKit SDK from repository or artifactory"
echo " -parallel (boolean) if 'true' then the clone j9 repository commands run in parallel, default is false"
echo " --openssl-repo Specify the OpenSSL repository to download from"
echo " --openssl-version Specify the version of OpenSSL source to download"
Expand All @@ -64,7 +65,7 @@ for i in "$@" ; do
usage
;;

-openj9-repo=* | -openj9-branch=* | -openj9-sha=* | -openj9-reference=* | -omr-repo=* | -omr-branch=* | -omr-sha=* | -omr-reference=* | -openjceplus-repo=* | -openjceplus-branch=* | -openjceplus-sha=* | -openjceplus-reference=* | -with-gskit-bin=* | -with-gskit-sdk-bin=* | -with-gskit-bin-credential=* | -parallel=* )
-openj9-repo=* | -openj9-branch=* | -openj9-sha=* | -openj9-reference=* | -omr-repo=* | -omr-branch=* | -omr-sha=* | -omr-reference=* | -openjceplus-repo=* | -openjceplus-branch=* | -openjceplus-sha=* | -openjceplus-reference=* | -with-gskit-bin=* | -with-gskit-sdk-bin=* | -with-gskit-bin-username=* | -with-gskit-bin-credential=* | -parallel=* )
j9options="${j9options} ${i}"
;;

Expand Down

0 comments on commit 8a34a5a

Please sign in to comment.