From 6defdba78569e5a2098c05b7c0d72d2e5b6748e1 Mon Sep 17 00:00:00 2001 From: salesforcesan <37224804+salesforcesan@users.noreply.github.com> Date: Sun, 29 Mar 2020 11:31:35 -0500 Subject: [PATCH] Add .circleci/config.yml --- .circleci/config.yml | 82 +++++++------------------------------------- 1 file changed, 13 insertions(+), 69 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c12ae1e7f..01c267cc2 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,69 +1,13 @@ -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 enc -nosalt -aes-256-cbc -d -in assets/server.key.enc -out assets/server.key -base64 -K $DECRYPTION_KEY -iv $DECRYPTION_IV - #- 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 assets/server.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 +# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference +version: 2.1 +# Use a package of configuration called an orb. +orbs: + # Declare a dependency on the welcome-orb + welcome: circleci/welcome-orb@0.4.1 +# Orchestrate or schedule a set of jobs +workflows: + # Name the workflow "welcome" + welcome: + # Run the welcome/run job in its own container + jobs: + - welcome/run \ No newline at end of file