https://github.com/dnakov/spm
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dnakov/spm
- Owner: dnakov
- Created: 2016-05-23T20:20:16.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-09-01T15:39:47.000Z (almost 9 years ago)
- Last Synced: 2025-04-09T23:53:00.866Z (about 1 year ago)
- Language: JavaScript
- Size: 4.23 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SPM
## What it does
A command-line tool to deploy local metadata from a directory to a salesforce org using the salesforce metadata API.
## Bamboo Setup
1. Configure the following variables:
* **username** (SF username)
* **password** (SF password -- append token if necessary)
* **endpointUrl** (https://test.salesforce.com for sandbox or https://login.salesforce.com for production/dev)
* **deployOptions** (additional arguments to be passed to spm)
* Example for **test** deploy: `--checkOnly --runAllTests --rollbackOnError --junit tests.xml`
* Example for **production** deploy: `--rollbackOnError`
* All options
* `--apiVersion` -- salesforce option
* `--checkOnly` -- salesforce option
* `--ignoreWarnings` -- salesforce option
* `--performRetrieve` -- salesforce option
* `--purgeOnDelete` -- salesforce option
* `--rollbackOnError` -- salesforce option
* `--runAllTests` -- salesforce option
* `--testLevel` -- salesforce option
* `--runTests` -- salesforce option
* `--singlePackage` -- salesforce option
* `--allowMissingFiles` -- salesforce option
* `--runPackagedTestsOnly` -- salesforce option
* `--filter [glob_filter]` -- only include files that match this filter
* `--root [root_dir]` -- specify root directory containing salesforce files (defaults to `src`
* `--fullLog` -- outputs the full deployment log from salesforce (JSON)
* `--checkInterval [ms]` -- how often to check for the deployment result (defaults to 2000)
2. Create a **Source Code Checkout** task if it doesn't exist and set up the repository you'll be deploying
3. Add an **npm** task with the following command: `install git+https://github.com/dnakov/spm`
4. Add a **script** or **node.js** task to execute the `spm` command
* Example for **script** task: `./node_modules/spm/bin/spm-cli.js deploy --username ${bamboo.username} --password ${bamboo.password} --endpointUrl ${bamboo.endpointUrl} ${bamboo.deployOptions}`
* Example for **node.js** task:
* Script: `node_modules/spm/bin/spm-cli.js`
* Arguments: `deploy --username ${bamboo.username} --password ${bamboo.password} --endpointUrl ${bamboo.endpointUrl} ${bamboo.deployOptions}`
5. If setting up tests, add a **JUnit Parser** task to parse the junit file specified in the spm command
* Example: `**/tests.xml` (for when spm was run with --junit tests.xml)