This repository shows one way you can successfully setup Salesforce DX (Pilot) with Travis CI. I'm going to make a few assumptions in this README:
- You are currently a part of the Salesforce DX Pilot. If you're not, you can join the waitlist.
- You know how to get your Github repository setup with Travis CI. (Here's their Getting Started guide.)
- You've installed the Travis CLI.
- You have properly setup JWT-Based Authorization Flow (i.e. headless). I recommend using these steps for generating your Self-Signed SSL Certificate.
If any any of these assumptions aren't true, the following steps won't work.
Make sure you have the Salesforce DX CLI installed. Check by running
sfdx force --helpand confirm you see the command output.
Confirm you can perform a JWT-based auth:
sfdx force:auth:jwt:grant --clientid <your_consumer_key> --jwtkeyfile server.key --username <your_username> --setdefaultdevhubusername
Create a Github repo called
Create a new SFDX workspace:
sfdx force:workspace:create -n sfdx-travisci
In the newly created directory, initialize git:
Add your Github repo as a remote:
git remote add origin firstname.lastname@example.org:wadewegner/sfdx-travisci.git
Usernameusing the Travis CLI.
travis env set CONSUMERKEY <your_consumer_key> travis env set USERNAME <your_username>
Create a folder called
assetsand add your
server.keyto the folder.
travis encrypt-file assets/server.key assets/server.key.enc
.travis.ymlsimilar to the one in this repo, replacing with your own values.
And you should be ready to go! Now when you commit and push a change, your change will kick off a Travis CI build.
Contributing to the Repository
If you find any issues or opportunities for improving this respository, fix them! Feel free to contribute to this project by forking this repository and make changes to the content. Once you've made your changes, share them back with the community by sending a pull request. Please see How to send pull requests for more information about contributing to Github projects.
If you find any issues with this demo that you can't fix, feel free to report them in the issues section of this repository.