forcedotcom / forcedotcom/devops-center-feedback

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

Open
#279 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
61
Forks
2
PR merge metrics
No merged PRs in 30d

Description

**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](https://github.com/forcedotcom/devops-center-feedback/assets/46635736/0e467505-2fa4-4808-8a71-a583d3234e2d)
![image](https://github.com/forcedotcom/devops-center-feedback/assets/46635736/7955a609-4662-4fee-9fbb-1f6b72842d93)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.