sophos / App-SFDC

Command-line tools for Salesforce.com
Other
2 stars 1 forks source link

Bamboo Build script for deploying only changed meta in a commit. #1

Closed eddywebs closed 1 year ago

eddywebs commented 8 years ago

Apologies if this is wrong repo, Requesting script based on discussion here >>https://answers.atlassian.com/questions/32508849/answers/32968076/comments/32979482

amirshirazi commented 8 years ago

App-SFDC accepts a list of constructive changes on STDIN. This can be generated using a standard git command.

However to explain the context around this, for each Salesforce environment / sandbox we maintain a branch that represents the code currently deployed to it. We then merge the feature / release branch into the environment branch.

After checking if the merge resulted in changes, you can run the following git command:

git diff --name-only --relative --diff-filter AM HEAD~1 -- src/

Which will generate a list of file names to pipe into the deployment command. Alternatively you can output the list to a file if further processing is required, before deployment can begin.

The "src" folder is where we keep all of our deployable Salesforce metadata.

A simplified example of the end to end process is:

git merge --no-ff %REF_TO_MERGE_IN% 

git diff --name-only --relative --diff-filter AM HEAD~1 -- src/ > deployment.list

SFDC deploy --url %bamboo_sfdcURL% -u %bamboo_sfdcUsername% -p "%bamboo_sfdcPassword%%bamboo_sfdcSecurityToken%" < deployment.list > deployment.id
brentsifford commented 8 years ago

@amirshirazi Do you have some sort of installation instructions for this module?

DanielCaveSophos commented 1 year ago

This repository has been archived, all open issues have been automatically closed.