Deploy cartridges to a Salesforce Commerce Cloud (SFCC) instance
npm install @trippel/sfcc-deploy[![NPM version][npm-image]][npm-url] [![Downloads][npm-downloads-image]][npm-url] [![Dependencies][deps-image]][deps-url] [![star this repo][gh-stars-image]][gh-url] [![fork this repo][gh-forks-image]][gh-url] [![Build Status][travis-image]][travis-url] ![Code Style][codestyle-image]
> Deploy cartridges to a Salesforce Commerce Cloud (SFCC) instance.
``sh`
$ yarn add sfcc-deploy --dev
Uploads a set of SFCC cartridges to an instance. Additionally you can extend it with additional tasks.
The credentials object is the same as the config for dwdav.
`javascript
const sfccDeploy = require('sfcc-deploy');
const config = {
hostname: 'host.name.net',
username: 'login',
password: 'password',
p12: 'path/to/cert.p12', // two factor authentication
passphrase: 'certpassphrase', // two factor authentication
};
const version = '0.5.1';
sfccDeploy({
credentials: config,
version,
root: './dist/', // default: './dist/'
});
`
It's also possible to add additional tasks (executed after code upload).
`javascriptActivating code version: ${version}
const activateCodeVersion = {
name: ({ options: { version } }) => , // also takes a simple string
condition: 'activateCodeVersion', // the flag name needed to active the task
emoji: 'fast_forward',
fn: (params) => {
// ...
},
};
sfccDeploy({
credentials: config,
version,
activateCodeVersion: true, // this flag is needed to activate the additional step
additionalSteps: [
activateCodeVersion,
],
});
`
The emoji name must one of the available emojis from this list.
Following information are passed as object to the name and fnfunctions:
Property | Description
-----------|------------
options | The config object of the sfccDeploy() calldwdav | The dwdav instance used for uploadrootDir | The root directorystep | The current step (see https://www.npmjs.com/package/cli-step#a-single-step-%EF%B8%8F)stepText` | The text of the step
MIT © 2021 Jens Simon
[npm-url]: https://www.npmjs.com/package/sfcc-deploy
[npm-image]: https://badgen.net/npm/v/sfcc-deploy
[npm-downloads-image]: https://badgen.net/npm/dw/sfcc-deploy
[deps-url]: https://david-dm.org/jenssimon/sfcc-deploy
[deps-image]: https://badgen.net/david/dep/jenssimon/sfcc-deploy
[gh-url]: https://github.com/jenssimon/sfcc-deploy
[gh-stars-image]: https://badgen.net/github/stars/jenssimon/sfcc-deploy
[gh-forks-image]: https://badgen.net/github/forks/jenssimon/sfcc-deploy
[travis-url]: https://travis-ci.com/jenssimon/sfcc-deploy
[travis-image]: https://travis-ci.com/jenssimon/sfcc-deploy.svg?branch=master
[codestyle-image]: https://badgen.net/badge/code%20style/airbnb/f2a