-
Notifications
You must be signed in to change notification settings - Fork 41
1.1 Usage Ant
Scot P. Floess edited this page Feb 4, 2015
·
15 revisions
This page describes how to use the Ant scripts for Solenopsis once you have configured it.
ant [-Dproperty=value]* -f [path to solenopsis ant dir]/solenopsis.xml [target]+
You may supply:
- Zero or more properties.
- One or more targets.
Any properties defined above will override properties that Solenopsis computes for defaults. Typically, the one that you may override more often is solenopsis.env.DEPENDENT
. Specifically, doing this allows you to operate upon many different environments.
Note: Solenopsis will always compute default properties that are "good enough" in most circumstances.
Target | Required Properties | Optional Properties | Description |
---|---|---|---|
generate-package | solenopsis.env.MASTER | sf.packageDir sf.version | Generate a (non folder based) package.xml based off the master environment. If no sf.packageDir is specified, defaults to current working dir. If not sf.version is specified, defaults to the one found in /usr/share/solenopsis/ant/1.1/properties/sfdc.metadata.properties (currently 30.0) |
git-destructive-push | solenopsis.env.MASTER solenopsis.env.DEPENDENT | solenopsis.git-status.shell | Push git related changes from the master environment to the dependent environment (any files removed from git are removed from the dependent env). If solenopsis.git-status.shell is set to any value, the git status is computed via shelling into the operating system. |
git-push | solenopsis.env.MASTER solenopsis.env.DEPENDENT | solenopsis.git-status.shell | Push git related changes from the master environment to the dependent environment. If solenopsis.git-status.shell is set to any value, the git status is computed via shelling into the operating system. |
file-push | solenopsis.env.MASTER solenopsis.env.DEPENDENT sf.files2push="dir1/file1 dir2/file2" | Manually push files from the master env. Note the space separated list | |
delta-push | solenopsis.env.MASTER solenopsis.env.DEPENDENT | sf.purgeIgnores | Automagically push files from the master env that are added and modified as compared to the dependent env. This results in a [pull-full]. If [sf.purgeIgnores] is set to anything other than "false" all references found in your sfdcignorefile will be purged from the permissionsets and profiles for any classes and layouts denoted. |
cached-delta-push | solenopsis.env.MASTER solenopsis.env.DEPENDENT | sf.purgeIgnores | Automagically push files from the master env that are added and modified as compared to the dependent env. Please note the existing files for the dependent env as store locally are used for comparison. |
file-destructive-push | solenopsis.env.MASTER solenopsis.env.DEPENDENT sf.files2remove="dir1/file1 dir2/file2" sf.files2push="dir3/file3 dir4/file4" | Manually remove/push files from the master env. Note the space separated list. If [sf.purgeIgnores] is set to anything other than "false" all references found in your sfdcignorefile will be purged from the permissionsets and profiles for any classes and layouts denoted. | |
push | solenopsis.env.MASTER solenopsis.env.DEPENDENT | sf.filesContain sf.purgeIgnores | Additive deployment from master environment to dependent environment. If [sf.filesContain] is set, only those files containing the value will be pushed. If [sf.purgeIgnores] is set to anything other than "false" all references found in your sfdcignorefile will be purged from the permissionsets and profiles for any classes and layouts denoted. |
destructive-push | solenopsis.env.MASTER solenopsis.env.DEPENDENT | sf.purgeIgnores | Destructive deployment from master environment to dependent environment. Whatever is no longer in the master env will be removed from the dependent. For example, classes, fields, etc. The contents of the dependent environment are pulled first and the comparisons are made. If [sf.purgeIgnores] is set to anything other than "false" all references found in your sfdcignorefile will be purged from the permissionsets and profiles for any classes and layouts denoted. |
remove-ignore-refs | sf.ignoreFile | Purge references from your master env (locally) as found in your sfdcignore file. The references purged are those referred to in your profiles and permissionsets for layouts and classes. Please note this may affect files in your profiles and permissionsets directories, which if using a source control system such as git, will show modifications to those files. Please note, if [sf.ignoreFile] is not set or not found, no operations will be applied. | |
clean-ignore-file | sf.ignoreFile | Will clean up the ignore file - like removing trailing spaces. | |
report-diff | solenopsis.env.MASTER solenopsis.env.DEPENDENT | sf.purgeIgnores | Describe the differences between master environment and dependent environment. If [sf.purgeIgnores] is set to anything other than "false" all references found in your sfdcignorefile will be purged from the permissionsets and profiles for any classes and layouts denoted. |
cached-destructive-push | solenopsis.env.MASTER solenopsis.env.DEPENDENT | sf.purgeIgnores | Destructive deployment from master environment to dependent environment. Whatever is no longer in the master env will be removed from the dependent. For example, classes, fields, etc. The local copy of the dependent environment is used for comparison. If [sf.purgeIgnores] is set to anything other than "false" all references found in your sfdcignorefile will be purged from the permissionsets and profiles for any classes and layouts denoted. |
selective-pull | solenopsis.env.DEPENDENT | sf.batchSize sf.types sf.ignoreFile | Selectively pull the metadata types as specified in [sf.types]. If [sf.types] is not defined, all the values found in the properties [sf.metadata.*]. [sf.batchSize] if set, denotes the number of items to pull for multi-part pulls. If defined, the file patterns found in [sf.ignoreFile] are not used. |
selective-pull-to-master | solenopsis.env.MASTER solenopsis.env.DEPENDENT | sf.batchSize sf.types sf.ignoreFile | Selectively pull the metadata types as specified in [sf.types]. If [sf.types] is not defined, all the values found in the properties [sf.metadata.*]. [sf.batchSize] if set, denotes the number of items to pull for multi-part pulls. If defined, the file patterns found in [sf.ignoreFile] are not used. All data is copied to the master env. |
pull-full | solenopsis.env.DEPENDENT | sf.packageFile sf.purgeIgnores | Grab complete contents (folder based) from a dependent environment. For any members in package.xml that do not support the asterisk based notation, will examine the master area for files and denote those there. These include dashboard, documents, email and reports. If [sf.packageFile] is defined, will use that as the package.xml. If [sf.purgeIgnores] is set to anything other than "false" all references found in your sfdcignorefile will be purged from the permissionsets and profiles for any classes and layouts denoted. |
pull-full-to-master | solenopsis.env.MASTER solenopsis.env.DEPENDENT | sf.packageFile sf.purgeIgnores | Grab complete contents (folder based) from a dependent environment to the master. For any members in package.xml that do not support the asterisk based notation, will examine the master area for files and denote those there. These include dashboard, documents, email and reports. If sf.packageFile is defined, will use that for package.xml. If [sf.purgeIgnores] is set to anything other than "false" all references found in your sfdcignorefile will be purged from the permissionsets and profiles for any classes and layouts denoted. |
pull | solenopsis.env.DEPENDENT | Grab contents (non folder based) from a dependent environment. This uses the asterisk notation on members that support it in [package.xml]. If [sf.purgeIgnores] is set to anything other than "false" all references found in your sfdcignorefile will be purged from the permissionsets and profiles for any classes and layouts denoted. | |
pull-to-master | solenopsis.env.MASTER solenopsis.env.DEPENDENT | sf.packageFile | Grab contents (non folder based) from a dependent environment to the master. This uses the asterisk notation on members that support it in [package.xml]. If [sf.packageFile] is defined, will use that for [package.xml]. If [sf.purgeIgnores] is set to anything other than "false" all references found in your sfdcignorefile will be purged from the permissionsets and profiles for any classes and layouts denoted. |
run-tests | solenopsis.env.MASTER solenopsis.env.DEPENDENT | sf.testClasses="TestClass1 TestClass2" sf.logType="some log type" sf.generateTest=[any value] | Run tests in a dependent environment without deploying first. If sf.testClasses is denoted, will run only those tests, otherwise run all tests. sf.logType can be one of: None, Db, Profiling, Callout or Detail. If sf.generateTests is set, will generate the <runTest> elements for all test classes. |
generate-package | solenopsis.env.MASTER solenopsis.env.DEPENDENT | sf.packageDir | Generate a complete (folder based) package.xml based off the master environment. If no sf.packageDir is specified, defaults to current working dir. |
generate-objects-csv | solenopsis.env.MASTER solenopsis.env.DEPENDENT | Generate CSVs for objects from the master environment | |
generate-objects-diff-csv | solenopsis.env.MASTER solenopsis.env.DEPENDENT | Generate a CSV of diffs for objects between the master and dependent environment. | |
describe-metadata | solenopsis.env.MASTER solenopsis.env.DEPENDENT | Describe all metadata. | |
list-metadata | solenopsis.env.MASTER solenopsis.env.DEPENDENT sf.metadataTypes="Type of metadata" | List metadata. sf.metadataTypes should be a space delimited list of the types to list. For example ApexClass. | |
envs | solenopsis.env.MASTER solenopsis.env.DEPENDENT | Display the envs that solenopsis knows about. |