sfcc-deploy v3.5.0
sfcc-deploy
Deploy cartridges to a Salesforce Commerce Cloud (SFCC) instance.
Warning
DEPRECATED
The recommended way to deploy code to SFCC instances is direct via sfcc-ci.
Installation
$ yarn add sfcc-deploy --dev
General
Uploads a set of SFCC cartridges to an instance. Additionally you can extend it with additional tasks.
Usage
The credentials object is the same as the config for dwdav.
import sfccDeploy from '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'
try {
await sfccDeploy({
credentials: config,
version,
root: './dist/', // default: './dist/'
})
} catch (e) {
console.error('error', e)
}
It's also possible to add additional tasks (executed after code upload).
const activateCodeVersion = {
name: ({ options: { version } }) => `Activating code version: ${version}`, // also takes a simple string
condition: 'activateCodeVersion', // the flag name needed to active the task
emoji: 'fast_forward',
fn: (params) => {
// ...
},
}
try {
await sfccDeploy({
credentials: config,
version,
activateCodeVersion: true, // this flag is needed to activate the additional step
additionalSteps: [
activateCodeVersion,
],
})
} catch (e) {
console.error('error', e)
}
The emoji name must one of the available emojis from this list.
Following information are passed as object to the name
and fn
functions:
Property | Description |
---|---|
options | The config object of the sfccDeploy() call |
dwdav | The dwdav instance used for upload |
rootDir | The root directory |
step | The current step (see https://www.npmjs.com/package/cli-step#a-single-step-%EF%B8%8F) |
stepText | The text of the step |
License
MIT © 2023 Jens Simon
2 months ago
3 months ago
7 months ago
9 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago