# Push Upgrade API Scripts
These scripts are designed to work with the Salesforce Push Upgrade API (in Pilot in Winter 16) which exposes new objects via the Tooling API that allow interacting with push upgrades in a packaging org. The main purpose of these scripts is to use the Push Upgrade API to automate push upgrades through Jenkins.
# push_api.py - Python Wrapper for Push Upgrade API
This python file provides wrapper classes around the Tooling API objects and abstracts interaction with them and their related data to make writing scripts easier. All the other scripts in this directory use the SalesforcePushApi wrapper to interact with the Tooling API.
Initializing the SalesforcePushApi wrapper can be done with the following python code:
push_api = SalesforcePushApi(sf_user, sf_pass, sf_serverurl)
You can also pass two optional keyword args to the initialization to control the wrapper's behavior
* **lazy**: A list of objects that should be lazily looked up. Currently, the only implementations for this are 'jobs' and 'subscribers'. If either are included in the list, they will be looked up on demand when needed by a referenced object. For example, if you are querying all jobs and subscribers is not set to lazy, all subscribers will first be retrieved. If lazy is enabled, subscriber orgs will only be retrieved when trying to resolve references for a particular job. Generally, if you have a lot of subscribers and only expect your script to need to lookup a small number of them, enabling lazy for subscribers will reduce api calls and cause the script to run faster.
* **default_where**: A dictionary with Push Upgrade API objects as key and a value containing a SOQL WHERE clause statement which is applied to all queries against the object to effectively set the universe for a given object. For example:
default_where = {'PackageSubscriber': "OrgType = 'Sandbox'"}
In the example above, the wrapper would never return a PackageSubscriber which is not a Sandbox org.
# Push Scripts
## Common Environment Variables
The push scripts are all designed to receive their arguments via environment variables. The following are common amongst all of the Push Scripts
* **SF_USERNAME**: The Salesforce username for the packaging org
* **SF_PASSWORD**: The Salesforce password and security token for the packaging org
* **SF_SERVERURL**: The login url for the Salesforce packaging org.
## get_version_id.py
Takes a namespace and version string and looks up the given version. Returns the version's Salesforce Id.
The script handles parsing the version number string into a SOQL query against the MetadataPackageVersion object with the correct MajorVersion, MinorVersion, PatchVersion, ReleaseState, and BuildNumber (i.e. Beta number).
### Required Environment Variables
* **NAMESPACE**: The Package's namespace prefix
* **VERSION_NUMBER**: The version number string.
## orgs_for_push.py
Takes a MetadataPackageVersion Id and optionally a where clause to filter Subscribers and returns a list of OrgId's one per line which can be fed into the schedule_push.py script.
### Required Environment Variables
* **VERSION**: The MetadataPackageVersion Id of the version you want to push upgrade. This is used to look for all users not on the version or a newer version
### Optional Environment Variables
* **SUBSCRIBER_WHERE**: An extra filter to be applied to all Subscriber queries. For example, setting this to OrgType = 'Sandbox' would find all Sandbox orgs eligible for push upgrade to the specified version
## failed_orgs_for_push.py
Takes a PackagePushRequest Id and optionally a where clause to filter Subscribers and returns a list of OrgId's one per line for all orgs which failed the
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
PyPI 官网下载 | cumulusci-2.0.10.tar.gz (209个子文件)
make.bat 6KB
setup.cfg 412B
MANIFEST.in 374B
scratch_def.json 185B
LICENSE 2KB
Makefile 7KB
README.md 4KB
README.md 2KB
example1.md 330B
not-zip-safe 1B
PKG-INFO 72KB
PKG-INFO 72KB
salesforce-org-process.png 245KB
cumulus_ci_workflow.png 179KB
image12.png 106KB
image3.png 77KB
image17.png 67KB
github-commit_status_error.png 52KB
github-commit_status_pass.png 51KB
github-creating_a_uat_release.png 50KB
image15.png 26KB
image1.png 4KB
cci.py 35KB
test_cci.py 34KB
test_metadata.py 33KB
push_api.py 25KB
test_config.py 23KB
BaseProjectConfig.py 22KB
metadata.py 22KB
test_keychain.py 21KB
test_config_expensive.py 20KB
Salesforce.py 19KB
test_parser.py 18KB
bulkdata.py 18KB
test_merge.py 17KB
test_provider.py 16KB
test_apex_tasks.py 15KB
tasks.py 15KB
testrunner.py 14KB
test_flows.py 14KB
utils.py 14KB
flows.py 13KB
package.py 13KB
test_generator.py 11KB
test_utils.py 11KB
ScratchOrgConfig.py 10KB
UpdateDependencies.py 10KB
conf.py 9KB
parser.py 9KB
util.py 8KB
BaseProjectKeychain.py 8KB
merge.py 8KB
util.py 7KB
tasks.py 7KB
CumulusCI.py 7KB
generator.py 7KB
provider.py 7KB
UpdateAdminProfile.py 6KB
command.py 6KB
PackageUpload.py 6KB
test_bulkdata.py 6KB
soap_envelopes.py 6KB
salesforce.py 5KB
test_config.py 5KB
exceptions.py 5KB
sfdx.py 5KB
apexdoc.py 5KB
Deploy.py 5KB
UninstallPackagedIncremental.py 5KB
config.py 4KB
metadata_test_strings.py 4KB
mrbelvedere.py 4KB
test_tasks.py 4KB
anon.py 4KB
robotframework.py 4KB
release_report.py 4KB
package_zip.py 4KB
EncryptedFileProjectKeychain.py 4KB
util_github_api.py 4KB
util_github_api.py 3KB
metaxml.py 3KB
test_sfdx.py 3KB
test_command.py 3KB
RetrieveReportsAndDashboards.py 3KB
managed_src.py 3KB
BaseEncryptedProjectKeychain.py 3KB
YamlProjectConfig.py 3KB
ee_src.py 3KB
test_salesforce.py 3KB
release.py 3KB
batch.py 3KB
utils.py 3KB
BaseRetrieveMetadata.py 3KB
locators.py 3KB
utils.py 3KB
test_salesforce.py 3KB
InstallPackageVersion.py 3KB
OrgConfig.py 3KB
setup.py 2KB
UninstallLocalNamespacedBundles.py 2KB
共 209 条
- 1
- 2
- 3
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功