Skip to content
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

Feature/1329 add new method that chains buildtemplate and builddefinition + add --metadata to buildDefinitionBulk #1330

Conversation

JoernBerkefeld
Copy link
Contributor

@JoernBerkefeld JoernBerkefeld commented May 16, 2024

PR details

What changes did you make? (Give an overview)

Further details (optional)

...

Checklist

@JoernBerkefeld JoernBerkefeld added this to the 6.1.0 milestone May 16, 2024
@JoernBerkefeld JoernBerkefeld self-assigned this May 16, 2024
@github-actions github-actions bot added the enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story" label May 16, 2024
Copy link

github-actions bot commented May 16, 2024

Coverage Report

Commit:190cf68
Base: develop@a3e87f5

Type Base This PR
Total Statements Coverage  67.89%  67.98%  (+0.09%)
Total Branches Coverage  67.3%  67.1%  (-0.2%)
Total Functions Coverage  78.65%  79.18%  (+0.53%)
Total Lines Coverage  67.89%  67.98%  (+0.09%)
Details (changed files):
File Statements Branches Functions Lines

@JoernBerkefeld
Copy link
Contributor Author

https://github.com/Accenture/sfmc-devtools/wiki/06.c-~-Templating-Commands/_edit

buildDefinitionBulk

Command: mcdev buildDefinitionBulk <market list name> <type> <template name> [--metadata]

Alias: mcdev bdb

With buildDefinitionBulk you get a very powerful command that wraps around buildDefinition, which it executes internally. It allows you to create the definitions for multiple Business Units and multiple markets at once.

Instead of passing in the name of credentials, Business Units and markets, you simply refer to a pre-defined market list in your .mcdevrc.json. This enables you to re-use the same configs over and over again, across multiple deployments and share it with your team.

Note: Before using this command, you need to configure your markets first! Check out our guide on Market List Configuration and Market Configuration to understand how to use bulk templating and prepare your market config.

Example:

mcdev bdb pilotMarketsQA dataExtension MyUserTable

mcdev bdb pilotMarketsQA -m dataExtension:MyUserTable -m query:mySQL -m dataExtension:MyOtherTable

@JoernBerkefeld
Copy link
Contributor Author

JoernBerkefeld commented May 16, 2024

https://github.com/Accenture/sfmc-devtools/wiki/06.c-~-Templating-Commands/_edit

build

Command: mcdev build <--fromBu> <--toBu> <--fromMarket> <--toMarket> <--metadata> [--bulk]

This combines the power of buildTemplate and buildDefinition in one command, making it easier if you continuously use both commands sequentially.

Example:

// before
mcdev bt MyProject/DEV --market pilotMarketDEV1 -m dataExtension:table1 -m dataExtension:table2 -m dataExtension:table3 -m query:sql1 -m query:sql2
mcdev bd MyProject/QA --market pilotMarketQA1 -m dataExtension:table1 -m dataExtension:table2 -m dataExtension:table3 -m query:sql1 -m query:sql2

// after
mcdev build --fromBu MyProject/DEV --toBu MyProject/QA --fromMarket pilotMarketDEV1 --toMarket pilotMarketQA1 -m dataExtension:table1 -m dataExtension:table2 -m dataExtension:table3 -m query:sql1 -m query:sql2

And if you already have market lists set up and want to use buildDefinitionBulk instead all you need to do is append --bulk:

Example:

// before
mcdev bt MyProject/DEV --market pilotMarketDEV1 -m dataExtension:table1 -m dataExtension:table2 -m dataExtension:table3 -m query:sql1 -m query:sql2
mcdev bdb pilotMarketsQA -m dataExtension:table1 -m dataExtension:table2 -m dataExtension:table3 -m query:sql1 -m query:sql2

// after
mcdev build --fromBu MyProject/DEV --fromMarket pilotMarketDEV1 --toMarket pilotMarketsQA --bulk -m dataExtension:table1 -m dataExtension:table2 -m dataExtension:table3 -m query:sql1 -m query:sql2

Note how in this bulk-example the parameter --toBu MyProject/QA was omitted and that --toMarket pilotMarketsQA now holds the name of the market list that bdb needs to work.

@JoernBerkefeld JoernBerkefeld merged commit 81ba6af into develop May 16, 2024
6 checks passed
@JoernBerkefeld JoernBerkefeld deleted the feature/1329-add-new-method-that-chains-buildtemplate-and-builddefinition branch May 16, 2024 15:49
@JoernBerkefeld JoernBerkefeld mentioned this pull request May 16, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e/DevOps EPIC enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] add new method that chains buildTemplate and buildDefinition
1 participant