Skip to content

Commit

Permalink
#296 - adding a new env variable to get the env variables that we wan…
Browse files Browse the repository at this point in the history
…t to set per BU
  • Loading branch information
Daniel Ventura committed Dec 15, 2022
1 parent 6ef7909 commit 1e3c768
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions copado-function/app/Init.fn.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ CONFIG.target_mid = null;
CONFIG.repoUrl = process.env.repoUrl;
CONFIG.downloadBUs = process.env.downloadBUs === 'false' ? false : true;
CONFIG.gitPush = process.env.gitPush === 'false' ? false : true;
CONFIG.copadoEnvironmentVariables =
process.env.copadoEnvironmentVariables === undefined
? '{}'
: process.env.copadoEnvironmentVariables;

/**
* main method that combines runs this function
Expand All @@ -84,6 +88,9 @@ async function run() {
Log.error(`Could not parse credentials: ${CONFIG.credentials}`);
throw ex;
}

CONFIG.copadoEnvironmentVariables = JSON.parse(CONFIG.copadoEnvironmentVariables);

Log.debug(CONFIG);

// ensure we got SFMC credentials for our source BU
Expand Down

0 comments on commit 1e3c768

Please sign in to comment.