IBM / cp4i-deployment-samples

Samples for deploying Cloud Pak for Integration capabilities in a pipeline
Apache License 2.0
22 stars 94 forks source link

updated the jq #276

Closed hrizvi1 closed 2 years ago

hrizvi1 commented 2 years ago
[root@rhel84-node1 cp4i-deployment-samples]# ./products/bash/setup-demos.sh -i json1.json -o test.json

-------------------------------------------------------------------------------------------------------------------

ℹ Script directory: './products/bash'
ℹ Input file: 'json1.json'
ℹ Output file : 'test.json'

-------------------------------------------------------------------------------------------------------------------

ℹ [INFO] Checking if 'jq' is already installed...

jq-1.4

-------------------------------------------------------------------------------------------------------------------

ℹ [INFO] Checking if 'oc' is already installed...

Client Version: 4.7.19
Server Version: 4.6.56
Kubernetes Version: v1.19.16+6175753
[DEBUG] Got the following JSON for json1.json:

{
  "apiVersion": "integration.ibm.com/v1beta1",
  "kind": "Demo",
  "metadata": {
    "namespace": "cp4i",
    "name": "demos"
  },
  "spec": {
    "general": {
      "storage": {
        "block": {
          "class": "cp4i-block-performance"
        },
        "file": {
          "class": "ibmc-file-gold-gid"
        }
      },
      "license": {
        "accept": true,
        "ace": "L-APEH-BPUCJK",
        "apic": "L-RJON-BRSHKF",
        "ar": "L-NCAN-BXWG76",
        "demo": "L-RJON-BYRMYW",
        "mq": "L-RJON-BN7PN3"
      },
      "samplesRepoBranch": "main"
    },
    "apic": {
      "emailAddress": "your@email.address",
      "mailServerHost": "smtp.mailtrap.io",
      "mailServerPort": 2525,
      "mailServerUsername": "<your-username>",
      "mailServerPassword": "<your-password>"
    },
    "demos": {
      "all": "false",
      "cognitiveCarRepair": "true",
      "drivewayDentDeletion": "true",
      "eventEnabledInsurance": "true",
      "mappingAssist": "false",
      "weatherChatbot": "false"
    },
    "products": {
      "aceDashboard": "false",
      "aceDesigner": "true",
      "apic": "false",
      "assetRepo": "true",
      "eventStreams": "false",
      "mq": "true",
      "tracing": "false"
    },
    "addons": {
      "postgres": "false",
      "ocpPipelines": "false"
    }
  }
}

-------------------------------------------------------------------------------------------------------------------

[DEBUG] Extracting the required information from the input file: json1.json

-------------------------------------------------------------------------------------------------------------------

ℹ Block storage class: 'cp4i-block-performance'
ℹ File storage class: 'ibmc-file-gold-gid'
ℹ Samples repo branch: 'main'
ℹ Demo version: '2020.3.1-1'
ℹ Namespace: 'cp4i'

-------------------------------------------------------------------------------------------------------------------

ℹ [DEBUG] All demos enabled: 'false'
ℹ Following demos will be installed {"cognitiveCarRepair":"true","drivewayDentDeletion":"true","eventEnabledInsurance":"true"}

The false values were not getting deleted initially