@ibm-cloud/cd-tools 1.15.6 → 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.
@@ -268,8 +268,11 @@ async function setupTerraformFiles(config) {
268
268
  for (const [k, v] of Object.entries(newTfFileObj['resource']['ibm_cd_tekton_pipeline_trigger'])) {
269
269
  try {
270
270
  const thisUrl = v['source'][0]['properties'][0]['url'];
271
- if (!v['depends_on'] && thisUrl) {
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 {
@@ -302,8 +305,11 @@ async function setupTerraformFiles(config) {
302
305
  for (const [k, v] of Object.entries(newTfFileObj['resource']['ibm_cd_tekton_pipeline_definition'])) {
303
306
  try {
304
307
  const thisUrl = v['source'][0]['properties'][0]['url'];
305
- if (!v['depends_on'] && thisUrl) {
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibm-cloud/cd-tools",
3
- "version": "1.15.6",
3
+ "version": "1.15.8",
4
4
  "description": "Tools and utilities for the IBM Cloud Continuous Delivery service and resources",
5
5
  "repository": {
6
6
  "type": "git",