Git Product home page Git Product logo

sfdx-deploy-tool's Introduction

SFDX Deploy Tool Tweet

SFDX Deploy Tool helps you to deploy metadata from one salesforce org to another using SFDX CLI commands.

Getting Started

Download this repository as a zip file and extract it. You can also clone this repository using the below command.

git clone https://github.com/rahulmalhotra/SFDX-Deploy-Tool.git

Prerequisites

SFDX CLI must be downloaded and installed on your system before using this tool.

Installing

Once you've extracted this tool. You'll see a config.txt file with the information as shown below

sourceOrg=CR1
destinationOrg=PB1
package.xmlLocationToDeploy=metadata\package.xml
folderLocationForFetchedZip=metadata
waitTimeInMinutes=10
testLevel=RunSpecifiedTests
runTests=TemperatureConverterTest,LeadProcessorTest
folderLocationToUndeploy=metadata\destructive

Follow the below steps to configure config.txt,

  1. Replace CR1 by the alias of your source org in sfdx cli ( If you haven't connected your source org using sfdx cli in past, you can delete CR1 and leave this space empty )

  2. Replace PB1 by the alias of your destination org in sfdx cli ( If you haven't connected your destination org using sfdx cli in past, you can delete PB1 and leave this space empty )

  3. As you can see, the package.xmlLocationToDeploy is given the value metadata\package.xml i.e. the package.xml inside the metadata folder will be used to fetch and deploy data. Either you can update the package.xml inside the metadata folder with your own metadata or you can specify the path to your own package.xml in the config file.

  4. You can also see that the folderLocationForFetchedZip is given the value metadata. This means that when you'll fetch the metadata from source org it'll create a zip file inside the metadata folder and this zip file will be used later to deploy the metadata to destination org. If you want to use a different folder, you can specify the full path to that folder in config file.

  5. Now we have the waitTimeInMinutes which is specified as 10 minutes you can update it according to your choice.

  6. SFDX CLI provides you 4 test levels namely:- NoTestRun, RunSpecifiedTests, RunLocalTests and RunAllTestsInOrg. I have given my testLevel parameter the value of RunSpecifiedTests which will use the runTests parameter to get the test classes name which will be executed while deployment. You can also change it to NoTestRun or anything else from the available test levels but make sure that for the runTests parameter, you're specifying the testclass names separated by ",". The runTests parameter will be used only when the testLevel is set to RunSpecifiedTests.

  7. The folderLocationToUndeploy should consists of the location of a folder which contains an empty package.xml file and a destructiveChanges.xml file. This will be used when you need to un-deploy or remove metadata from the org. The metadata specified in destructiveChanges.xml will be removed from destination org.

SFDX Deploy Tool is now ready for use.

Usage for Windows

You just need to make sure that the file sfdxdeploytool.bat and config.txt are in the same folder. After configuring, double click on sfdxdeploytool.bat and you're good to go. In case you need a demo, I have written a blog post for the same that can be viewed here.

Usage for macOS

You just need to make sure that the file sfdxdeploytool.command and config.txt are in the same folder. After configuring, double click on sfdxdeploytool.command and you're good to go. In case you need a demo, I have written a blog post for the same that can be viewed here. This blog post mainly specifies the execution using windows operating system. However, the tool will work exactly the same in case of macOS as well.

In case you face any permission issue while executing sfdxdeploytool.command file, run the below command in terminal after navigating to SFDX-Deploy-Tool folder:

chmod 755 sfdxdeploytool.command

This will make the file executable in your system so that you can use it easily.

Tools and Softwares used

Todo

  • User should be able to fetch, validate, deploy and un-deploy metadata.
  • Support for mac.

Contributing

Please read CONTRIBUTING.md for details on code of conduct and the process for submitting pull requests.

Authors

License

This project is licensed under the BSD 3-Clause License - see the LICENSE.md file for details.

sfdx-deploy-tool's People

Contributors

rahulmalhotra avatar jk25084 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.