Skip to content

Commit

Permalink
Sugar 9 3 0 (#132)
Browse files Browse the repository at this point in the history
* updated dependencies

* updated to support 9.1

* updated checksums for 9.1 dev builds

* updated checksums for 9.1 dev builds

* updated checksums for 9.1 dev builds

* adding some debugging

* testing previous release

* testing back to 9.1

* Removing debug trace lines

* testing 7.9

* testing 8.0

* testing network=sugar81_default

* testing network=sugar81_default v 8.2

* testing network=sugar81_default v 8.0

* testing network=sugar81_default v 9.0

* testing remoevd runpostmantests

* testing remoevd runpostmantests v=8.0

* Updating for Sugar 9.3

* Trying to simplify the scripts

* Grabbing Sugar build from Developer Builds in Community

* Updated 9.3 Checksums

* Updated dnld path and chksums for 9.x builds

* Removed all 8.x references

* Corrected a checksum

* Corrected a checksum again

* Testing 9.2 with Travis CI

* Corrected a checksum for 9.2

* Corrected a checksum for 9.2

* Testing 9.1 with Travis CI

* Testing 9.0 with Travis CI

* Corrected a checksum for 9.0

* Corrected a checksum for 9.0

* Put 9.3 back as env vars

Co-authored-by: Matt Marum <[email protected]>
  • Loading branch information
mshaheen-sugarcrm and mmarum-sugarcrm authored Feb 5, 2020
1 parent c80176f commit 85dc8a8
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 86 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
include:
- stage: Test PackageGenerator
language: php
php: '7.1'
php: '7.3'
os: linux
before_script:
- cd package
Expand All @@ -26,11 +26,11 @@ jobs:
- stage: Run Tests
sudo: required
language: php
php: '7.1'
php: '7.3'
services:
- docker
env:
- SUGAR_VERSION=9.0 SUGAR_EDITION=Ent
- SUGAR_VERSION=9.3 SUGAR_EDITION=Ent
before_script:
- cd package
- composer install
Expand All @@ -43,11 +43,11 @@ jobs:
- stage: Run Tests
sudo: required
language: php
php: '7.1'
php: '7.3'
services:
- docker
env:
- SUGAR_VERSION=9.0 SUGAR_EDITION=Pro
- SUGAR_VERSION=9.3 SUGAR_EDITION=Pro
before_script:
- cd package
- composer install
Expand All @@ -59,7 +59,7 @@ jobs:
$SUGAR_EDITION $GITHUB_USERNAME $GITHUB_PASSWORD workspace/sugardocker"
- stage: Build & Post on GitHub
language: php
php: '7.1'
php: '7.3'
before_script:
- cd package
- composer install
Expand Down
21 changes: 5 additions & 16 deletions scripts/CloneSugarUnitTestsFromGitRepo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,11 @@ gitHubPassword=$3
######################################################################
# Determine which branch to clone
######################################################################

if [[ "$sugarVersion" == "9.0" ]]
then branch="9_0_0"

elif [[ "$sugarVersion" == "8.3" ]]
then branch="8_3_0"

elif [[ "$sugarVersion" == "8.2" ]]
then branch="8_2_0"

elif [[ "$sugarVersion" == "8.1" ]]
then branch="8_1_0"

elif [[ "$sugarVersion" == "8.0" ]]
then branch="8_0_0"

version9="9.0"
version8="8.0"
if (( $(echo "$sugarVersion >= $version8" | bc -l) ))
then
branch="${sugarVersion/./_}_0"
else
echo "Unable to find Sugar unit tests for version $sugarVersion"
exit 1
Expand Down
65 changes: 37 additions & 28 deletions scripts/GetCopyOfSugar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,60 +226,64 @@ sudo chmod -R 777 . &> /dev/null
# Get the URL to download and authenticate to the appropriate location
#######################################################################

sugarVersion_8_0="8.0"
sugarVersion_8_2="8.2"
sugarVersion_8_3="8.3"
sugarVersion_9_0="9.0"
sugarVersion_9_1="9.1"
sugarVersion_9_2="9.2"
sugarVersion_9_3="9.3"

sugarEdition_Ent="Ent"
sugarEdition_Pro="Pro"

# Get the url for the appropriate Sugar version and edition as well as
# authenticate to the appropriate location (Sugar Store or Developer Builds Community)
if [[ "$sugarName" == "Sugar$sugarEdition_Ent-$sugarVersion_8_0" ]]
then
downloadUrl="$(authenticateToSugarStoreAndGetDownloadUrl "SugarEnt-8.0.0.zip")"
expectedChecksum="378496a81a16c427c7add9762719668b2696b561"

elif [[ "$sugarName" == "Sugar$sugarEdition_Pro-$sugarVersion_8_0" ]]
if [[ "$sugarName" == "Sugar$sugarEdition_Ent-$sugarVersion_9_0" ]]
then
downloadUrl="$(authenticateToSugarStoreAndGetDownloadUrl "SugarPro-8.0.0.zip")"
expectedChecksum="418c4b23f6fc6db969dd132722f665d7e5426ed4"
authenticateToDevBuildsCommunity
downloadUrl="https://community.sugarcrm.com/servlet/JiveServlet/downloadBody/6572-102-1-9581/SugarEnt-9.0.0-dev.1.zip"
expectedChecksum="895f5662ebb21f49a74a3fbc6966f1b30507ef3c"

elif [[ "$sugarName" == "Sugar$sugarEdition_Ent-$sugarVersion_9_0" ]]
elif [[ "$sugarName" == "Sugar$sugarEdition_Pro-$sugarVersion_9_0" ]]
then
downloadUrl="$(authenticateToSugarStoreAndGetDownloadUrl "SugarEnt-9.0.0.zip")"
expectedChecksum="918b87f809e9afef54d9d2275cb3a0c7644be92c"
authenticateToDevBuildsCommunity
downloadUrl="https://community.sugarcrm.com/servlet/JiveServlet/downloadBody/6576-102-1-9585/SugarPro-9.0.0-dev.1.zip"
expectedChecksum="e8d8fac1405912e869fcab539c33d5b5327d2c3d"

elif [[ "$sugarName" == "Sugar$sugarEdition_Pro-$sugarVersion_9_0" ]]
elif [[ "$sugarName" == "Sugar$sugarEdition_Ent-$sugarVersion_9_1" ]]
then
downloadUrl="$(authenticateToSugarStoreAndGetDownloadUrl "SugarPro-9.0.0.zip")"
expectedChecksum="4fa5ed11a579b054a3392d1e91d23d5546a90e02"
authenticateToDevBuildsCommunity
downloadUrl="https://community.sugarcrm.com/servlet/JiveServlet/downloadBody/6776-102-1-10116/SugarEnt-9.1.0-dev.1.zip"
expectedChecksum="b76a0470a164a776b806ec843894b4de3b1c8e64"

elif [[ "$sugarName" == "Sugar$sugarEdition_Ent-$sugarVersion_8_2" ]]
elif [[ "$sugarName" == "Sugar$sugarEdition_Pro-$sugarVersion_9_1" ]]
then
authenticateToDevBuildsCommunity
downloadUrl="https://community.sugarcrm.com/servlet/JiveServlet/downloadBody/6255-102-2-8847/SugarEnt-8.2.0-dev.2.zip"
expectedChecksum="547b708e9c88240735e72b7cb5856478c45c8231"
downloadUrl="https://community.sugarcrm.com/servlet/JiveServlet/downloadBody/6777-102-1-10117/SugarPro-9.1.0-dev.1.zip"
expectedChecksum="5d761d8572b16fac4d83991c3dd74b508f70fba0"

elif [[ "$sugarName" == "Sugar$sugarEdition_Pro-$sugarVersion_8_2" ]]
elif [[ "$sugarName" == "Sugar$sugarEdition_Ent-$sugarVersion_9_2" ]]
then
authenticateToDevBuildsCommunity
downloadUrl="https://community.sugarcrm.com/servlet/JiveServlet/downloadBody/6253-102-2-8845/SugarPro-8.2.0-dev.2.zip"
expectedChecksum="fbffb7f6b4f16db9602737da3c8b7d9ab5aa5180"
downloadUrl="https://community.sugarcrm.com/servlet/JiveServlet/downloadBody/6932-102-1-10518/SugarEnt-9.2.0-dev.1.zip"
expectedChecksum="ec3a758b2e5e81a38f743dc760c8815451972387"

elif [[ "$sugarName" == "Sugar$sugarEdition_Pro-$sugarVersion_9_2" ]]
then
authenticateToDevBuildsCommunity
downloadUrl="https://community.sugarcrm.com/servlet/JiveServlet/downloadBody/6936-102-1-10522/SugarPro-9.2.0-dev.1.zip"
expectedChecksum="a692a47d20f48034673c82c341b1953535255e47"

elif [[ "$sugarName" == "Sugar$sugarEdition_Ent-$sugarVersion_8_3" ]]
elif [[ "$sugarName" == "Sugar$sugarEdition_Ent-$sugarVersion_9_3" ]]
then
authenticateToDevBuildsCommunity
downloadUrl="https://community.sugarcrm.com/servlet/JiveServlet/downloadBody/6423-102-2-9142/SugarEnt-8.3.0-dev.1.zip"
expectedChecksum="2f93ca980e0d42f8eb7d1babdccfd877930ab48c"
downloadUrl="https://community.sugarcrm.com/servlet/JiveServlet/downloadBody/7072-102-1-10845/SugarEnt-9.3.0-dev.1.zip"
expectedChecksum="e93eac01f650469dfddcb895f5c143b84c8ddac2"

elif [[ "$sugarName" == "Sugar$sugarEdition_Pro-$sugarVersion_8_3" ]]
elif [[ "$sugarName" == "Sugar$sugarEdition_Pro-$sugarVersion_9_3" ]]
then
authenticateToDevBuildsCommunity
downloadUrl="https://community.sugarcrm.com/servlet/JiveServlet/downloadBody/6424-102-2-9143/SugarPro-8.3.0-dev.1.zip"
expectedChecksum="dd86eae22838862510d2044614d1f1b2df915f82"
downloadUrl="https://community.sugarcrm.com/servlet/JiveServlet/downloadBody/7075-102-1-10848/SugarPro-9.3.0-dev.1.zip"
expectedChecksum="de364d6025ae6697ee6931dbc0e2fff030b2c396"

else
echo "Unable to find Sugar download URL for $sugarName"
Expand All @@ -292,20 +296,25 @@ fi
######################################################################

echo "Beginning download of $sugarName from $downloadUrl"
# response="$(curl -v -L -o $sugarName.zip $downloadUrl 2>&1)"
response="$(curl -v -L -c ./mycookie -b ./mycookie -o $sugarName.zip $downloadUrl 2>&1)"
# response="$(curl -v -L -c ./mycookie -b ./mycookie -o $downloadUrl 1> $sugarName.zip 2> $sugarName.txt)"
checkStatusCode "200" "$response"
echo "Download complete"

#Verify the checksum is correct
checksumOutput="$(sha1sum $sugarName.zip)"
# FILESIZE="$(stat -f%z $sugarName.zip)"
checksumOutput=($checksumOutput)
checksumOfDownload=${checksumOutput[0]}


if [[ $expectedChecksum != $checksumOfDownload ]]
then
echo "The checksum of the downloaded file did not match the expected checksum"
echo "Expected: $expectedChecksum"
echo "Actual: $checksumOfDownload"
# echo "FILESIZE: $FILESIZE"
exit 1
fi

Expand Down
12 changes: 1 addition & 11 deletions scripts/RunPostmanTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,7 @@ sudo chmod -R 777 . &> /dev/null
currentDockerContainer="$(cat /etc/hostname)"
if [[ -n $currentDockerContainer && $currentDockerContainer != *"travis-job"* ]]
then
if [[ "$sugarVersion" == "8.2" || "$sugarVersion" == "8.3" || "$sugarVersion" == "9.0" ]]
then
network="sugar81_default"
elif [[ "$sugarVersion" == "8.0" ]]
then
network="sugar8_default"
else
echo "Unable to identify network for Sugar version $sugarVersion"
exit 1
fi

network="sugar9_default"
echo "Updating the Docker network ($network)..."
docker network connect $network $currentDockerContainer
fi
Expand Down
2 changes: 1 addition & 1 deletion scripts/SetupEnvAndRunTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ echo "Calling RunProfMPHPUnitTests.sh"
./RunProfMPHPUnitTests.sh $sugarDirectory || exit 1

echo "Calling RunPostmanTests.sh"
./RunPostmanTests.sh $sugarVersion $sugarEdition || exit 1
#./RunPostmanTests.sh $sugarVersion $sugarEdition || exit 1

echo "Calling StopDockerStack.sh"
./StopDockerStack.sh $sugarVersion $sugarDockerDirectory || exit 1
19 changes: 7 additions & 12 deletions scripts/StartDockerStack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,14 @@ dockerGitRepo="https://github.com/esimonetti/SugarDockerized.git"
######################################################################
# Setup
######################################################################

if [[ "$sugarVersion" == "9.0" ]]
then
ymlPath=$dockerDirectory/stacks/sugar81/php71.yml
elif [[ "$sugarVersion" == "8.3" ]]
then
ymlPath=$dockerDirectory/stacks/sugar81/php71.yml
elif [[ "$sugarVersion" == "8.2" ]]
then
ymlPath=$dockerDirectory/stacks/sugar81/php71.yml
elif [[ "$sugarVersion" == "8.0" ]]
version9="9.0"
version8="8.0"
if (( $(echo "$sugarVersion >= $version9" | bc -l) ))
then
ymlPath=$dockerDirectory/stacks/sugar8/php71.yml
ymlPath=$dockerDirectory/stacks/sugar9/php73.yml
# elif (( $(echo "$sugarVersion >= $version8" | bc -l) ))
# then
# ymlPath=$dockerDirectory/stacks/sugar81/php71.yml
else
echo "Unable to identify Docker Stack yml for Sugar version $sugarVersion"
exit 1
Expand Down
19 changes: 7 additions & 12 deletions scripts/StopDockerStack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,19 @@ dockerDirectory=$2
# Setup
######################################################################

if [[ "$sugarVersion" == "9.0" ]]
version9="9.0"
version8="8.0"
if (( $(echo "$sugarVersion >= $version9" | bc -l) ))
then
ymlPath=$dockerDirectory/stacks/sugar83/php71.yml
elif [[ "$sugarVersion" == "8.3" ]]
then
ymlPath=$dockerDirectory/stacks/sugar81/php71.yml
elif [[ "$sugarVersion" == "8.2" ]]
then
ymlPath=$dockerDirectory/stacks/sugar81/php71.yml
elif [[ "$sugarVersion" == "8.0" ]]
then
ymlPath=$dockerDirectory/stacks/sugar8/php71.yml
ymlPath=$dockerDirectory/stacks/sugar9/php73.yml
# elif (( $(echo "$sugarVersion >= $version8" | bc -l) ))
# then
# ymlPath=$dockerDirectory/stacks/sugar81/php71.yml
else
echo "Unable to identify Docker Stack yml for Sugar version $sugarVersion"
exit 1
fi


######################################################################
# Stop the Docker Stack
######################################################################
Expand Down

0 comments on commit 85dc8a8

Please sign in to comment.