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 2, 2023
1 parent fad31ea commit 5ef9a0b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
36 changes: 20 additions & 16 deletions closed/get_j9_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ 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-credential the credential for downloading the GSKit and GSKit SDK from 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 @@ -212,28 +212,32 @@ fi
openjceplus_source="OpenJCEPlus"
if [ "${git_urls[$openjceplus_source]}" ]; then

echo
echo "$openjceplus_source exists, download ICC binaries"
echo
echo
echo "$openjceplus_source exists, download ICC binaries"
echo

cd $openjceplus_source
mkdir -p ./icc/jgsk_sdk/lib64/
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
else
echo "-with-gskit-bin-credential is empty, will add curl command HERE without credential once there are binaries in open repo."
fi
if [ $gskit_bin_credential ]; then
# Download GSKit binaries from artifactory
curl -vk -u "$gskit_bin_credential" -X GET $gskit_bin > ./icc/jgsk_crypto.tar
curl -vk -u "$gskit_bin_credential" -X GET $gskit_sdk_bin > ./icc/jgsk_crypto_sdk.tar
else
echo
echo "GSKit binaries are needed for compiling $openjceplus_source"
echo "Please set -with-gskit-bin, -with-gskit-sdk-bin, and -with-gskit-bin-credential"
exit 1
fi

tar -xf ./icc/jgsk_crypto_sdk.tar -C ./icc/
tar -xf ./icc/jgsk_crypto.tar -C ./icc/jgsk_sdk/lib64/

# Create OpenJCEPlus Java module folder
mkdir -p ./src/main/openjceplus/share/classes/
cp -r ./src/main/java/* ./src/main/openjceplus/share/classes/
# Create OpenJCEPlus Java module folder
mkdir -p ./src/main/openjceplus/share/classes/
cp -r ./src/main/java/* ./src/main/openjceplus/share/classes/

cd ..
cd ..
fi

END_TIME=$(date +%s)
Expand Down
2 changes: 1 addition & 1 deletion get_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ 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-credential the credential for downloading the GSKit and GSKit SDK from 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 Down

0 comments on commit 5ef9a0b

Please sign in to comment.