Skip to content

fix(cli): change the command for extracting the deployment type - #388

Open
nhat-14 wants to merge 1 commit into
developmentfrom
fix/fix-not-detect-deployment-type
Open

fix(cli): change the command for extracting the deployment type#388
nhat-14 wants to merge 1 commit into
developmentfrom
fix/fix-not-detect-deployment-type

Conversation

@nhat-14

@nhat-14 nhat-14 commented Aug 28, 2026

Copy link
Copy Markdown

Description

Fix deployment type detection in scripts/easy-cli/cli-yaml-gen.sh.

My deployment of a compose application was failed as the script couldn't extract the deployment type from the margo.yaml. The spec is no longer a top-level attribute, and deploymentProfiles (plural) is the correct field for deployment information. deploymentProfiles is also a list, so the existing spec:/deploymentProfile: parsing could not detect the deployment type.

Motivation

Update the script to follow application description structure and correctly detect the deployment type.

Testing

Tested with a simple margo.org/v1-alpha1 Compose application description containing:

azureuser@wfm:~/sandbox/poc/tests/artefacts/nextcloud-compose/margo-package$ deployment_type=$(awk '/deploymentProfile:/,/^[^ ]/ {if (/^\s+type:/) print}' margo.yaml | sed 's/.*type:\s*//' | tr -d '"' | tr -d "'" | xargs | head -1)
azureuser@wfm:~/sandbox/poc/tests/artefacts/nextcloud-compose/margo-package$ echo $deployment_type

azureuser@wfm:~/sandbox/poc/tests/artefacts/nextcloud-compose/margo-package$ deployment_type=$(awk '/deploymentProfiles:/,0 {if (/^\s*-\s*type:/) print}' margo.yaml | sed 's/.*type:\s*//' | tr -d '"' | tr -d "'" | xargs | head -1)
azureuser@wfm:~/sandbox/poc/tests/artefacts/nextcloud-compose/margo-package$ echo $deployment_type
compose

Result:

Before fix: Detected deployment type:
After fix:  Detected deployment type: compose

Checklist

  • Tests added/updated
  • Documentation updated
  • No breaking changes
  • Conventional commits used

@nhat-14 nhat-14 changed the title fix(cli): change the command for extracting the deploy ing type from … fix(cli): change the command for extracting the deployment type Aug 28, 2026
…pplication description

Signed-off-by: Nhat Luong <Luong.Ducnhat@dc.MitsubishiElectric.co.jp>
@nhat-14
nhat-14 force-pushed the fix/fix-not-detect-deployment-type branch from 135fa28 to ec5b44e Compare August 28, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant