-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7.4.0 #1642
7.4.0 #1642
Conversation
…deployed-for-inter-type-dependencies # Conflicts: # @types/lib/index.d.ts.map # @types/lib/metadataTypes/Asset.d.ts.map # @types/lib/metadataTypes/MetadataType.d.ts.map # @types/lib/util/util.d.ts.map
…deployed-for-inter-type-dependencies
…ighting-for-ssjs-files-in-gitlab task/1637 enable syntax highlighting for SSJS files in gitlab
…-leaves-journeys-with-wrong-emails bug/1505 fix bad asset links on journeys when retrieved together with triggeredSends
…deployed-for-inter-type-dependencies # Conflicts: # lib/index.js
…-assets-are-deployed-for-inter-type-dependencies BUG/1472 adapt order in which assets are deployed for inter-type dependencies
Coverage ReportCommit:1094a21Base: main@f365dba Details (changed files):
|
…to-update-files-when-update-is-optional bug/1646 fix config not getting updated during mcdev upgrade
…ple keys are retrieved at once
This reverts commit 5ece335.
…ion-rule-overrides-for-selected-types Feature/1666 optional validation rule overrides for selected types
…_checks_for_events_and_journeys_fail_if_multiple_entries_are_retrieved_by_key # Conflicts: # @types/lib/metadataTypes/Journey.d.ts.map # lib/metadataTypes/Journey.js
…_events_and_journeys_fail_if_multiple_entries_are_retrieved_by_key Bug/1668 sf object checks for events and journeys fail if multiple entries are retrieved by key
…he were omitted due to templating
… buildDefinitionBulk
…locking-validation-errors-to-warnings feature/1671 add --skipValidation option to deploy, build, buildDefinition, buildDefinitionBulk
this type uses its own upsert()
…ven if the were omitted due to templating" This reverts commit a6cb91f.
https://github.com/Accenture/sfmc-devtools/wiki/06.b-~-Standard-Commands/_edit DocumentationexecuteCommand: Alias: Currently supported types:
[...] publishCommand: Alias: Currently supported types:
|
https://github.com/Accenture/sfmc-devtools/wiki/06.b-~-Standard-Commands/_edit DocumentationdeployCommand: deploy with --matchName: Currently supported types:
|
Documentation - Advanced ConfigurationConfig options.mcdevrc.jsonThe central config in {
"options": {
"deployment": {
"commitHistory": 10,
"sourceTargetMapping": {
"deployment-source": "deployment-target"
},
"targetBranchBuMapping": {
"release/*": "MySandbox/QA-DE",
"master": ["MyProduction/PROD-DE", "MyProduction/PROD-NL"]
}
},
"validation": {
"retrieve": {
"noGuidKeys": "warn",
"noRootFolder": "warn",
"overrides": [
{
"type": [
"journey"
],
"options": {
"noGuidKeys": "off",
}
}
]
},
"buildDefinition": {
"noGuidKeys": "warn",
"noRootFolder": "warn",
"overrides": [
{
"type": [
"journey"
],
"options": {
"noGuidKeys": "off",
}
}
]
},
"deploy": {
"noGuidKeys": "error",
"noRootFolder": "error",
"overrides": [
{
"type": [
"journey"
],
"options": {
"noGuidKeys": "off",
}
}
]
}
},
"documentType": "md",
"documentStandardRoles": true,
"exclude": {
"role": {
"CustomerKey": ["excludedRoleKey","excludedOtherRoleKey"]
}
},
"include": {
"asset": {
"r__folder_Path": ["Content Builder/only/assets/in/here"]
},
},
"serverTimeOffset": -6
},
"directories": {
"businessUnits": "businessUnits/",
"deploy": "deploy/",
"docs": "docs/",
"retrieve": "retrieve/",
"template": "template/",
"templateBuilds": ["retrieve/", "deploy/"]
},
"metaDataTypes": {
"documentOnRetrieve": ["user", "automation", "dataExtension", "role"],
"retrieve": [...]
}
}
Validation rulesYou can define validation rules for
Possible rule settings are:
Please keep in mind that you can always skip validation rules all together at run-time by adding --skipValidation to your command (deploy / build / buildDefinition / buildDefinitionBulk) Custom Validation rules - .mcdev-validation.jsOptionally one can create a file named One example that depends on BU names and hence is not part of the standard set could look like this: 'use strict';
const buSuffixMap = {
_ParentBU_: '',
DEV: '_DEV',
QA: '_QA',
PROD: '',
};
/**
*
* @param {any} definition type defintiion
* @param {any} item metadata json
* @param {string} targetDir where the metadata is stored ("deploy/cred/bu")
* @param {any} Util helper methods
* @returns {Promise.<any>} validation rule
*/
export function validation(definition, item, targetDir, Util) {
const bu = targetDir.includes('/') ? targetDir.split('/').pop() : targetDir.split('\\').pop();
const suffix = buSuffixMap[bu];
if (suffix === undefined) {
Util.logger.error(
`BU '${bu}' not defined for keySuffix validation in .mcdev-validations.js`
);
}
return {
keySuffix: {
failedMsg: 'Key Suffix expected but not found: ' + suffix,
/**
* @returns {boolean} true=test passed
*/
passed: function () {
// exclude non-relevant items
const relevantTypes = ['asset', 'dataExtension'];
if (!relevantTypes.includes(definition.type)) {
return true;
}
if (
definition.type === 'dataExtension' &&
item.r__folder_ContentType !== 'shared_dataextension'
) {
// only shared DEs need a suffix
return true;
}
// actual test
const key = item[definition.keyField] + '';
if (key) {
return key.endsWith(suffix);
} else {
Util.logger.debug('validation-keySuffix: key not found');
return true;
}
},
},
};
} To control how a custom rule is applied, simply add its name (in the above example, "validation": {
"retrieve": {
"keySuffix": "warn",
"noGuidKeys": "warn",
"noRootFolder": "warn",
},
"buildDefinition": {
"keySuffix": "warn",
"noGuidKeys": "warn",
"noRootFolder": "warn",
"overrides": [
{
"type": [
"asset"
],
"options": {
"keySuffix": "error",
}
}
]
},
"deploy": {
"keySuffix": "error",
"noGuidKeys": "error",
"noRootFolder": "error",
}
}, |
https://github.com/Accenture/sfmc-devtools/wiki/06.c-~-Templating-Commands DocumentationTemplating CommandsbuildCommand: buildDefinitionCommand: buildDefinitionBulkCommand: |
Release details
Checklist
Before merge
npm run prepare-release
(which runsnpm audit fix
,npm run lint-ts
,npm run lint:fix
,git add
,git commit
)After merge
npm run version:major/minor/patch
Documentation
Issues