devops-center-feedback icon indicating copy to clipboard operation
devops-center-feedback copied to clipboard

Deploying all metadata in branch deploys packages not specified in the project scope

Open Damecek opened this issue 2 years ago • 0 comments

Describe the bug When promoting WI to next stage and selecting All metadata in the UAT stage's branch, will result in deploying all packages in the repo despite the defined ones in the Project record field sf_devops__Package_Directories__c.

To Reproduce Steps to reproduce the behavior:

  1. Have multiple Packages in repository (E.g.: force-app, nebula-logger)
  2. Have a Project with Sfdx-project.json's Package Directories = force-app
  3. Prepare WI with changes in force-app package, ready to promote
  4. Promote the WI selecting All metadata in the UAT stage's branch

Expected behavior During promotion only the force-app will be deployed.

Additional context Here are remote commands on related sf_devops__Async_Operation_Result__c:

git clone '--branch=integration' '--single-branch' 'https://x-oauth-basic:*******/*******/salesforce.git' '/tmp/doce-bGzmJP'
git log '--pretty=format:%H' '-1'
git fetch 'origin' 'WI-000577:WI-000577'
git checkout 'WI-000577'
git -c 'user.name= *******' -c 'user.email= *******' merge '--message=Merging branch integration' 'integration'
git log '--pretty=format:%H' '-1'
git checkout 'integration'
git -c 'user.name= *******' -c 'user.email= *******' merge '--no-ff' '--message=Merging branch WI-000577' 'WI-000577'
git log '--pretty=format:%H' '-1'
sfdx force:source:deploy -p "force-app, nebula-logger"
git push 'origin' 'integration'

specifically sfdx force:source:deploy -p "force-app, nebula-logger"

image image

Damecek avatar Dec 14 '23 14:12 Damecek