Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Urvil Shah
/
MobEasyEditor
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Registry
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ac73213a
authored
5 years ago
by
Nithish Reddy Billa
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Revert "Update .gitlab-ci.yml"
This reverts commit
fc287327
parent
fc287327
Pipeline
#15171
passed with stages
in 24 minutes 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
33 deletions
.gitlab-ci.yml
.gitlab-ci.yml
View file @
ac73213a
stages
:
-
build
-
deploy
-
deploy_asg
build_website
:
stage
:
build
...
...
@@ -21,35 +20,4 @@ deploy_web:
-
$servers = $env:DEPLOY_SERVERS -split ';'
-
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"
when
:
manual
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
when
:
manual
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment