1.2.0 • Published 2 years ago

@ciguru/sfdx-ci-engine v1.2.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
2 years ago

Continuous Delivery Engine, based on SFDX CLI

CI Engine to automate the Salesforce CRM development process. The Engine communicates with Salesforce through the SFDX CLI.

Installation

You can install this using npm installer.

Requirements

To get started, you'll need to install node v16 (LTS) or greater. While this can be done using an installer from nodejs.com or via an OS-specific package manager.

Install package

> npm install --global @ciguru/sfdx-ci-engine

Usage

Tools based on adapter

Import in your own code

// Import CI Engine
import CiEngine from '@ctsoftware/sfdx-ci-engine';
// Set up the CI Engine by specifying the path to the configuration file
const ci = new CiEngine(configurationfile);
// Tune the behaviur of your configuration by providing input
ci.setGlobalInputs({ foo: 'abra', bar: 123 });
// Performing CI steps(actions) according to configuration
await ci.run();
// Get step results(outputs)
const result = ci.getOutputs();

CI Configuration

Supported configuration file formats

You can use YAML (.yaml or .yml) or JSON (.json) files to set up the configuration. You can import JSON Schema in your IDE to simplify configuration process (guidelines for WebStorm and VS Code).

Configuration

Top-level attributes


Input attributes


Variable attributes


Step attributes

Attributes for all steps

Additional attributes for ci.changeSet.create step (since v1.1.0)

Create change sets to deploy and revert Pull Requests

Additional attributes for ci.data.transfer step (since v1.2.0)

Create change sets to deploy and revert Pull Requests

Additional attributes for sObjectItem step (since v1.2.0)

Additional attributes for sfdx.auth.accessToken step

Authorize an org using access token

Additional attributes for sfdx.auth.list step

List auth connection information

Additional attributes for sfdx.auth.logout step

Log out from authorized orgs

Additional attributes for sfdx.auth.sfdxUrl step

Authorize an org using sfdxurl

Additional attributes for sfdx.force.apex.execute step

Executes anonymous Apex code

Additional attributes for sfdx.force.apex.test.run step

Invoke Apex tests

Additional attributes for sfdx.force.data.bulk.delete step

Bulk delete records from a CSV file

Additional attributes for sfdx.force.data.bulk.upsert step

Bulk upsert records from a CSV file

Additional attributes for sfdx.force.data.soql.query.csv step

Bulk upsert records from a CSV file

Additional attributes for sfdx.force.data.tree.import step

Import data into an org

Additional attributes for sfdx.force.mdApi.deploy step

Deploy metadata to an org using Metadata API

Additional attributes for sfdx.force.mdApi.retrieve step

Retrieve metadata from an org using Metadata API

Additional attributes for sfdx.force.org.create.scratch step

Create a scratch org

Additional attributes for sfdx.force.org.delete step

Mark a scratch or sandbox org for deletion

Additional attributes for sfdx.force.org.display step

Get the description for the current or target org

Additional attributes for sfdx.force.package.install step

Install a package in the target org

Additional attributes for sfdx.force.source.push step

Push source to a scratch org from the project


Reference syntax

  • $env.ENVIRONMENT_NAME
  • $input.INPUT_ID
  • $var.VARIABLE_ID
  • $step.STEP_ID.outputs