@ibm-cloud/cd-tools 1.15.7 → 1.15.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cmd/utils/terraform.js +6 -0
- package/package.json +1 -1
package/cmd/utils/terraform.js
CHANGED
|
@@ -270,6 +270,9 @@ async function setupTerraformFiles(config) {
|
|
|
270
270
|
const thisUrl = v['source'][0]['properties'][0]['url'];
|
|
271
271
|
if (!v['depends_on'] && thisUrl && repoToTfName[thisUrl]) {
|
|
272
272
|
newTfFileObj['resource']['ibm_cd_tekton_pipeline_trigger'][k]['depends_on'] = [`ibm_cd_toolchain_tool_githubconsolidated.${repoToTfName[thisUrl]}`]
|
|
273
|
+
} else if (!v['depends_on'] && thisUrl && !repoToTfName[thisUrl]) {
|
|
274
|
+
// warn the user if the URL is not in the repoToTfName map
|
|
275
|
+
logger.warn(`Warning! Could not find a matching tool integration for ${thisUrl}`, LOG_STAGES.terraform);
|
|
273
276
|
}
|
|
274
277
|
}
|
|
275
278
|
catch {
|
|
@@ -304,6 +307,9 @@ async function setupTerraformFiles(config) {
|
|
|
304
307
|
const thisUrl = v['source'][0]['properties'][0]['url'];
|
|
305
308
|
if (!v['depends_on'] && thisUrl && repoToTfName[thisUrl]) {
|
|
306
309
|
newTfFileObj['resource']['ibm_cd_tekton_pipeline_definition'][k]['depends_on'] = [`ibm_cd_toolchain_tool_githubconsolidated.${repoToTfName[thisUrl]}`]
|
|
310
|
+
} else if (!v['depends_on'] && thisUrl && !repoToTfName[thisUrl]) {
|
|
311
|
+
// warn the user if the URL is not in the repoToTfName map
|
|
312
|
+
logger.warn(`Warning! Could not find a matching tool integration for ${thisUrl}`, LOG_STAGES.terraform);
|
|
307
313
|
}
|
|
308
314
|
}
|
|
309
315
|
catch {
|