Sana Release package

 go to: https://portal.azure.com/#home



Search versions which not in sana side


Run script on power shell (Run as admin)

[string]$Name = "Sana Commerce Cloud 1.47.43.0";

[string]$ImageTag = "1.47.43.0";

[string]$ProjectId = "DC360555-DA8D-4C95-965E-365B1DE3A6E2";

[string]$ImageRepository = "sanaacrweu01.azurecr.io/scc-dev";

[string]$MigrationsZip = "D:\Migration\Migrations.zip";

[string]$Database = "D:\Migration\Database.zip";

[string]$MigrationToolkitVersion = "0.1.9.0";cls

[string]$DeploymentUri = "https://staging-platform.sana-commerce.com/";

[string]$PlatformUser = "i.jayakody@sana-commerce.com";

[string]$PlatformPass = "abcABC@1234";

[string]$ReleaseType = "hotfix";//patch

[string]$IsSDK = "false";


$migrations = [Convert]::ToBase64String([IO.File]::ReadAllBytes($MigrationsZip))

$database = [Convert]::ToBase64String([IO.File]::ReadAllBytes($Database))


$credentialsJson = @"

{

  "Email": "$platformUser",

  "Password": "$platformPass"

}

"@

$authResponse = Invoke-RestMethod -Uri "$deploymentUri/api/v1/accounts/authentication-token" -Method Post -Body $credentialsJson -ContentType "application/json"


$releasePackageJson = @"

{

  "Name": "$Name",

  "Version": "$imageTag",

  "ImageRepository": "$imageRepository",

  "ImageTag": "$imageTag",

  "InstallationScriptsZip": "$database",

  "MigrationToolkitVersion": "$MigrationToolkitVersion",

  "MigrationsZip": "$migrations",

  "ProjectId": "$ProjectId",

  "ReleaseType":"$ReleaseType",

  "IsSDK":$IsSDK

}

"@


$token = $authResponse.AccessToken

$headers = @{Authorization = "Bearer $token"}


Invoke-RestMethod -Uri "$deploymentUri/api/v1/release-package" -Method Post -Body $releasePackageJson -Headers $headers -ContentType "application/json"


--------------------------------------------------------------------------------------------------------------------

Recently added release package


need to ask, is the latest path is changed to 



https://portal.azure.com/#view/Microsoft_Azure_ContainerRegistries/RepositoryBlade/id/%2Fsubscriptions%2F2c8d3fc1-89cc-40e5-9e7f-1e2fdadcccc9%2FresourceGroups%2FRG-ACR-WEU%2Fproviders%2FMicrosoft.ContainerRegistry%2Fregistries%2Fsanadevelopmentacrweu01/repository/scc-dev