@ibm-cloud/cd-tools 1.15.20 → 1.15.21

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.
@@ -104,7 +104,7 @@ async function main(options) {
104
104
  const pipelineBaseUrl = `https://${CLOUD_PLATFORM}/devops/pipelines/tekton/${tool.id}`
105
105
  const pipelineData = await getPipelineData(bearer, tool.id, region);
106
106
 
107
- pipelineData?.properties.forEach((prop) => {
107
+ pipelineData?.properties?.forEach((prop) => {
108
108
  if (prop.type === 'secure' && !isSecretReference(prop.value) && prop.value.length > 0) {
109
109
  pipelineResults.push({
110
110
  'Pipeline ID': pipelineData.id,
@@ -109,7 +109,7 @@ export async function importTerraform(token, apiKey, region, toolchainId, toolch
109
109
  ];
110
110
 
111
111
 
112
- pipelineData.definitions.forEach((def) => {
112
+ pipelineData.definitions?.forEach((def) => {
113
113
  block = importBlock(`${pipelineData.id}/${def.id}`, 'definition', 'ibm_cd_tekton_pipeline_definition');
114
114
  importBlocks.push(block);
115
115
 
@@ -119,7 +119,7 @@ export async function importTerraform(token, apiKey, region, toolchainId, toolch
119
119
  ];
120
120
  });
121
121
 
122
- pipelineData.properties.forEach((prop) => {
122
+ pipelineData.properties?.forEach((prop) => {
123
123
  block = importBlock(`${pipelineData.id}/${prop.name}`, prop.name, 'ibm_cd_tekton_pipeline_property');
124
124
  importBlocks.push(block);
125
125
 
@@ -129,7 +129,7 @@ export async function importTerraform(token, apiKey, region, toolchainId, toolch
129
129
  ];
130
130
  });
131
131
 
132
- pipelineData.triggers.forEach((trig) => {
132
+ pipelineData.triggers?.forEach((trig) => {
133
133
  block = importBlock(`${pipelineData.id}/${trig.id}`, trig.name, 'ibm_cd_tekton_pipeline_trigger');
134
134
  importBlocks.push(block);
135
135
 
@@ -140,7 +140,7 @@ export async function importTerraform(token, apiKey, region, toolchainId, toolch
140
140
 
141
141
  const triggerResName = block.name;
142
142
 
143
- trig.properties.forEach((trigProp) => {
143
+ trig.properties?.forEach((trigProp) => {
144
144
  block = importBlock(`${pipelineData.id}/${trig.id}/${trigProp.name}`, trigProp.name, 'ibm_cd_tekton_pipeline_trigger_property');
145
145
  importBlocks.push(block);
146
146
 
@@ -224,9 +224,9 @@ async function validateTools(token, tcId, region, skipPrompt) {
224
224
  });
225
225
 
226
226
  pipelineData.triggers.forEach((trigger) => {
227
- if ((trigger?.secret?.type === 'token_matches' || trigger?.secret?.type === 'digest_matches') && !isSecretReference(trigger.secret.value) && trigger.secret.value.length > 0)
227
+ if ((trigger?.secret?.type === 'token_matches' || trigger?.secret?.type === 'digest_matches') && !isSecretReference(trigger.secret?.value) && trigger.secret?.value?.length > 0)
228
228
  secrets.push([trigger.name, trigger.secret.key_name].join('.').replace(/\s+/g, '+'));
229
- trigger.properties.forEach((prop) => {
229
+ trigger.properties?.forEach((prop) => {
230
230
  if (prop.type === 'secure' && !isSecretReference(prop.value) && prop.value.length > 0)
231
231
  secrets.push([trigger.name, 'properties', prop.name].join('.').replace(/\s+/g, '+'));
232
232
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibm-cloud/cd-tools",
3
- "version": "1.15.20",
3
+ "version": "1.15.21",
4
4
  "description": "Tools and utilities for the IBM Cloud Continuous Delivery service and resources",
5
5
  "repository": {
6
6
  "type": "git",