Revert "Update .gitlab-ci.yml"

This reverts commit fc287327
parent fc287327
Pipeline #15171 passed with stages
in 24 minutes 7 seconds
Showing with 0 additions and 33 deletions
stages: stages:
- build - build
- deploy - deploy
- deploy_asg
build_website: build_website:
stage: build stage: build
...@@ -22,34 +21,3 @@ deploy_web: ...@@ -22,34 +21,3 @@ deploy_web:
- Copy-FilesToServers -Servers $servers -UserName $env:DEPLOY_USERNAME -Password $env:DEPLOY_PASSWORD -LocalPath ".\Mobile.WYSIWYG\build\web\_PublishedWebsites\Mobile.WYSIWYG\*" -RemotePath "C:\adk-mobile\$env:CI_PROJECT_NAME\Mobile.WYSIWYG\$env:CI_BUILD_ID" - Copy-FilesToServers -Servers $servers -UserName $env:DEPLOY_USERNAME -Password $env:DEPLOY_PASSWORD -LocalPath ".\Mobile.WYSIWYG\build\web\_PublishedWebsites\Mobile.WYSIWYG\*" -RemotePath "C:\adk-mobile\$env:CI_PROJECT_NAME\Mobile.WYSIWYG\$env:CI_BUILD_ID"
- Set-IISPhysicalPaths -Servers $servers -UserName $env:DEPLOY_USERNAME -Password $env:DEPLOY_PASSWORD -IISSite "Mobile.WYSIWYG" -Path "c:\adk-mobile\$env:CI_PROJECT_NAME\Mobile.WYSIWYG\$env:CI_BUILD_ID" - Set-IISPhysicalPaths -Servers $servers -UserName $env:DEPLOY_USERNAME -Password $env:DEPLOY_PASSWORD -IISSite "Mobile.WYSIWYG" -Path "c:\adk-mobile\$env:CI_PROJECT_NAME\Mobile.WYSIWYG\$env:CI_BUILD_ID"
when: manual when: manual
\ No newline at end of file
deploy_asg:
stage: deploy_asg
script:
- $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
- $headers.Add("x-api-key", $env:AMI_API_KEY)
- $response = Invoke-RestMethod "https://371e80qilk.execute-api.us-west-2.amazonaws.com/default/create-ami?instanceid=$env:INSTANCE_ID&group=content-vault" -Headers $headers
- Write-Host $response
- $amiId = $response.ImageId
- $headers["x-api-key"] = $env:AMI_CHECK_API_KEY
- $CheckCount = 1
- do {
- Start-Sleep -s 60
- $response = Invoke-RestMethod "https://fv32k5tlel.execute-api.us-west-2.amazonaws.com/default/check-ami-status?amiid=$amiId" -Headers $headers
- Write-Host "ami status $response.state, check count $CheckCount"
- $CheckCount += 1
} until (($response.state -eq "available") -and ($CheckCount -lt 15))
- If (-Not ($response.state -eq "available")) { Exit }
- $headers["x-api-key"] = $env:LAUNCH_CONFIG_API_KEY
- $response = Invoke-RestMethod "https://nl90tc5t7d.execute-api.us-west-2.amazonaws.com/default/create-launch-configuration?amiid=$amiId" -Headers $headers
- Write-Host $response
- $launchConfigName = $response.launch_config_name
- Start-Sleep -s 60
- $headers["x-api-key"] = $env:ASG_UP_API_KEY
- $response = Invoke-RestMethod "https://4pgcnqwrc4.execute-api.us-west-2.amazonaws.com/default/asg-new-tag-scale-up?launch_config_name=$launchConfigName&desire_capacity=2&auto_scale_group_name=aws-content-vault-api-asg" -Headers $headers
- Write-Host $response
- Start-Sleep -s 600
- $headers["x-api-key"] = $env:ASG_DOWN_API_KEY
- $response = Invoke-RestMethod "https://lr50lqs0xg.execute-api.us-west-2.amazonaws.com/default/asg-scale-down?desire_capacity=1&auto_scale_group_name=aws-content-vault-api-asg" -Headers $headers
- Write-Host $response
when: manual
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment