forked from MDCPS/DamageAssessment_Backend
		
	modified push acr script
This commit is contained in:
		| @ -2,23 +2,31 @@ | ||||
|  | ||||
| # Get the current working directory | ||||
| current_directory="$(pwd)" | ||||
| echo "Current directory: $current_directory" | ||||
|  | ||||
| # Navigate one folder up | ||||
| cd .. | ||||
|  | ||||
| # Get and display the new working directory | ||||
| current_directory="$(pwd)" | ||||
| echo "New directory: $current_directory" | ||||
|  | ||||
| # Specify the relative path to the docker-compose.yml | ||||
| relative_path="Backend-API-Services/DamageAssesmentApi" | ||||
| relative_path="DamageAssesmentApi" | ||||
|  | ||||
| # Combine the current directory with the relative path to get the full path to docker-compose.yml | ||||
| composeFile="$current_directory/$relative_path/docker-compose.yml" | ||||
|  | ||||
| # List of services to build, tag, and push | ||||
| services=( | ||||
|   "damageassesment.api.answers" | ||||
|   "damageassesment.api.attachments" | ||||
|   "damageassesment.api.employees" | ||||
|   "damageassesment.api.locations" | ||||
|   "damageassesment.api.questions" | ||||
|   "damageassesment.api.responses" | ||||
|   "damageassesment.api.surveys" | ||||
|   "damageassesment.api.doculinks" | ||||
|   "damageassesmentapianswers" | ||||
|   "damageassesmentapiattachments" | ||||
|   "damageassesmentapiemployees" | ||||
|   "damageassesmentapilocations" | ||||
|   "damageassesmentapiquestions" | ||||
|   "damageassesmentapisurveys" | ||||
|   "damageassesmentapidoculinks" | ||||
|   "damageassesmentapiresponses" | ||||
| ) | ||||
|  | ||||
| # Log in to ACR (replace ACR_USERNAME and ACR_PASSWORD) | ||||
| @ -27,7 +35,7 @@ docker login dadeschoolscontainerregistry.azurecr.io -u dadeSchoolsContainerRegi | ||||
| # Loop through the services and build, tag, and push | ||||
| for service in "${services[@]}"; do | ||||
|   # Build the service | ||||
|   docker-compose -f "$composeFile" build "$service" | ||||
|   docker-compose -f "$composeFile" build # "$service" | ||||
|  | ||||
|   # Tag the image for ACR | ||||
|   docker tag "$service" "dadeschoolscontainerregistry.azurecr.io/$service" | ||||
| @ -35,3 +43,11 @@ for service in "${services[@]}"; do | ||||
|   # Push the image to ACR | ||||
|   docker push "dadeschoolscontainerregistry.azurecr.io/$service" | ||||
| done | ||||
|  | ||||
| # Get and display the current working directory | ||||
| current_directory="$(pwd)" | ||||
| echo "Current directory: $current_directory" | ||||
|  | ||||
| # Wait for a keypress | ||||
| echo "Press any key to continue..." | ||||
| read -n 1 -s -r -p "" | ||||
|  | ||||
		Reference in New Issue
	
	Block a user