@@ -36,9 +36,6 @@ export class azurecontainerapps {
36
36
// Set up property to determine if the internal registry should be used
37
37
this . useInternalRegistry = this . util . isNullOrEmpty ( this . registryUrl ) ;
38
38
39
- // Set up property to trigger cloud build with 'up' command
40
- this . shouldCreateOrUpdateContainerAppWithUp = ! this . util . isNullOrEmpty ( this . appSourcePath ) && this . useInternalRegistry ;
41
-
42
39
// If the application source was provided, build a runnable application image from it
43
40
if ( ! this . useInternalRegistry && ! this . util . isNullOrEmpty ( this . appSourcePath ) ) {
44
41
await this . buildAndPushImageAsync ( ) ;
@@ -109,7 +106,6 @@ export class azurecontainerapps {
109
106
private static buildArguments : string ;
110
107
private static noIngressUpdate : boolean ;
111
108
private static useInternalRegistry : boolean ;
112
- private static shouldCreateOrUpdateContainerAppWithUp : boolean ;
113
109
114
110
/**
115
111
* Initializes the helpers used by this task.
@@ -621,11 +617,9 @@ export class azurecontainerapps {
621
617
// Ensure '-i' argument and '--source' argument are not both provided
622
618
if ( ! this . util . isNullOrEmpty ( this . imageToDeploy ) ) {
623
619
this . commandLineArgs . push ( `-i ${ this . imageToDeploy } ` ) ;
624
- } else if ( this . shouldCreateOrUpdateContainerAppWithUp ) {
620
+ } else if ( ! this . util . isNullOrEmpty ( this . appSourcePath ) && this . useInternalRegistry ) {
625
621
this . commandLineArgs . push ( `--source ${ this . appSourcePath } ` ) ;
626
- this . commandLineArgs . push ( `-l ${ this . location } ` ) ;
627
622
}
628
-
629
623
}
630
624
631
625
/**
@@ -636,8 +630,6 @@ export class azurecontainerapps {
636
630
if ( ! this . util . isNullOrEmpty ( this . yamlConfigPath ) ) {
637
631
// Create the Container App from the YAML configuration file
638
632
await this . appHelper . createContainerAppFromYaml ( this . containerAppName , this . resourceGroup , this . yamlConfigPath ) ;
639
- } else if ( this . shouldCreateOrUpdateContainerAppWithUp ) {
640
- await this . appHelper . createOrUpdateContainerAppWithUp ( this . containerAppName , this . resourceGroup , this . commandLineArgs ) ;
641
633
} else {
642
634
// Create the Container App from command line arguments
643
635
await this . appHelper . createContainerApp ( this . containerAppName , this . resourceGroup , this . containerAppEnvironment , this . commandLineArgs ) ;
@@ -653,16 +645,14 @@ export class azurecontainerapps {
653
645
return ;
654
646
}
655
647
656
- if ( this . noIngressUpdate && ! this . shouldCreateOrUpdateContainerAppWithUp ) {
648
+ if ( this . noIngressUpdate ) {
657
649
// Update the Container Registry details on the existing Container App, if provided as an input
658
650
if ( ! this . util . isNullOrEmpty ( this . registryUrl ) && ! this . util . isNullOrEmpty ( this . registryUsername ) && ! this . util . isNullOrEmpty ( this . registryPassword ) ) {
659
651
await this . appHelper . updateContainerAppRegistryDetails ( this . containerAppName , this . resourceGroup , this . registryUrl , this . registryUsername , this . registryPassword ) ;
660
652
}
661
653
662
654
// Update the Container App using the 'update' command
663
655
await this . appHelper . updateContainerApp ( this . containerAppName , this . resourceGroup , this . commandLineArgs ) ;
664
- } else if ( this . shouldCreateOrUpdateContainerAppWithUp ) {
665
- await this . appHelper . createOrUpdateContainerAppWithUp ( this . containerAppName , this . resourceGroup , this . commandLineArgs ) ;
666
656
} else if ( this . adminCredentialsProvided && ! this . noIngressUpdate ) {
667
657
// Update the Container App with `up` command when admin credentials are provided and ingress is manually provided.
668
658
await this . appHelper . updateContainerAppWithUp ( this . containerAppName , this . resourceGroup , this . commandLineArgs , this . ingress , this . targetPort ) ;
0 commit comments