Skip to content

Commit

Permalink
rename the circle ci config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarroll committed Apr 19, 2018
1 parent 6e9ecd3 commit d612814
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 1 deletion.
68 changes: 68 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
version: 2

general:
# Uncomment the following to specify only a specific branch
# branches:
# only:
# - dev # specific branch
# - /dev-.*/ # or regexes

jobs:
build:
machine: true
working_directory: ~/ci_app
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-linux-amd64.tar.xz
steps:
- checkout
- run:
name: Download CLI
command: |
mkdir sfdx
wget -qO- $DX_CLI_URL | tar xJ -C sfdx --strip-components 1
- run:
name: Install CLI
command: |
./sfdx/install
sfdx
mkdir tmp
- run:
name: Create hub key
command: |
echo 'make hub key'
mkdir keys
echo $HUB_SERVER_KEY_HEX | xxd -r -ps >> keys/hub.key
openssl rsa -in keys/hub.key -check -noout
### 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
- run:
name: Setup Org
command: |
echo 'Running tests'
sfdx force:auth:jwt:grant --clientid $HUB_CONSUMER_KEY --jwtkeyfile keys/hub.key --username $HUB_SFDC_USER --setdefaultdevhubusername -a hub
sfdx force --help
sfdx force:org:create -s -f ~/ci_app/config/project-scratch-def.json -a circle_build_$CIRCLE_BUILD_NUM --wait 2
sfdx force:source:push -u circle_build_$CIRCLE_BUILD_NUM
- run:
name: Run Apex Tests
command: |
mkdir -p ~/junit
sfdx force:apex:test:run -c -d ~/junit -r junit --wait 5
- store_test_results:
path: ~/junit
- run:
name: Delete Useless Scratch Org
command: |
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ node_modules
.settings
selenium-client-jars/
test/artifacts
.circleci/*

0 comments on commit d612814

Please sign in to comment.