Skip to content

Commit

Permalink
Fixing microservice.ps1 and deploy.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
Kumar Pallav committed May 18, 2020
1 parent f28dcdd commit b4807e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Examples/BuildingScripts/microservicesdk-win-dev/deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function Get-IniFile {
function getResponseAppNameJson([Parameter(Mandatory=$true)]$username,[Parameter(Mandatory=$true)]$pass,[Parameter(Mandatory=$true)]$site,[Parameter(Mandatory=$true)]$appname) {
$aid = 0
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$pass)))
$requestAppName = "http://$site/application/applicationsByName/$appname"
$requestAppName = "https://$site/application/applicationsByName/$appname"
$responseAppNameJson =Invoke-WebRequest -Uri $requestAppName -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -ErrorAction SilentlyContinue | ConvertFrom-Json

if($responseAppNameJson) {
Expand Down Expand Up @@ -100,7 +100,7 @@ function Invoke-DataUpdate {
throw "Application does not exist."
}
#
$uri = "http://$($url)/application/applications/$($id)/binaries"
$uri = "https://$($url)/application/applications/$($id)/binaries"
$filePath = Resolve-Path -Path ".\images\multi\image.zip"
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ function exportImage() {
$imagename = $imagename + ":"
$imagename = $imagename + $global:TAG_NAME
Write-Output "[INFO] Export image"
docker save $imagename > "docker\image.tar"
docker save $imagename -o "docker\image.tar"
}

function zipFile() {
Expand Down Expand Up @@ -319,9 +319,8 @@ function createApplication() {

$Result = Invoke-RestMethod -Method Post -Uri "$DEPLOY_ADDRESS/application/applications" `
-Headers @{Authorization = ("Basic {0}" -f $authorization)} `
-ContentType "application/json" `
-Body $body `
-ErrorVariable RestError -ErrorAction "SilentlyContinue" `
-Body $body
}


Expand All @@ -337,7 +336,8 @@ function uploadFile() {
$authorization = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $global:DEPLOY_USER,$global:DEPLOY_PASSWORD)))
$uri = [string]::Concat($global:DEPLOY_ADDRESS, "/application/applications/", $global:APPLICATION_ID,"/binaries")

Write-Output "[INFO] uri-> $authorization"
Write-Output "[INFO] uri-> $uri"
Write-Output "[INFO] authorization-> $authorization"
Write-Output "[INFO] global:DEPLOY_ADDRESS-> $global:DEPLOY_ADDRESS"
Write-Output "[INFO] global:APPLICATION_ID-> $global:APPLICATION_ID"

Expand Down

0 comments on commit b4807e2

Please sign in to comment.