Andy in the Cloud

From BBC Basic to Force.com and beyond…

Branch Support for GitHub Salesforce Deploy Tool

16 Comments

If your not familiar, the GitHub Salesforce Deploy Tool will allow you to place a handy button on your GitHub README files to allow for super easy browser based deployment from your repo to a Salesforce org. Up until now it only worked on the master branch, it now supports branches!

GitHubSFDeployBranches.png

The new support for branches, does in fact cover tags and commits as well. Though only branches are defaulted from the button. If you already have the button on your README file, you will find it now magically starts detecting the branch!

ButtonOnABranch.png

Deploy to Salesforce buttons on branches now work!

If your new to the tool, go to the main page and grab the button code and paste it into your README file.  Or if you want a button you can use explicitly in a blog or article you can fill in the fields and generate it from the same page. As you can see the enhancement adds a new ref parameter to the generated URL. This can be a branch name, tag or commit. You can read more about the tool here.

ButtonWithScript.png

Enjoy!

 

16 thoughts on “Branch Support for GitHub Salesforce Deploy Tool

  1. Hi Andy, can you consider why I get nulls for all properties reading any object or element.
    Even the simple snippet below returns all nulls. Creating is PERFECT and error free!

    MetadataService.CustomField customField = (MetadataService.CustomField) service.readMetadata(‘CustomField’, new String[] { ‘Lead.picklist__c’ }).getRecords()[0];

    • I don’t believe you can retrieve fields individualy, you need to retrieve the custom object. Strange I know. I will see if I can get confirmation.

  2. Andy, I am using SFDX to manage my app, and would like to use your deploy button to make it easy on user, while avoiding having to create manually the package.zip or proper metadata output.
    The solution I found so far is to use travis CI to automatically create a release for each commit with a package.zip attached (generated in the build phase). BUT I can use your button to access this zip file as it is not in the tree (even if pointing the button to the created tag, it doesn’t work as the metadata is not in the correct format), only on the release. Essentially I would like the button pointing to /releases/latest, and grabbing the package.xml from there.
    What do you think about adding this feature to your tool? I wouldn’t mind sharing my setup so that other can use the same workflow with DX….

    • My tool does not require package.xml, if it’s not present it will create one in memory. That sad it’s better to have one really, the tool cannot generate the best one sometimes. Support for a package.zip in the repo is something that’s not been asked before, but happy for you to add it to the GitHub issues list as an enhancement. 👍🏻

  3. Great tool ! can you deploy private github, gitlab or bitbucket repos using this tool ?

  4. Hi Andy, this is an awesome tool, but I’m seeing some issues with SFDX enabled repositories not pulling in all the files. Here is an example: https://github.com/alexed1/LightningFlowComponents/tree/master/ it only pulls in one random component (the last one maybe?) instead of the whole bunch. The DX install instructions in contrast work as expected.

    • Thanks. This tool only supports classic source format. I was wondering about creating DX support for it, then the DX button came along so I helped with that.

      http://www.wadewegner.com/2017/09/deploy-to-salesforce-dx/

      I note however that even this tool might have issue with your repo, as I think it will expect a single DX project in the repo and that it is placed in the root. You could try button the button in md files relative to each source root and see if the tool picks up relative paths within a repo. If not that could be an enhancement request.

      Hope this helps. 👍🏻

  5. Hi Andy
    This really very helpful tool, thanks for it. We are using it to deploy report and dashboard for our clients. It work fine with DEV orgs and Sandboxes, but starting this week if we create new DEV org instances and try to use GitHub Salesforce Deploy Tool in Authorization step we get OAuth Error(http://prntscr.com/ljrujg). We compare and check all settings, all looks fine. Could you please help to solve this issue?

  6. Hi Andy! I would like to know if I can use githubsfdeploy tool using git.soma.salesforce.com instead of github.com ? Thanks!!

    • It does support private repos…. but if you have special network access it’s not likely to support that sorry

  7. Hi Andy! Any issues on the githubsfdeploy.herokuapp.com tool recently? Had reports last week of a github project of mine to a production org not deploying nicely, and couldn’t see the cause. Anything I should have done?
    Repo (note I’ve removed the deploy button for now): https://github.com/c4tch/SFDCTestFramework
    Error message: No web page was found for the web address: https://githubsfdeploy.herokuapp.com/_auth?code=*****&state=https%3A%2F%2Fgithubsfdeploy.herokuapp.com%2Fapp%2Fgithubdeploy%2FMatthew+Evans%2Fhttps%3A%2Fgithub.com%2Fc4tch%2FSFDCTestFramework%3Fref%3Dmaster

Leave a Reply to Andrew Fawcett Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s