forked from abychat/salesforcealm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
41 lines (41 loc) · 1.9 KB
/
.travis.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
sudo: true
dist: trusty
cache: false
env:
global:
- URL=https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz
- coreId=04tf4000001I1CsAAK
- logicId=04tf4000001I1CxAAK
- uiId=04tf4000001I1D2AAK
- securityId=04tf4000001I1D7AAK
before_install:
# delete the following line before encrypting your server.key
- openssl aes-256-cbc -K $encrypted_334346ef1ebe_key -iv $encrypted_334346ef1ebe_iv -in assets/server.key.enc -out assets/server.key -d
- export SFDX_AUTOUPDATE_DISABLE=true
- export SFDX_USE_GENERIC_UNIX_KEYCHAIN=true
- export SFDX_DOMAIN_RETRY=300
- wget -qO- $URL | tar xJf -
- "./sfdx/install"
- export PATH=./sfdx/$(pwd):$PATH
- sfdx update
# Authroize Dev Hub and Sandbox
- sfdx force:auth:jwt:grant --clientid $CONSUMERKEY --jwtkeyfile assets/server.key --username $USERNAME --setdefaultdevhubusername -a HubOrg
- sfdx force:auth:jwt:grant -i $SBOXCONSUMERKEY -f assets/server.key -r https://test.salesforce.com -u $SBOXUSERNAME
script:
# Push all source to scratch org and run tests
- sfdx force:org:create -v HubOrg -s -f config/project-scratch-def.json -a ciorg
- sfdx force:source:push -u ciorg
- sfdx force:apex:test:run -u ciorg -c -r human -w 30
- sfdx force:org:delete -u ciorg -p
# Push packages to scratch org
- sfdx force:org:create -v HubOrg -s -f config/project-scratch-def.json -a pkgInstallOrg
- sfdx force:package:install -w 30 -u pkgInstallOrg -i $coreId
- sfdx force:package:install -w 30 -u pkgInstallOrg -i $logicId
- sfdx force:package:install -w 30 -u pkgInstallOrg -i $uiId
- sfdx force:package:install -w 30 -u pkgInstallOrg -i $securityId
# Push packages to Sandbox
- sfdx force:package:install -w 30 -u $SBOXUSERNAME -i $coreId
- sfdx force:package:install -w 30 -u $SBOXUSERNAME -i $logicId
- sfdx force:package:install -w 30 -u $SBOXUSERNAME -i $uiId
- sfdx force:package:install -w 30 -u $SBOXUSERNAME -i $securityId
- sfdx force:org:delete -u pkgInstallOrg -p