-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MOSIP-35421] Moved installtion scripts of ida apitestrig.
Signed-off-by: Mohanraj209 <[email protected]>
- Loading branch information
Mohanraj209
committed
Oct 7, 2024
1 parent
7f079e2
commit 3a93b87
Showing
3 changed files
with
119 additions
and
1 deletion.
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,52 @@ | ||
#!/bin/bash | ||
|
||
# Prompt the user for the branch name | ||
read -p "Enter the Git branch (default is 'develop'): " GIT_BRANCH | ||
GIT_BRANCH=${GIT_BRANCH:-develop} # Default to 'develop' if no input is provided | ||
|
||
echo "set kubeconfig" | ||
export KUBECONFIG=$1 | ||
|
||
# Set variables | ||
REPO_URL="https://github.com/mosip/mosip-functional-tests.git" | ||
INSTALL_SCRIPT="install.sh" | ||
VALUES_FILE="../../../values.yaml" # Path to your custom values.yaml file | ||
|
||
# Clone the repository | ||
echo "Cloning repository from $REPO_URL on branch $GIT_BRANCH..." | ||
if git clone -b "$GIT_BRANCH" "$REPO_URL" ; then | ||
echo "Repository cloned successfully." | ||
else | ||
echo "Failed to clone repository." | ||
exit 1 | ||
fi | ||
|
||
# Navigate to the deployment directory | ||
echo "Navigating to deploy directory..." | ||
git_repo_name="$(basename "$REPO_URL" .git)" | ||
|
||
cd $git_repo_name | ||
|
||
git sparse-checkout init --cone && git sparse-checkout set deploy/apitestrig | ||
|
||
find . -type f ! -path "./deploy/*" -exec rm -f {} \; | ||
|
||
cd deploy/apitestrig || { echo "apitestrig directory not found."; exit 1; } | ||
cp $VALUES_FILE values.yaml | ||
|
||
# Check if the install script exists and is executable | ||
if [ -x "$INSTALL_SCRIPT" ]; then | ||
echo "Running install script with values file $VALUES_FILE..." | ||
source ./"$INSTALL_SCRIPT" | ||
echo "Install script executed successfully." | ||
else | ||
echo "Install script not found or not executable." | ||
exit 1 | ||
fi | ||
|
||
# Cleanup cloned repository | ||
echo "Cleaning up..." | ||
cd ../../.. | ||
rm -rf $git_repo_name | ||
|
||
echo "Deployment complete!" |
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 |
---|---|---|
@@ -1,7 +1,55 @@ | ||
modules: | ||
masterdata: | ||
enabled: false | ||
image: | ||
repository: mosipqa/apitest-masterdata | ||
tag: develop | ||
pullPolicy: Always | ||
prereg: | ||
enabled: false | ||
image: | ||
repository: mosipqa/apitest-prereg | ||
tag: develop | ||
pullPolicy: Always | ||
idrepo: | ||
enabled: false | ||
image: | ||
repository: mosipqa/apitest-idrepo | ||
tag: develop | ||
pullPolicy: Always | ||
partner: | ||
enabled: false | ||
image: | ||
repository: mosipqa/apitest-partner | ||
tag: develop | ||
pullPolicy: Always | ||
resident: | ||
enabled: false | ||
image: | ||
repository: mosipqa/apitest-resident | ||
tag: develop | ||
pullPolicy: Always | ||
auth: | ||
enabled: true | ||
image: | ||
repository: mosipqa/apitest-auth | ||
tag: develop | ||
pullPolicy: Always | ||
esignet: | ||
enabled: false | ||
image: | ||
repository: mosipqa/apitest-esignet | ||
tag: develop | ||
pullPolicy: Always | ||
mimoto: | ||
enabled: false | ||
image: | ||
repository: mosipqa/apitest-mimoto | ||
tag: develop | ||
pullPolicy: Always | ||
pms: | ||
enabled: false | ||
image: | ||
repository: mosipqa/apitest-pms | ||
tag: develop | ||
pullPolicy: Always |