Deploy-AzSpringCloudApp
Deploy the build file to an existing deployment.
Syntax
DeployAppForStandard (Default)
Deploy-AzSpringCloudApp
-Name <String>
-ResourceGroupName <String>
-ServiceName <String>
-FilePath <String>
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
DeployAppForEnterprise
Deploy-AzSpringCloudApp
-Name <String>
-ResourceGroupName <String>
-ServiceName <String>
-FilePath <String>
-BuilderId <String>
-AgentPoolId <String>
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Deploy the build file to an existing deployment.
Examples
Example 1: Deploy the build file to an standard spring app
$jarObj = New-AzSpringCloudAppDeploymentJarUploadedObject -RuntimeVersion "Java_8"
New-AzSpringCloudAppDeployment -ResourceGroupName springcloud-rg-0zquav -ServiceName spring-va4fsz -AppName account -Name green -Source $jarObj
Get-AzSpringCloudApp -ResourceGroupName springcloud-rg-0zquav -ServiceName spring-va4fsz -Name account | Update-AzSpringCloudAppActiveDeployment -DeploymentName 'green'
Deploy-AzSpringCloudApp -ResourceGroupName springcloud-rg-0zquav -ServiceName spring-va4fsz -Name account -FilePath "C:\Users\v-diya\Downloads\hellospring\target\hellospring-0.0.1-SNAPSHOT.jar"
[1/3] Requesting for upload URL
[2/3] Uploading package to blob
[3/3] Updating deployment in app demo (this operation can take a while to complete)
Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName
---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- -----------------
green 6/24/2022 6:50:58 AM v-test@microsoft.com User 7/19/2022 7:06:08 AM v-test@microsoft.com User spring-rg-test
This command deploy the build file to an standard spring app.
Example 2: Deploy the build file to an enterprise spring app
$source = New-AzSpringCloudAppDeploymentBuildResultObject
New-AzSpringCloudAppDeployment -ResourceGroupName springcloud-rg-0zquav -ServiceName spring-f7lz2n -AppName account -Name green -Source $source
Get-AzSpringCloudApp -ResourceGroupName springcloud-rg-0zquav -ServiceName spring-f7lz2n -Name account | Update-AzSpringCloudAppActiveDeployment -DeploymentName 'green'
$builder = Get-AzSpringCloudBuildServiceBuilder -ResourceGroupName springcloud-rg-0zquav -ServiceName spring-f7lz2n -Name default
$agentPool = Get-AzSpringCloudBuildServiceAgentPool -ResourceGroupName springcloud-rg-0zquav -ServiceName spring-f7lz2n
Deploy-AzSpringCloudApp -ResourceGroupName springcloud-rg-0zquav -ServiceName spring-f7lz2n -Name account -AgentPoolId $agentPool.Id -BuilderId $builder.Id -FilePath "C:\Users\v-diya\Downloads\hellospring\target\hellospring-0.0.1-SNAPSHOT.jar"
[1/3] Requesting for upload URL
[2/3] Uploading package to blob
[3/3] Updating deployment in app demo (this operation can take a while to complete)
Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName
---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- -----------------
green 6/24/2022 6:50:58 AM v-test@microsoft.com User 7/19/2022 7:06:08 AM v-test@microsoft.com User spring-rg-test
This command deploy the build file to an enterprise spring app.
Parameters
-AgentPoolId
The resource id of agent pool.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
DeployAppForEnterprise
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AsJob
Run the command as a job
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BuilderId
The resource id of builder to build the source code.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
DeployAppForEnterprise
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FilePath
The path of the file need to be deployed.
The file supports Jar, NetcoreZip and Source.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The name of the App resource.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AppName
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NoWait
Run the command asynchronously
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group that contains the resource.
You can obtain this value from the Azure Resource Manager API or the portal.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ServiceName
The name of the Service resource.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
Gets subscription ID which uniquely identify the Microsoft Azure subscription.
The subscription ID forms part of the URI for every service call.
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs