|
9 | 9 | "kind": "build", |
10 | 10 | "isDefault": true |
11 | 11 | }, |
12 | | - "problemMatcher": [] |
| 12 | + "options": { |
| 13 | + "env": { |
| 14 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 15 | + } |
| 16 | + } |
13 | 17 | }, |
14 | 18 | { |
15 | 19 | "label": "chaincode lifecycle - 2. deploy", |
16 | 20 | "type": "shell", |
17 | 21 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh install ${input:select-peer}", |
18 | | - "problemMatcher": [] |
| 22 | + "options": { |
| 23 | + "env": { |
| 24 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 25 | + } |
| 26 | + } |
19 | 27 | }, |
20 | 28 | { |
21 | 29 | "label": "chaincode lifecycle - 3. approve", |
22 | 30 | "type": "shell", |
23 | | - "command": "./lib/btp-chaincode-lifecycle/chaincode.sh approve ${input:select-peer}", |
24 | | - "problemMatcher": [] |
| 31 | + "command": "./lib/btp-chaincode-lifecycle/chaincode.sh approve ${input:select-peer} ${input:select-orderer}", |
| 32 | + "options": { |
| 33 | + "env": { |
| 34 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 35 | + } |
| 36 | + } |
25 | 37 | }, |
26 | 38 | { |
27 | 39 | "label": "chaincode lifecycle - 4. check commit readiness", |
28 | 40 | "type": "shell", |
29 | 41 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh commit-readiness ${input:select-peer}", |
30 | | - "problemMatcher": [] |
| 42 | + "options": { |
| 43 | + "env": { |
| 44 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 45 | + } |
| 46 | + } |
31 | 47 | }, |
32 | 48 | { |
33 | 49 | "label": "chaincode lifecycle - 5. commit", |
34 | 50 | "type": "shell", |
35 | | - "command": "./lib/btp-chaincode-lifecycle/chaincode.sh commit ${input:select-peer}", |
36 | | - "problemMatcher": [] |
| 51 | + "command": "./lib/btp-chaincode-lifecycle/chaincode.sh commit ${input:select-peer} ${input:select-orderer}", |
| 52 | + "options": { |
| 53 | + "env": { |
| 54 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 55 | + } |
| 56 | + } |
37 | 57 | }, |
38 | 58 | { |
39 | 59 | "label": "chaincode lifecycle - 6. init", |
40 | 60 | "type": "shell", |
41 | | - "command": "./lib/btp-chaincode-lifecycle/chaincode.sh init ${input:select-peer}", |
42 | | - "problemMatcher": [] |
| 61 | + "command": "./lib/btp-chaincode-lifecycle/chaincode.sh init ${input:select-peer} ${input:select-orderer}", |
| 62 | + "options": { |
| 63 | + "env": { |
| 64 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 65 | + } |
| 66 | + } |
43 | 67 | }, |
44 | 68 | { |
45 | 69 | "label": "chaincode - query", |
46 | 70 | "type": "shell", |
47 | 71 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh query ${input:select-peer} ${input:select-function-name} --arguments '[${input:select-function-args}]'", |
48 | | - "problemMatcher": [] |
| 72 | + "options": { |
| 73 | + "env": { |
| 74 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 75 | + } |
| 76 | + } |
49 | 77 | }, |
50 | 78 | { |
51 | 79 | "label": "chaincode - invoke", |
52 | 80 | "type": "shell", |
53 | | - "command": "./lib/btp-chaincode-lifecycle/chaincode.sh invoke ${input:select-peer} ${input:select-function-name} --arguments '[${input:select-function-args}]'", |
54 | | - "problemMatcher": [] |
| 81 | + "command": "./lib/btp-chaincode-lifecycle/chaincode.sh invoke ${input:select-peer} ${input:select-orderer} ${input:select-function-name} --arguments '[${input:select-function-args}]'", |
| 82 | + "options": { |
| 83 | + "env": { |
| 84 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 85 | + } |
| 86 | + } |
55 | 87 | }, |
56 | 88 | { |
57 | 89 | "label": "list - deployed chaincode", |
58 | 90 | "type": "shell", |
59 | 91 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh installed ${input:select-peer}", |
60 | | - "problemMatcher": [] |
| 92 | + "options": { |
| 93 | + "env": { |
| 94 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 95 | + } |
| 96 | + } |
61 | 97 | }, |
62 | 98 | { |
63 | 99 | "label": "list - approved chaincode", |
64 | 100 | "type": "shell", |
65 | 101 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh approved ${input:select-peer}", |
66 | | - "problemMatcher": [] |
| 102 | + "options": { |
| 103 | + "env": { |
| 104 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 105 | + } |
| 106 | + } |
67 | 107 | }, |
68 | 108 | { |
69 | 109 | "label": "list - committed chaincode", |
70 | 110 | "type": "shell", |
71 | 111 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh committed ${input:select-peer}", |
72 | | - "problemMatcher": [] |
| 112 | + "options": { |
| 113 | + "env": { |
| 114 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 115 | + } |
| 116 | + } |
73 | 117 | }, |
74 | 118 | { |
75 | 119 | "label": "list - peers", |
76 | 120 | "type": "shell", |
77 | 121 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh peers", |
78 | | - "problemMatcher": [] |
| 122 | + "options": { |
| 123 | + "env": { |
| 124 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 125 | + } |
| 126 | + } |
79 | 127 | }, |
80 | 128 | { |
81 | 129 | "label": "list - orderers", |
82 | 130 | "type": "shell", |
83 | 131 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh orderers", |
84 | | - "problemMatcher": [] |
| 132 | + "options": { |
| 133 | + "env": { |
| 134 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 135 | + } |
| 136 | + } |
85 | 137 | }, |
86 | 138 | { |
87 | 139 | "label": "list - nodes", |
88 | 140 | "type": "shell", |
89 | 141 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh nodes", |
90 | | - "problemMatcher": [] |
| 142 | + "options": { |
| 143 | + "env": { |
| 144 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 145 | + } |
| 146 | + } |
91 | 147 | }, |
92 | 148 | { |
93 | 149 | "label": "list - channels", |
94 | 150 | "type": "shell", |
95 | | - "command": "./lib/btp-chaincode-lifecycle/chaincode.sh channels", |
96 | | - "problemMatcher": [] |
| 151 | + "command": "./lib/btp-chaincode-lifecycle/chaincode.sh channels ${input:select-orderer}", |
| 152 | + "options": { |
| 153 | + "env": { |
| 154 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 155 | + } |
| 156 | + } |
97 | 157 | }, |
98 | 158 | { |
99 | 159 | "label": "channel - create", |
100 | 160 | "type": "shell", |
101 | | - "command": "./lib/btp-chaincode-lifecycle/chaincode.sh create-channel \"${input:create-channel-name}\" --endorsementPolicy \"${input:create-channel-endorsement-policy}\" --batchTimeoutInSeconds ${input:create-channel-batch-timeout-seconds} --maxMessageCount ${input:create-channel-max-message-count} --absoluteMaxMB ${input:create-channel-absolute-max-mb} --preferredMaxMB ${input:create-channel-preferred-max-mb}", |
102 | | - "problemMatcher": [] |
| 161 | + "command": "./lib/btp-chaincode-lifecycle/chaincode.sh create-channel ${input:select-orderer} \"${input:create-channel-name}\" --endorsementPolicy \"${input:create-channel-endorsement-policy}\" --batchTimeoutInSeconds ${input:create-channel-batch-timeout-seconds} --maxMessageCount ${input:create-channel-max-message-count} --absoluteMaxMB ${input:create-channel-absolute-max-mb} --preferredMaxMB ${input:create-channel-preferred-max-mb}", |
| 162 | + "options": { |
| 163 | + "env": { |
| 164 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 165 | + } |
| 166 | + } |
103 | 167 | }, |
104 | 168 | { |
105 | 169 | "label": "channel - orderer join", |
106 | 170 | "type": "shell", |
107 | 171 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh orderer-join-channel ${input:select-orderer} ${input:select-channel}", |
108 | | - "problemMatcher": [] |
| 172 | + "options": { |
| 173 | + "env": { |
| 174 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 175 | + } |
| 176 | + } |
109 | 177 | }, |
110 | 178 | { |
111 | 179 | "label": "channel - orderer leave", |
112 | 180 | "type": "shell", |
113 | 181 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh orderer-leave-channel ${input:select-orderer} ${input:select-channel}", |
114 | | - "problemMatcher": [] |
| 182 | + "options": { |
| 183 | + "env": { |
| 184 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 185 | + } |
| 186 | + } |
115 | 187 | }, |
116 | 188 | { |
117 | 189 | "label": "channel - peer join", |
118 | 190 | "type": "shell", |
119 | 191 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh peer-join-channel ${input:select-peer} ${input:select-channel}", |
120 | | - "problemMatcher": [] |
| 192 | + "options": { |
| 193 | + "env": { |
| 194 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 195 | + } |
| 196 | + } |
121 | 197 | }, |
122 | 198 | { |
123 | 199 | "label": "channel - peer leave", |
124 | 200 | "type": "shell", |
125 | 201 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh peer-leave-channel ${input:select-peer} ${input:select-channel}", |
126 | | - "problemMatcher": [] |
| 202 | + "options": { |
| 203 | + "env": { |
| 204 | + "BTP_SERVICE_TOKEN": "${input:enter-access-token}" |
| 205 | + } |
| 206 | + } |
127 | 207 | }, |
128 | 208 | { |
129 | 209 | "label": "help", |
130 | 210 | "type": "shell", |
131 | 211 | "command": "./lib/btp-chaincode-lifecycle/chaincode.sh help", |
132 | | - "problemMatcher": [] |
133 | 212 | } |
134 | 213 | ], |
135 | 214 | "inputs": [ |
| 215 | + { |
| 216 | + "id": "enter-access-token", |
| 217 | + "description": "Enter your access token (application access token scoped atleast to a peer and orderer node, or a personal access token)", |
| 218 | + "type": "promptString", |
| 219 | + "password": true |
| 220 | + }, |
136 | 221 | { |
137 | 222 | "id": "select-peer", |
138 | 223 | "description": "Which peer do you want to use?", |
|
0 commit comments