-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2174 from HHS/main
[Prod] DevOps: Fail Fast, update python, cimg Namespace, & Backup production DB on each deploy
- Loading branch information
Showing
34 changed files
with
2,405 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# check_node_version_compatibility.sh | ||
# Script to fetch the required Node.js version and compare with buildpack | ||
|
||
# Read Node.js version from .nvmrc file at the root of the project and remove carriage returns and new lines | ||
node_version_required=$(cat .nvmrc | tr -d '\r' | tr -d '\n') | ||
|
||
# Fetch the latest release data from GitHub | ||
latest_release_info=$(curl -s https://api.github.com/repos/cloudfoundry/nodejs-buildpack/releases/latest) | ||
|
||
# Parse the release data to extract supported Node.js versions using jq, grep, awk, and sort | ||
supported_versions=$(echo "$latest_release_info" | jq -r '.body' | grep 'node' | awk '{print $4}' | grep -vP '[^.0-9]' | sort -u) | ||
|
||
# Check if the required version is supported by iterating over the array | ||
version_found=0 | ||
for version in $supported_versions; do | ||
echo "Checking if $version == $node_version_required" | ||
if [[ "$version" == "$node_version_required" ]]; then | ||
version_found=1 | ||
break | ||
fi | ||
done | ||
|
||
echo "" | ||
|
||
if [[ $version_found -eq 1 ]]; then | ||
echo "Required Node.js version $node_version_required is supported." | ||
exit 0 # Exit with success | ||
else | ||
echo "Required Node.js version $node_version_required is not supported." | ||
echo "Supported Versions:" | ||
echo "$supported_versions" | ||
exit 1 # Exit with error | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# check_python_version_compatibility.sh | ||
# Script to fetch the required Python version and compare with buildpack | ||
|
||
# Read Python version from .python-version file | ||
python_version_required=$(cat similarity_api/.python-version | tr -d '\r' | tr -d '\n') | ||
|
||
# Fetch the latest release data from GitHub | ||
latest_release_info=$(curl -s https://api.github.com/repos/cloudfoundry/python-buildpack/releases/latest) | ||
|
||
# Parse the release data to extract supported Python versions using jq, grep, awk, and sort | ||
supported_versions=$(echo "$latest_release_info" | jq -r '.body' | grep python | awk '{print $4}' | grep -vP '[^.0-9]' | sort -u) | ||
|
||
# Check if the required version is supported by iterating over the array | ||
version_found=0 | ||
for version in $supported_versions; do | ||
echo "Checking if $version == $python_version_required" | ||
if [[ "$version" == "$python_version_required" ]]; then | ||
version_found=1 | ||
break | ||
fi | ||
done | ||
|
||
echo "" | ||
|
||
if [[ $version_found -eq 1 ]]; then | ||
echo "Required Python version $python_version_required is supported." | ||
exit 0 # Exit with success | ||
else | ||
echo "Required Python version $python_version_required is not supported." | ||
echo "Supported Versions:" | ||
echo "$supported_versions" | ||
exit 1 # Exit with error | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.