Skip to content

Commit

Permalink
Updates pick mongo versions from Jenkins for V3
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumar-vs committed Aug 12, 2024
1 parent 5819ed0 commit c5db84b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions pmm_qa/mlaunch_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ sleep 10
export SERVICE_RANDOM_NUMBER=$(echo $((1 + $RANDOM % 9999)))

### Detect latest tarball link for specified mongodb_version: 7.0 | 6.0 | 5.0 | 4.4 | 4.2 at the moment
psmdb_latest=$(wget -q --post-data "version=percona-server-mongodb-${mongodb_version}" https://www.percona.com/products-api.php -O - | grep -oP "(?<=value\=\")[^\"]*" | sort -V | tail -1)
psmdb_tarball=$(wget -q --post-data "version_files=${psmdb_latest}&software_files=binary" https://www.percona.com/products-api.php -O - | jq -r '.[] | select(.link | contains("sha") | not) | .link' | grep glibc2\.17-minimal)
# psmdb_latest=$(wget -q --post-data "version=percona-server-mongodb-${mongodb_version}" https://www.percona.com/products-api.php -O - | grep -oP "(?<=value\=\")[^\"]*" | sort -V | tail -1)
psmdb_tarball=$(wget -q --post-data "version_files=percona-server-mongodb-${mongodb_version}&software_files=binary" https://www.percona.com/products-api.php -O - | jq -r '.[] | select(.link | contains("sha") | not) | .link' | grep glibc2\.17-minimal)

echo "Downloading ${psmdb_latest} ..."
echo "Downloading ${mongodb_version} ..."
wget -O percona_server_mongodb.tar.gz ${psmdb_tarball}
tar -xvf percona_server_mongodb.tar.gz

Expand All @@ -51,7 +51,7 @@ mv ${extracted_folder_name} psmdb_${mongodb_version}
if [[ "$mongodb_version" == "6.0" || "$mongodb_version" == "7.0" ]]; then
### PSMDB 6+ requires "percona-mongodb-mongosh" additionally
echo "Downloading mongosh ..."
mongosh_link=$(wget -q --post-data "version_files=${psmdb_latest}&software_files=binary" https://www.percona.com/products-api.php -O - | jq -r '.[] | select(.link | contains("sha") | not) | .link' | grep mongosh)
mongosh_link=$(wget -q --post-data "version_files=percona-server-mongodb-${mongodb_version}&software_files=binary" https://www.percona.com/products-api.php -O - | jq -r '.[] | select(.link | contains("sha") | not) | .link' | grep mongosh)
wget -O mongosh.tar.gz ${mongosh_link}
tar -xvf mongosh.tar.gz
mv percona-mongodb-mongosh* mongosh
Expand Down
8 changes: 4 additions & 4 deletions pmm_qa/tls-ssl-setup/mongodb/mlaunch_ssl_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ fi

wget https://raw.githubusercontent.com/percona/pmm-qa/main/pmm-tests/mongodb_user_setup.js
### Detect latest tarball link for specified mongodb_version: 7.0 | 6.0 | 5.0 | 4.4 | 4.2 at the moment
psmdb_latest=$(wget -q --post-data "version=percona-server-mongodb-${mongodb_version}" https://www.percona.com/products-api.php -O - | grep -oP "(?<=value\=\")[^\"]*" | sort -V | tail -1)
psmdb_tarball=$(wget -q --post-data "version_files=${psmdb_latest}&software_files=binary" https://www.percona.com/products-api.php -O - | jq -r '.[] | select(.link | contains("sha") | not) | .link' | grep glibc2\.17-minimal)
#psmdb_latest=$(wget -q --post-data "version=percona-server-mongodb-${mongodb_version}" https://www.percona.com/products-api.php -O - | grep -oP "(?<=value\=\")[^\"]*" | sort -V | tail -1)
psmdb_tarball=$(wget -q --post-data "version_files=percona-server-mongodb-${mongodb_version}&software_files=binary" https://www.percona.com/products-api.php -O - | jq -r '.[] | select(.link | contains("sha") | not) | .link' | grep glibc2\.17-minimal)

echo "Downloading ${psmdb_latest} ..."
echo "Downloading ${mongodb_version} ..."
wget -O percona_server_mongodb.tar.gz ${psmdb_tarball}
tar -xvf percona_server_mongodb.tar.gz
rm percona_server_mongodb.tar.gz*
Expand All @@ -27,7 +27,7 @@ mv percona-server-mongodb-${mongodb_version}.* psmdb_${mongodb_version}
if [[ "$mongodb_version" == "6.0" || "$mongodb_version" == "7.0" ]]; then
### PSMDB 6+ requires "percona-mongodb-mongosh" additionally
echo "Downloading mongosh ..."
mongosh_link=$(wget -q --post-data "version_files=${psmdb_latest}&software_files=binary" https://www.percona.com/products-api.php -O - | jq -r '.[] | select(.link | contains("sha") | not) | .link' | grep mongosh)
mongosh_link=$(wget -q --post-data "version_files=percona-server-mongodb-${mongodb_version}&software_files=binary" https://www.percona.com/products-api.php -O - | jq -r '.[] | select(.link | contains("sha") | not) | .link' | grep mongosh)
wget -O mongosh.tar.gz ${mongosh_link}
tar -xvf mongosh.tar.gz
mv percona-mongodb-mongosh* mongosh
Expand Down

0 comments on commit c5db84b

Please sign in to comment.