Skip to content

Commit 2dacdd0

Browse files
authored
Merge branch 'dev' into master
2 parents 1cb00b1 + 73187f0 commit 2dacdd0

17 files changed

+315
-224
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ This project welcomes all contributions.
77
- If you would like to contribute a bug fix or small enhancement, please fork the repo and make a pull request.
88
- If you would like to contribute a new feature, please raise an issue describing your proposal so we can discuss it first.
99

10-
## Developing Zowe CLI plugins
10+
## Developing Zowe CLI plug-ins
1111

1212
For guidelines on developing Zowe CLI plug-ins see the [Zowe CLI GitHub repository](https://github.com/zowe/zowe-cli). The following information is critical to working with the code, running/writing/maintaining automated tests, developing consistent syntax and ensuring that the plug-in integrates with Zowe CLI properly:
1313

1414
| For more information about ... | See: |
1515
| ------------------------------ | ----- |
16-
| General guidelines that apply to contributing to Zowe CLI and Plug-ins | [Contribution Guidelines](https://github.com/zowe/zowe-cli/blob/master/CONTRIBUTING.md) |
16+
| General guidelines that apply to contributing to Zowe CLI and plug-ins | [Contribution Guidelines](https://github.com/zowe/zowe-cli/blob/master/CONTRIBUTING.md) |
1717
| Conventions and best practices for creating packages and plug-ins for Zowe CLI | [Package and Plug-in Guidelines](https://github.com/zowe/zowe-cli/blob/master/docs/PackagesAndPluginGuidelines.md)|
1818
| Guidelines for running tests on Zowe CLI | [Testing Guidelines](https://github.com/zowe/zowe-cli/blob/master/docs/TESTING.md) |
1919
| Guidelines for running tests on the plug-ins that you build for Zowe CLI | [Plug-in Testing Guidelines](https://github.com/zowe/zowe-cli/blob/master/docs/PluginTESTINGGuidelines.md) |
2020
| Documentation that describes the features of the Imperative CLI Framework | [About Imperative CLI Framework](https://github.com/zowe/imperative/wiki) |
21-
Versioning conventions for Zowe CLI and Plug-ins| [Versioning Guidelines](https://github.com/zowe/zowe-cli/blob/master/docs/MaintainerVersioning.md) |
21+
Versioning conventions for Zowe CLI and plug-ins| [Versioning Guidelines](https://github.com/zowe/zowe-cli/blob/master/docs/MaintainerVersioning.md) |

Jenkinsfile

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@
1313
// The following property need to be set for the HTML report @TODO figure out how to get this nicely on jenkins
1414
//System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")
1515

16-
/**
17-
* Release branches
18-
*/
19-
def RELEASE_BRANCHES = ["master"]
20-
21-
/**
22-
* Branches to send notifcations for
23-
*/
24-
def NOTIFY_BRANCHES = ["master"]
25-
26-
2716
/**
2817
* The following flags are switches to control which stages of the pipeline to be run. This is helpful when
2918
* testing a specific stage of the pipeline.
@@ -69,6 +58,22 @@ def SYSTEM_RESULTS = "${TEST_RESULTS_FOLDER}/system"
6958
*/
7059
def MASTER_BRANCH = "master"
7160

61+
/**
62+
* The name of the dev branch
63+
*/
64+
def DEV_BRANCH = "dev"
65+
66+
/**
67+
* Release branches
68+
*/
69+
def RELEASE_BRANCHES = [MASTER_BRANCH, DEV_BRANCH]
70+
71+
/**
72+
* Branches to send notifcations for
73+
*/
74+
def NOTIFY_BRANCHES = [MASTER_BRANCH, DEV_BRANCH]
75+
76+
7277
/**
7378
* Variables to check any new commit since the previous successful commit
7479
*/
@@ -94,7 +99,7 @@ def opts = []
9499

95100
// Setup a schedule to run build periodically
96101
// Run a build at 2.00AM everyday
97-
def CRON_STRING = BRANCH_NAME == MASTER_BRANCH ? "H 2 * * *" : ""
102+
def CRON_STRING = RELEASE_BRANCHES.contains(BRANCH_NAME) ? "H 2 * * *" : ""
98103

99104
if (RELEASE_BRANCHES.contains(BRANCH_NAME)) {
100105
// Only keep 20 builds
@@ -231,7 +236,7 @@ pipeline {
231236
//sh("npm set @zowe:registry https://api.bintray.com/npm/ca/brightside/")
232237
sh("npm set @zowe:registry https://registry.npmjs.org")
233238

234-
sh("npm install -g @zowe/cli@daily")
239+
sh("npm install -g @zowe/cli@latest")
235240
sh("zowe --version")
236241
}
237242
}
@@ -547,7 +552,7 @@ pipeline {
547552
return PIPELINE_CONTROL.deploy
548553
}
549554
expression {
550-
return BRANCH_NAME == MASTER_BRANCH
555+
return RELEASE_BRANCHES.contains(BRANCH_NAME)
551556
}
552557
expression {
553558
return GIT_COMMIT != GIT_PREVIOUS_SUCCESSFUL_COMMIT
@@ -601,7 +606,7 @@ pipeline {
601606
return PIPELINE_CONTROL.deploy
602607
}
603608
expression {
604-
return BRANCH_NAME == MASTER_BRANCH
609+
return RELEASE_BRANCHES.contains(BRANCH_NAME)
605610
}
606611
expression {
607612
return GIT_COMMIT != GIT_PREVIOUS_SUCCESSFUL_COMMIT
@@ -622,6 +627,9 @@ pipeline {
622627

623628
script {
624629
if (BRANCH_NAME == MASTER_BRANCH) {
630+
echo "publishing next to $TEST_NPM_REGISTRY"
631+
sh "npm publish --tag alpha"
632+
} else if (BRANCH_NAME == DEV_BRANCH) {
625633
echo "publishing next to $TEST_NPM_REGISTRY"
626634
sh "npm publish --tag next"
627635
} else {

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 plug-in 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

0 commit comments

Comments
 (0)