forcedotcom / devops-center-feedback

61 stars 2 forks source link

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

Open Damecek opened 6 months ago

Damecek commented 6 months ago

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_devopsAsync_Operation_Resultc:

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