Azure / container-apps-deploy-pipelines-task

Azure Pipelines Task (Release Candidate) for building and deploying Azure Container Apps
MIT License
6 stars 10 forks source link

Deployment is not working when there are multiple containers in a container app #31

Closed Wompipomp closed 1 year ago

Wompipomp commented 1 year ago

Description

When updating a container app with multiple containers you have to specify which container you want to update via --container-name. This settings is not available in the task for azure container apps.

Expected Behavior

Azure pipelines via azure container apps task are working for apps with multiple containers

Actual Behavior

The task stops with the following error message:

/usr/bin/az containerapp update -n *** -g *** -i ***/imagename:v1
ERROR: Usage error: --container-name is required when adding or updating a container
##[error]Error Code: [1]
##[error]Error: Unable to update Azure Container App via 'az containerapp update' command.

Steps to Reproduce the Problem

  1. Create container app env and container app
  2. Deploy second container via: az containerapp update -n mytest -g myrg -i nginx
  3. Update the container via azure container apps task
cormacpayne commented 1 year ago

@Wompipomp Hey Mark, apologies for the delayed response -- I was able to reproduce this exception with the steps that you've provided, so thanks for that information!

Currently, the yamlConfigPath argument allows you to provide the YAML configuration file that will be used to deploy your Container App, and within this YAML file, there is a properties.template.containers field that can be specified to target the names of the containers that you're deploying with and the images used by each one. This YAML file also includes all other fields that you may want to set to have a level of control over the individual aspects of the Container App.

Is this YAML configuration file a sufficient solution for you, or were you looking for something that could be set as an argument of the task? Thanks in advance!

Wompipomp commented 1 year ago

Hi @cormacpayne,

thank you very much for your answer and sorry for the late response :see_no_evil: Ah, interesting thank you very much for the information. For me this would work with the yaml as workaround. :pray:

As a feature request for the future maybe it would be nice to also have the possibility to have an argument in the container apps task so you can pass the container name directly.

Thank you very much, Best regards Mark

cormacpayne commented 1 year ago

@Wompipomp Hey Mark, thanks for the response! I'm glad that the YAML configuration file is a good workaround in the interim for you -- we've had a prior request for providing container names via an argument, so this will be something we'll circle back on in the future when determining next steps for the task. Thanks again!