# 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.0b21.tar.gz
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 66 浏览量
2022-01-10
07:08:02
上传
评论
收藏 722KB GZ 举报
温馨提示
共116个文件
py:66个
rst:13个
txt:10个
资源来自pypi官网。 资源全名:cumulusci-2.0.0b21.tar.gz
资源详情
资源评论
资源推荐
收起资源包目录
PyPI 官网下载 | cumulusci-2.0.0b21.tar.gz (116个子文件)
make.bat 6KB
setup.cfg 418B
MANIFEST.in 359B
LICENSE 2KB
Makefile 7KB
README.md 4KB
README.md 2KB
example1.md 330B
not-zip-safe 1B
PKG-INFO 35KB
PKG-INFO 35KB
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
salesforce.py 64KB
cli.py 27KB
metadata.py 25KB
config.py 22KB
push_api.py 21KB
test_keychain.py 17KB
test_parser.py 16KB
release_notes.py 15KB
test_provider.py 15KB
tasks.py 13KB
keychain.py 13KB
package.py 12KB
test_config.py 12KB
bulkdata.py 11KB
test_generator.py 10KB
manual_instructions.py 10KB
conf.py 9KB
test_salesforce.py 8KB
provider.py 8KB
github.py 8KB
generator.py 7KB
parser.py 7KB
test_flows.py 7KB
utils.py 6KB
soap_envelopes.py 5KB
flows.py 5KB
salesforce.py 5KB
report_failing_orgs.py 4KB
command.py 4KB
tasks.py 4KB
mrbelvedere.py 4KB
test_tasks.py 4KB
exceptions.py 4KB
package_zip.py 3KB
managed_src.py 3KB
apextestsdb.py 3KB
ee_src.py 3KB
util_github_api.py 3KB
test_salesforce.py 3KB
github_api.py 3KB
setup.py 2KB
test_package.py 2KB
task.py 2KB
util.py 1KB
salesforcedx.py 1KB
utils.py 1KB
logger.py 524B
exceptions.py 416B
utils.py 371B
exceptions.py 359B
exceptions.py 307B
__init__.py 88B
__init__.py 56B
__init__.py 56B
__init__.py 56B
__init__.py 24B
__init__.py 24B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
TestReport.report 106B
tutorial.rst 27KB
HISTORY.rst 26KB
tasks.rst 24KB
cookbook.rst 20KB
CONTRIBUTING.rst 3KB
README.rst 3KB
installation.rst 907B
index.rst 486B
AUTHORS.rst 224B
usage.rst 73B
contributing.rst 33B
history.rst 28B
authors.rst 28B
共 116 条
- 1
- 2
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0