-
Notifications
You must be signed in to change notification settings - Fork 27
/
circle.yml
48 lines (42 loc) · 1.87 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
general:
# Uncomment the following to specify only a specific branch
# branches:
# only:
# - dev # specific branch
# - /dev-.*/ # or regexes
machine:
timezone: America/New_York
environment:
# from https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli_standalone.htm
# and https://developer.salesforce.com/media/salesforce-cli/manifest.json
DX_CLI_URL: https://developer.salesforce.com/media/salesforce-cli/sfdx-v5.7.6-d42cf65-linux-amd64.tar.xz
SFDX_DISABLE_ENCRYPTION: true
dependencies:
override:
- wget -qO- $DX_CLI_URL | tar xJf -
- ./sfdx/install
- mkdir tmp
- echo 'make hub key'
- echo $HUB_SERVER_KEY_HEX | xxd -r -ps >> keys/hub.key
- openssl rsa -in keys/hub.key -check -noout
- sfdx force:auth:jwt:grant --clientid $HUB_CONSUMER_KEY --jwtkeyfile keys/hub.key --username $HUB_SFDC_USER --setdefaultdevhubusername -a hub
### Uncomment the following if performing deployments
#- echo 'make deploy key'
#- echo $DEPLOY_SERVER_KEY_HEX | xxd -r -ps >> keys/deploy.key
#- openssl rsa -in keys/deploy.key -check -noout
#- sfdx force:auth:jwt:grant --clientid $DEPLOY_CONSUMER_KEY --jwtkeyfile keys/deploy.key --username $DEPLOY_SFDC_USER -a deploy
test:
override:
- sfdx force --help
- sfdx force:org:create -s -f config/project-scratch-def.json -a circle_build_$CIRCLE_BUILD_NUM
- sfdx force:source:push -u circle_build_$CIRCLE_BUILD_NUM
- mkdir -p $CIRCLE_TEST_REPORTS/junit
- sfdx force:apex:test:run -c -d $CIRCLE_TEST_REPORTS/junit -r junit
post:
- sfdx force:org:delete -u circle_build_$CIRCLE_BUILD_NUM -p
### Uncomment the following if performing deployments
#deployment:
# override:
# - sfdx force:source:convert -r force-app -d testDeploy
# - . cleanupDeploy.sh
# - sfdx force:mdapi:deploy -d testDeploy/ -u deploy -w 2