Skip to content

Commit 804c535

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into branch1
2 parents aa3fe7b + 115ad76 commit 804c535

25 files changed

+264
-195
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: 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 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/BundleContent/BundleMocked.test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,14 @@
1111

1212
import { Bundle } from "../../../src/api/BundleContent/Bundle";
1313
import * as fs from "fs";
14-
14+
import * as parser from "fast-xml-parser";
1515

1616
// Note, the following tests mock the file-system. Snapshot based tests are unlikely to
1717
// work as the jest implementation will itself need to interact with the filesystem.
1818
describe("MockedFilesystemTests", () => {
1919
afterEach(() => {
2020
jest.restoreAllMocks();
2121
});
22-
beforeAll(() => {
23-
// Allow xml2json to initialise itself before we start messing with the filesystem below it.
24-
const parser = require("xml2json");
25-
});
2622

2723
it("should tolerate META-INF directory not existing", () => {
2824
// Mocks for the manifest - META-INF exists
@@ -552,7 +548,7 @@ describe("MockedFilesystemTests", () => {
552548

553549
it("should complain if exceptions are thrown during manifest parsing", () => {
554550

555-
jest.spyOn(JSON, "parse").mockImplementationOnce(() => { throw new Error("Wibble"); });
551+
jest.spyOn(parser, "parse").mockImplementationOnce(() => { throw new Error("Wibble"); });
556552

557553
let err: Error;
558554
try {

__tests__/api/BundleContent/Manifest.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ describe("Manifest01", () => {
169169
}
170170

171171
// Check the output as JSON
172-
expect(err.message).toContain("Existing CICS Manifest file found with unparsable content.");
172+
expect(err.message).toContain("Existing CICS Manifest file found with unparsable content:");
173173
});
174174
it("Parse a manifest with bad namespace", () => {
175175

@@ -197,6 +197,6 @@ describe("Manifest01", () => {
197197
}
198198

199199
// Check the output as JSON
200-
expect(err.message).toContain("Existing CICS Manifest file found with unparsable content.");
200+
expect(err.message).toContain("Existing CICS Manifest file found with unparsable content:");
201201
});
202202
});

__tests__/api/BundleContent/__snapshots__/AutoBundler.test.ts.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ exports[`AutoBundler01 should not merge an existing bundle 1`] = `"{\\"manifest\
1212

1313
exports[`AutoBundler01 should read an existing bundle 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"bundleVersion\\":\\"1\\",\\"bundleRelease\\":\\"2\\",\\"id\\":\\"ThisIsAnId\\",\\"bundleMajorVer\\":\\"10\\",\\"bundleMinorVer\\":\\"11\\",\\"bundleMicroVer\\":\\"12\\",\\"define\\":[{\\"name\\":\\"name1\\",\\"type\\":\\"type1\\",\\"path\\":\\"path1\\"},{\\"name\\":\\"name2\\",\\"type\\":\\"type2\\",\\"path\\":\\"path2\\"},{\\"name\\":\\"name3\\",\\"type\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP\\",\\"path\\":\\"nodejsapps/Test.nodejsapp\\"}]}}"`;
1414

15-
exports[`AutoBundler01 should receive default values from package.json 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"$t\\":\\"\\",\\"id\\":\\"testBundleName\\",\\"bundleMajorVer\\":1,\\"bundleMinorVer\\":0,\\"bundleMicroVer\\":0,\\"define\\":[{\\"name\\":\\"testBundleName\\",\\"type\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP\\",\\"path\\":\\"nodejsapps/testBundleName.nodejsapp\\"}]}}"`;
15+
exports[`AutoBundler01 should receive default values from package.json 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"id\\":\\"testBundleName\\",\\"bundleMajorVer\\":1,\\"bundleMinorVer\\":0,\\"bundleMicroVer\\":0,\\"define\\":[{\\"name\\":\\"testBundleName\\",\\"type\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP\\",\\"path\\":\\"nodejsapps/testBundleName.nodejsapp\\"}]}}"`;
1616

17-
exports[`AutoBundler01 should set a nodejsapp name 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"$t\\":\\"\\",\\"id\\":\\"testBundleName\\",\\"bundleMajorVer\\":1,\\"bundleMinorVer\\":0,\\"bundleMicroVer\\":0,\\"define\\":[{\\"name\\":\\"MyExampleOverride\\",\\"type\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP\\",\\"path\\":\\"nodejsapps/MyExampleOverride.nodejsapp\\"}]}}"`;
17+
exports[`AutoBundler01 should set a nodejsapp name 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"id\\":\\"testBundleName\\",\\"bundleMajorVer\\":1,\\"bundleMinorVer\\":0,\\"bundleMicroVer\\":0,\\"define\\":[{\\"name\\":\\"MyExampleOverride\\",\\"type\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP\\",\\"path\\":\\"nodejsapps/MyExampleOverride.nodejsapp\\"}]}}"`;
1818

1919
exports[`AutoBundler01 should set a port number 1`] = `"Supplied Port is outside the range of 1-65535: -27"`;
2020

21-
exports[`AutoBundler01 should set the bundle version 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"$t\\":\\"\\",\\"bundleMajorVer\\":3,\\"bundleMinorVer\\":4,\\"bundleMicroVer\\":5}}"`;
21+
exports[`AutoBundler01 should set the bundle version 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"bundleMajorVer\\":3,\\"bundleMinorVer\\":4,\\"bundleMicroVer\\":5}}"`;
2222

23-
exports[`AutoBundler01 should set the bundleid 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"$t\\":\\"\\",\\"id\\":\\"test\\"}}"`;
23+
exports[`AutoBundler01 should set the bundleid 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"id\\":\\"test\\"}}"`;
2424

25-
exports[`AutoBundler01 should support main script from package.json 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"$t\\":\\"\\",\\"id\\":\\"testBundleName\\",\\"bundleMajorVer\\":1,\\"bundleMinorVer\\":0,\\"bundleMicroVer\\":0,\\"define\\":[{\\"name\\":\\"testBundleName\\",\\"type\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP\\",\\"path\\":\\"nodejsapps/testBundleName.nodejsapp\\"}]}}"`;
25+
exports[`AutoBundler01 should support main script from package.json 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"id\\":\\"testBundleName\\",\\"bundleMajorVer\\":1,\\"bundleMinorVer\\":0,\\"bundleMicroVer\\":0,\\"define\\":[{\\"name\\":\\"testBundleName\\",\\"type\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP\\",\\"path\\":\\"nodejsapps/testBundleName.nodejsapp\\"}]}}"`;
2626

2727
exports[`AutoBundler01 should tolerate an almost empty package.json 1`] = `"No startscript value set for NODEJSAPP \\"almostEmpty\\""`;
2828

__tests__/api/BundleContent/__snapshots__/BundleSimple.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`Bundle01 add a NODEJSAPP 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"$t\\":\\"\\",\\"define\\":[{\\"name\\":\\"NodeName\\",\\"type\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP\\",\\"path\\":\\"nodejsapps/NodeName.nodejsapp\\"}]}}"`;
3+
exports[`Bundle01 add a NODEJSAPP 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"define\\":[{\\"name\\":\\"NodeName\\",\\"type\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP\\",\\"path\\":\\"nodejsapps/NodeName.nodejsapp\\"}]}}"`;
44

55
exports[`Bundle01 add a NODEJSAPP 2`] = `
66
"<manifest xmlns=\\"http://www.ibm.com/xmlns/prod/cics/bundle\\"><define name=\\"NodeName\\" type=\\"http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP\\" path=\\"nodejsapps/NodeName.nodejsapp\\"></define></manifest>
@@ -25,4 +25,4 @@ exports[`Bundle01 should read an existing bundle 1`] = `"{\\"manifest\\":{\\"xml
2525
2626
exports[`Bundle01 should warn that an existing bundle cant be overwritten 1`] = `"A bundle manifest file already exists. Specify --overwrite to replace it, or --merge to merge changes into it."`;
2727
28-
exports[`Bundle01 tolerate an existing almost empty manifest 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"$t\\":\\"\\",\\"define\\":[{\\"name\\":\\"name1\\",\\"type\\":\\"type1\\",\\"path\\":\\"Artefact1\\"}]}}"`;
28+
exports[`Bundle01 tolerate an existing almost empty manifest 1`] = `"{\\"manifest\\":{\\"xmlns\\":\\"http://www.ibm.com/xmlns/prod/cics/bundle\\",\\"define\\":[{\\"name\\":\\"name1\\",\\"type\\":\\"type1\\",\\"path\\":\\"Artefact1\\"}]}}"`;

__tests__/api/BundlePush/BundlePusher.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ let zosmfProfile = {};
7474
let sshProfile = {};
7575
let cicsProfile = {};
7676

77-
// Initialise xml2json before mocking anything
78-
const parser = require("xml2json");
79-
8077
let zosMFSpy = jest.spyOn(ZosmfSession, "createBasicZosmfSession").mockImplementation(() => ({}));
8178
let sshSpy = jest.spyOn(SshSession, "createBasicSshSession").mockImplementation(() => ({}));
8279
let createSpy = jest.spyOn(Create, "uss").mockImplementation(() => ({}));
@@ -185,7 +182,7 @@ describe("BundlePusher01", () => {
185182
existsSpy.mockReturnValue(true);
186183
readSpy.mockImplementation((data: string) => ("wibble"));
187184
await runPushTestWithError("__tests__/__resources__/BadManifestBundle01", false,
188-
"Existing CICS Manifest file found with unparsable content.");
185+
"Existing CICS Manifest file found with unparsable content:");
189186
});
190187
it("should complain with missing manifest file", async () => {
191188
readSpy.mockImplementationOnce(() => {

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/_includes/head.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
<!-- most color styles are extracted out to here -->
1717
<link rel="stylesheet" href="css/theme-blue.css">
1818

19+
<!-- Added by C Harris on 5th June 2019 -->
20+
<style>
21+
@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Sans&display=swap');
22+
@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Mono&display=swap');
23+
</style>
24+
1925
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
2026

2127
<!-- Added by C Harris on 1st May 2019 - used for code copying buttons -->

0 commit comments

Comments
 (0)