Skip to content

Commit 9d4d2fb

Browse files
Merge dev in to master
2 parents d07ad12 + c4b623c commit 9d4d2fb

12 files changed

+84
-50
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ pipeline {
236236
//sh("npm set @zowe:registry https://api.bintray.com/npm/ca/brightside/")
237237
sh("npm set @zowe:registry https://registry.npmjs.org")
238238

239-
sh("npm install -g @zowe/cli@daily")
239+
sh("npm install -g @zowe/cli@latest")
240240
sh("zowe --version")
241241
}
242242
}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ The project was started in February 2019 and is at an early stage of development
66

77
To try it out, build the plug-in from source as described in [setup](docs-internal/tutorials/Setup.md).
88

9+
## Documentation
10+
You can find information and tutorials on using this plugin in our [documentation](https://ibm.github.io/zowe-cli-cics-deploy-plugin/index.html).
11+
912
## Contributing
1013
Contributions are welcome - see the [contribution guidelines](CONTRIBUTING.md). If you have a question or encounter a problem please raise an issue in this repo.

__tests__/api/BundlePush/BundlePusher.test.ts

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ describe("BundlePusher01", () => {
114114
lstatSpy = jest.spyOn(fs, "lstatSync").mockImplementation(() => ( IS_NOT_DIRECTORY ));
115115
cmciSpy = jest.spyOn(cmci, "getResource").mockImplementation(() => ({ response: { records: {} } }));
116116
consoleText = "";
117-
zosmfProfile = { host: "testhost", user: "testuser" };
118-
sshProfile = { host: "testhost", user: "testuser" };
117+
zosmfProfile = { host: "wibble", user: "user", password: "thisIsntReal" };
118+
sshProfile = { host: "wibble", user: "user", password: "thisIsntReal" };
119119
cicsProfile = undefined;
120120
});
121121
afterEach(() => {
@@ -226,15 +226,13 @@ describe("BundlePusher01", () => {
226226
expect(consoleText).not.toContain("WARNING: ssh profile");
227227
});
228228
it("should complain with mismatching zOSMF and CICS profile host names", async () => {
229-
cicsProfile = { host: "wibble", user: "testuser", password: "thisIsntReal", cicsPlex: "12345678", regionName: "12345678" };
229+
cicsProfile = { host: "different", user: "user", password: "thisIsntReal", cicsPlex: "12345678", regionName: "12345678" };
230230

231231
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
232232
"PUSH operation completed");
233-
expect(consoleText).toContain("WARNING: cics profile --host value 'wibble' does not match zosmf value 'testhost'.");
233+
expect(consoleText).toContain("WARNING: cics profile --host value 'different' does not match zosmf value 'wibble'.");
234234
});
235235
it("should not complain with matching zOSMF and CICS profile host names", async () => {
236-
zosmfProfile = { host: "wibble", user: "user" };
237-
sshProfile = { host: "wibble", user: "user" };
238236
cicsProfile = { host: "wibble", user: "user", password: "thisIsntReal", cicsPlex: "12345678", regionName: "12345678" };
239237

240238
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
@@ -274,9 +272,38 @@ describe("BundlePusher01", () => {
274272
"PUSH operation completed");
275273
expect(consoleText).toContain("WARNING: cics profile --user value 'joe' does not match zosmf value 'fred'.");
276274
});
275+
it("should complain with mismatching zOSMF and SSH profile passwords", async () => {
276+
zosmfProfile = { host: "wibble", user: "fred", password: "fakeZosmfPassword" };
277+
sshProfile = { host: "wibble", user: "fred", password: "fakeSshPassword" };
278+
279+
await runPushTestWithError("__tests__/__resources__/ExampleBundle01", false,
280+
"Incompatible security credentials exist in the zosmf and ssh profiles.");
281+
282+
expect(consoleText).not.toContain("fakeZosmfPassword");
283+
expect(consoleText).not.toContain("fakeSshPassword");
284+
});
285+
it("should tolerate mismatching zOSMF and SSH credentials if SSH keys are used", async () => {
286+
zosmfProfile = { host: "wibble", user: "fred", password: "fakeZosmfPassword" };
287+
sshProfile = { host: "wibble", user: "fred", privateKey: "fakeSshKey" };
288+
289+
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
290+
"PUSH operation completed");
291+
292+
expect(consoleText).not.toContain("fakeZosmfPassword");
293+
expect(consoleText).not.toContain("fakeSshKey");
294+
});
295+
it("should complain with mismatching zOSMF and cics profile passwords", async () => {
296+
zosmfProfile = { host: "wibble", user: "fred", password: "fakePassword" };
297+
sshProfile = { host: "wibble", user: "fred", password: "fakePassword" };
298+
cicsProfile = { host: "wibble", user: "fred", password: "fakePassword2", cicsPlex: "12345678" };
299+
300+
await runPushTestWithError("__tests__/__resources__/ExampleBundle01", false,
301+
"Incompatible security credentials exist in the zosmf and cics profiles.");
302+
303+
expect(consoleText).not.toContain("fakePassword");
304+
expect(consoleText).not.toContain("fakePassword2");
305+
});
277306
it("should complain with mismatching cics-deploy and CICS plex names", async () => {
278-
zosmfProfile = { host: "wibble", user: "fred" };
279-
sshProfile = { host: "wibble", user: "fred" };
280307
cicsProfile = { host: "wibble", user: "fred", password: "thisIsntReal", cicsPlex: "wibble", regionName: "12345678" };
281308

282309
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
@@ -1025,8 +1052,6 @@ describe("BundlePusher01", () => {
10251052
expect(cmciSpy).toHaveBeenCalledTimes(0);
10261053
});
10271054
it("should cope with a NODEJSAPP in the bundle with a CICS profile specified", async () => {
1028-
zosmfProfile = { host: "wibble", user: "user" };
1029-
sshProfile = { host: "wibble", user: "user" };
10301055
cicsProfile = { host: "wibble", user: "user", password: "thisIsntReal" };
10311056
submitSpy = jest.spyOn(SubmitJobs, "submitJclString").mockImplementation(() =>
10321057
[{ddName: "SYSTSPRT", stepName: "DFHDPLOY", data: "DFHRL2012I http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP"}] );
@@ -1046,8 +1071,6 @@ describe("BundlePusher01", () => {
10461071
expect(cmciSpy).toHaveBeenCalledTimes(1);
10471072
});
10481073
it("should query scope even with no NODEJSAPPs", async () => {
1049-
zosmfProfile = { host: "wibble", user: "user" };
1050-
sshProfile = { host: "wibble", user: "user" };
10511074
cicsProfile = { host: "wibble", user: "user", password: "thisIsntReal", cicsPlex: "12345678" };
10521075
readSpy = jest.spyOn(fs, "readFileSync").mockImplementation((data: string) => {
10531076
if (data.indexOf("cics.xml") > -1) {
@@ -1090,8 +1113,6 @@ describe("BundlePusher01", () => {
10901113
expect(cmciSpy).toHaveBeenCalledTimes(1);
10911114
});
10921115
it("should cope with a NODEJSAPP in the bundle with a CICS profile specified and --verbose", async () => {
1093-
zosmfProfile = { host: "wibble", user: "user" };
1094-
sshProfile = { host: "wibble", user: "user" };
10951116
cicsProfile = { host: "wibble", user: "user", password: "thisIsntReal" };
10961117
submitSpy = jest.spyOn(SubmitJobs, "submitJclString").mockImplementation(() =>
10971118
[{ddName: "SYSTSPRT", stepName: "DFHDPLOY", data: "DFHRL2012I http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP"}] );
@@ -1121,8 +1142,6 @@ describe("BundlePusher01", () => {
11211142
expect(cmciSpy).toHaveBeenCalledTimes(1);
11221143
});
11231144
it("should generate diagnostics even if deploy fails", async () => {
1124-
zosmfProfile = { host: "wibble", user: "user" };
1125-
sshProfile = { host: "wibble", user: "user" };
11261145
cicsProfile = { host: "wibble", user: "user", password: "thisIsntReal" };
11271146
submitSpy = jest.spyOn(SubmitJobs, "submitJclString").mockImplementation(() =>
11281147
[{ddName: "SYSTSPRT", stepName: "DFHDPLOY", data: "DFHRL2055I"}] );
@@ -1180,8 +1199,6 @@ describe("BundlePusher01", () => {
11801199
expect(cmciSpy).toHaveBeenCalledTimes(2);
11811200
});
11821201
it("should tolerate a Node.js diagnostics generation failure - region", async () => {
1183-
zosmfProfile = { host: "wibble", user: "user" };
1184-
sshProfile = { host: "wibble", user: "user" };
11851202
cicsProfile = { host: "wibble", user: "user", password: "thisIsntReal", cicsPlex: "12345678", regionName: "12345678" };
11861203
submitSpy = jest.spyOn(SubmitJobs, "submitJclString").mockImplementation(() =>
11871204
[{ddName: "SYSTSPRT", stepName: "DFHDPLOY", data: "DFHRL2012I http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP"}] );
@@ -1202,8 +1219,6 @@ describe("BundlePusher01", () => {
12021219
expect(cmciSpy).toHaveBeenCalledTimes(1);
12031220
});
12041221
it("should tolerate a Node.js diagnostics generation failure - nodejsapp", async () => {
1205-
zosmfProfile = { host: "wibble", user: "user" };
1206-
sshProfile = { host: "wibble", user: "user" };
12071222
cicsProfile = { host: "wibble", user: "user", password: "thisIsntReal", cicsPlex: "12345678", regionName: "12345678" };
12081223
submitSpy = jest.spyOn(SubmitJobs, "submitJclString").mockImplementation(() =>
12091224
[{ddName: "SYSTSPRT", stepName: "DFHDPLOY", data: "DFHRL2012I"}] );
@@ -1249,8 +1264,6 @@ describe("BundlePusher01", () => {
12491264
expect(cmciSpy).toHaveBeenCalledTimes(2);
12501265
});
12511266
it("should tolerate a Node.js diagnostics generation failure - nodejsapp empty", async () => {
1252-
zosmfProfile = { host: "wibble", user: "user" };
1253-
sshProfile = { host: "wibble", user: "user" };
12541267
cicsProfile = { host: "wibble", user: "user", password: "thisIsntReal", cicsPlex: "12345678", regionName: "12345678" };
12551268
submitSpy = jest.spyOn(SubmitJobs, "submitJclString").mockImplementation(() =>
12561269
[{ddName: "SYSTSPRT", stepName: "DFHDPLOY", data: "DFHRL2012I"}] );
@@ -1296,8 +1309,6 @@ describe("BundlePusher01", () => {
12961309
expect(cmciSpy).toHaveBeenCalledTimes(2);
12971310
});
12981311
it("should generate Node.js diagnostics for 1 enabled NODEJSAPP", async () => {
1299-
zosmfProfile = { host: "wibble", user: "user" };
1300-
sshProfile = { host: "wibble", user: "user" };
13011312
cicsProfile = { host: "wibble", user: "user", password: "thisIsntReal", cicsPlex: "12345678", regionName: "12345678" };
13021313
submitSpy = jest.spyOn(SubmitJobs, "submitJclString").mockImplementation(() =>
13031314
[{ddName: "SYSTSPRT", stepName: "DFHDPLOY", data: "DFHRL2012I"}] );
@@ -1355,8 +1366,6 @@ describe("BundlePusher01", () => {
13551366
expect(cmciSpy).toHaveBeenCalledTimes(2);
13561367
});
13571368
it("should generate Node.js diagnostics for 1 disabled NODEJSAPP", async () => {
1358-
zosmfProfile = { host: "wibble", user: "user" };
1359-
sshProfile = { host: "wibble", user: "user" };
13601369
cicsProfile = { host: "wibble", user: "user", password: "thisIsntReal", cicsPlex: "12345678", regionName: "12345678" };
13611370
submitSpy = jest.spyOn(SubmitJobs, "submitJclString").mockImplementation(() =>
13621371
[{ddName: "SYSTSPRT", stepName: "DFHDPLOY", data: "DFHRL2012I"}] );
@@ -1414,11 +1423,9 @@ describe("BundlePusher01", () => {
14141423
expect(cmciSpy).toHaveBeenCalledTimes(2);
14151424
});
14161425
it("should generate Node.js diagnostics for 2 NODEJSAPPs", async () => {
1417-
zosmfProfile = { host: "wibble", user: "user" };
1418-
sshProfile = { host: "wibble", user: "user" };
1419-
cicsProfile = { host: "wibble", user: "user", password: "thisIsntReal", cicsPlex: "12345678", regionName: "12345678" };
14201426
submitSpy = jest.spyOn(SubmitJobs, "submitJclString").mockImplementation(() =>
14211427
[{ddName: "SYSTSPRT", stepName: "DFHDPLOY", data: "DFHRL2012I"}] );
1428+
cicsProfile = { host: "wibble", user: "user", password: "thisIsntReal", cicsPlex: "12345678", regionName: "12345678" };
14221429
readSpy = jest.spyOn(fs, "readFileSync").mockImplementation((data: string) => {
14231430
if (data.indexOf("cics.xml") > -1) {
14241431
return "<manifest xmlns=\"http://www.ibm.com/xmlns/prod/cics/bundle\">" +

docs/_data/sidebars/cdp_sidebar.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ entries:
1515
- title: Requirements on z/OS
1616
url: cdp-Requirements.html
1717
output: web
18-
- title: Installation
19-
url: cdp-Installation.html
18+
- title: Installing
19+
url: cdp-Installing.html
2020
output: web
21-
- title: Create Zowe CLI profiles
22-
url: cdp-Create-Zowe-CLI-profiles.html
21+
- title: Creating Zowe CLI profiles
22+
url: cdp-Creating-Zowe-CLI-profiles.html
2323
output: web
2424

2525
- title: Tutorials
@@ -32,8 +32,8 @@ entries:
3232
- title: Deploying using individual actions
3333
url: cdp-Deploying-using-individual-actions.html
3434
output: web
35-
- title: Provision a CICS region with z/OS PT
36-
url: cdp-Provision-a-CICS-region-using-zospt.html
35+
- title: Provisioning a CICS region with z/OS PT
36+
url: cdp-Provisioning-a-CICS-region-using-zospt.html
3737
output: web
3838

3939
- title: Concepts

docs/pages/cdp/cdp-Create-Zowe-CLI-profiles.md renamed to docs/pages/cdp/cdp-Creating-Zowe-CLI-profiles.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Create Zowe CLI profiles
2+
title: Creating Zowe CLI profiles
33
tags: [getting_started, concepts]
44
keywords:
55
summary: "Zowe profiles let you store configuration details so you don't have to repeat them every time you use a Zowe CLI command."
66
sidebar: cdp_sidebar
7-
permalink: cdp-Create-Zowe-CLI-profiles.html
7+
permalink: cdp-Creating-Zowe-CLI-profiles.html
88
folder: cdp
99
---
1010

docs/pages/cdp/cdp-Deploying-your-first-nodejs-app.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ toc: true
1111

1212
### Before you begin
1313

14-
CICS TS V5.5 introduced support to run Node.js applications and is required by this tutorial. If you do not have a CICS TS V5.5 region, use the steps in [Provision a CICS region using z/OS PT](cdp-Provision-a-CICS-region-using-zospt) to provision one, or speak to your CICS system administrator.
14+
CICS TS V5.5 introduced support to run Node.js applications and is required by this tutorial. If you do not have a CICS TS V5.5 region, use the steps in [Provisioning a CICS region using z/OS PT](cdp-Provisioning-a-CICS-region-using-zospt) to provision one, or speak to your CICS system administrator.
1515

1616
### Procedure
1717

18-
1. Install the Zowe CLI and cics-deploy plugin by following the steps in [Installation](cdp-Installation).
18+
1. Install the Zowe CLI and cics-deploy plugin by following the steps in [Installing](cdp-Installing).
1919

20-
2. Create Zowe CLI profiles for z/OSMF, SSH, and cics-deploy by following the steps in [Create Zowe CLI profiles](cdp-Create-Zowe-CLI-profiles).
20+
2. Create Zowe CLI profiles for z/OSMF, SSH, and cics-deploy by following the steps in [Creating Zowe CLI profiles](cdp-Creating-Zowe-CLI-profiles).
2121

2222
3. Create a Node.js application using the [Express Application Generator](https://expressjs.com/en/starter/generator.html):
2323

docs/pages/cdp/cdp-Home.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ It provides a CICS deployment workflow for developers and CI/CD automation pipel
1212

1313
Before you start, and especially if you are not familiar with the world of z/OS, Zowe and CICS, it's a good idea to read about some of the key concepts, which include [Zowe](cdp-zowe-and-cli), [Zowe CLI profiles](cdp-zowe-profiles) and [CICS bundles](cdp-cics-bundles). If you're keen to get going quickly, you can jump right in and follow along with our tutorial on [Deploying your first Node.js app](cdp-Deploying-your-first-nodejs-app).
1414

15-
When everything is [installed](cdp-Installation) and you have [created the Zowe CLI profiles](cdp-Create-Zowe-CLI-profiles), you can deploy an application from your workstation to CICS in two steps:
15+
When everything is [installed](cdp-Installing) and you have [created the Zowe CLI profiles](cdp-Creating-Zowe-CLI-profiles), you can deploy an application from your workstation to CICS in two steps:
1616

1717
1. Use the [zowe cics-deploy generate bundle](cdp-CLIReadMe#generate--g--gen) command to generate some metadata and artifacts that help the target CICS system understand your application.
1818

docs/pages/cdp/cdp-Installation.md renamed to docs/pages/cdp/cdp-Installing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Installation
2+
title: Installing
33
tags: [getting_started]
44
keywords:
55
summary: "To install the Zowe CLI and cics-deploy plugin, perform the following steps. For clarity, these components are installed on your local workstation, not on z/OS."
66
sidebar: cdp_sidebar
7-
permalink: cdp-Installation.html
7+
permalink: cdp-Installing.html
88
folder: cdp
99
toc: false
1010
---

docs/pages/cdp/cdp-Provision-a-CICS-region-using-zospt.md renamed to docs/pages/cdp/cdp-Provisioning-a-CICS-region-using-zospt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Provision a CICS region using z/OS PT
2+
title: Provisioning a CICS region using z/OS PT
33
tags: [tutorial]
44
keywords:
55
summary: "The following steps take you through preparing a z/OS Provisioning Toolkit image for CICS, provisioning a CICS region using the image, and then starting, stopping and deprovisioning it."
66
sidebar: cdp_sidebar
7-
permalink: cdp-Provision-a-CICS-region-using-zospt.html
7+
permalink: cdp-Provisioning-a-CICS-region-using-zospt.html
88
folder: cdp
99
toc: true
1010
---

docs/pages/cdp/cdp-Troubleshooting-Symptoms.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ permalink: cdp-Troubleshooting-Symptoms.html
88
folder: cdp
99
---
1010

11-
{% include important.html content="To definitively diagnose a problem based on the suggested symptoms, you might need to refer to one or more [system logs and traces](cdp-Troubleshooting-General) particularly the STDERR Node.js log and the file assigned the MSGUSR DD name in the relevant CICS DFHDPLOY job. Depending on your familiarity with z/OS and CICS, and your system privileges, you may also need to consult a CICS systems administrator to get to the bottom of certain problems." %}
11+
{% include note.html content="For further troubleshooting steps, see [Troubleshooting Node.js applications](https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.5.0/troubleshooting/node/node-troubleshooting.html)." %}
12+
13+
{% include important.html content="To definitively diagnose a problem based on the suggested symptoms, you might need to refer to one or more [system logs and traces](cdp-Troubleshooting-General) particularly the STDERR Node.js log and the file assigned the MSGUSR DD name in the relevant CICS job. Depending on your familiarity with z/OS and CICS, and your system privileges, you may also need to consult a CICS systems administrator to get to the bottom of certain problems." %}
1214

1315
## Deployment errors
1416

@@ -100,5 +102,3 @@ The length must be between 1 and 8 (inclusive)
100102

101103
*Suggested action*:
102104
Review the error output text and reissue the original command having corrected the name of the option so that its length falls within acceptable limits.
103-
104-
{% include note.html content="For further troubleshooting steps, see [Troubleshooting Node.js applications](https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.5.0/troubleshooting/node/node-troubleshooting.html)." %}

0 commit comments

Comments
 (0)