forked from MDCPS/DamageAssessment_Backend
		
	folder for Common build support scripts
This commit is contained in:
		
							
								
								
									
										30
									
								
								Scripts/build_and_push_services2acr.ps1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								Scripts/build_and_push_services2acr.ps1
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,30 @@ | ||||
| # powershell -ExecutionPolicy Bypass -File .\build_and_push_services2acr.ps1 | ||||
| # Specify the path to your docker-compose.yml | ||||
| $composeFile = "C:\Users\santh\OneDrive\Desktop\DOCKERS\ubuntu\Sprint6\C1011\Backend-API-Services\DamageAssesmentApi\docker-compose.yml" | ||||
|  | ||||
| # List of services to build, tag, and push | ||||
| $services = @( | ||||
|   "damageassesmentapianswers", | ||||
|   "damageassesmentapiattachments", | ||||
|   "damageassesmentapiemployees", | ||||
|   "damageassesmentapilocations", | ||||
|   "damageassesmentapiquestions", | ||||
|   "damageassesmentapisurveys", | ||||
|   "damageassesmentapidoculinks", | ||||
|   "damageassesmentapiresponses" | ||||
| ) | ||||
|  | ||||
| # Log in to ACR (replace ACR_USERNAME and ACR_PASSWORD) | ||||
| docker login dadeschoolscontainerregistry.azurecr.io -u dadeSchoolsContainerRegistry -p k1f8hE0O5hj3tYCCR/5stNrkw5BZoTmAqid/hvaVo8+ACRDc2Arn | ||||
|  | ||||
| # Loop through the services and build, tag, and push | ||||
| foreach ($service in $services) { | ||||
|   # Build the service | ||||
|   docker-compose -f $composeFile build $service | ||||
|  | ||||
|   # Tag the image for ACR | ||||
|   docker tag "$service" "dadeschoolscontainerregistry.azurecr.io/$service" | ||||
|  | ||||
|   # Push the image to ACR | ||||
|   docker push "dadeschoolscontainerregistry.azurecr.io/$service" | ||||
| } | ||||
							
								
								
									
										31
									
								
								Scripts/build_and_push_services2acr.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								Scripts/build_and_push_services2acr.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,31 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| # Specify the path to your docker-compose.yml | ||||
| composeFile="C:/Users/santh/OneDrive/Desktop/DOCKERS/ubuntu/Sprint6/C1011/Backend-API-Services/DamageAssesmentApi/docker-compose.yml" | ||||
|  | ||||
| # List of services to build, tag, and push | ||||
| services=( | ||||
|   "damageassesmentapianswers" | ||||
|   "damageassesmentapiattachments" | ||||
|   "damageassesmentapiemployees" | ||||
|   "damageassesmentapilocations" | ||||
|   "damageassesmentapiquestions" | ||||
|   "damageassesmentapisurveys" | ||||
|   "damageassesmentapidoculinks" | ||||
|   "damageassesmentapiresponses" | ||||
| ) | ||||
|  | ||||
| # Log in to ACR (replace ACR_USERNAME and ACR_PASSWORD) | ||||
| docker login dadeschoolscontainerregistry.azurecr.io -u dadeSchoolsContainerRegistry -p k1f8hE0O5hj3tYCCR/5stNrkw5BZoTmAqid/hvaVo8+ACRDc2Arn | ||||
|  | ||||
| # Loop through the services and build, tag, and push | ||||
| for service in "${services[@]}"; do | ||||
|   # Build the service | ||||
|   docker-compose -f "$composeFile" build "$service" | ||||
|  | ||||
|   # Tag the image for ACR | ||||
|   docker tag "$service" "dadeschoolscontainerregistry.azurecr.io/$service" | ||||
|  | ||||
|   # Push the image to ACR | ||||
|   docker push "dadeschoolscontainerregistry.azurecr.io/$service" | ||||
| done | ||||
		Reference in New Issue
	
	Block a user