Skip to content

Commit a6cb0cc

Browse files
committed
2 parents 3b23c87 + 45eebaf commit a6cb0cc

File tree

5 files changed

+60
-24
lines changed

5 files changed

+60
-24
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ To save you having to type the above for every commit, Git can add the `Signed-o
9393

9494
If you haven't signed each commit, then the pull request will fail to pass all checks.
9595

96+
### Build and install the cics-deploy plugin
97+
```console
98+
git clone https://github.com/IBM/zowe-cli-cics-deploy-plugin
99+
cd zowe-cli-cics-deploy-plugin
100+
npm install
101+
npm run build
102+
zowe plugins install .
103+
```
96104

97105
## Developing Zowe CLI plug-ins
98106

__tests__/api/BundleDeploy/BundleDeployer.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,14 @@ describe("BundleDeployer01", () => {
391391
parms.arguments.jobcard = "'//DFHDPLOY JOB DFHDPLOY,'some text',CLASS=A,MSGCLASS=X,TIME=NOLIMIT'";
392392
await testDeployJCL(parms);
393393
});
394+
it("should tolerate a single leading slash for jobcard", async () => {
395+
396+
let parms: IHandlerParameters;
397+
parms = DEFAULT_PARAMTERS;
398+
setCommonParmsForDeployTests(parms);
399+
parms.arguments.jobcard = "/DFHDPLOY JOB DFHDPLOY,CLASS=A,MSGCLASS=X,TIME=NOLIMIT";
400+
await testDeployJCL(parms);
401+
});
394402
it("should support long bundledir", async () => {
395403
let parms: IHandlerParameters;
396404
parms = DEFAULT_PARAMTERS;

__tests__/api/BundleDeploy/__snapshots__/BundleDeployer.test.ts.snap

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,24 @@ UNDEPLOY BUNDLE(12345678)
578578
"
579579
`;
580580

581+
exports[`BundleDeployer01 should tolerate a single leading slash for jobcard 1`] = `
582+
"//DFHDPLOY JOB DFHDPLOY,CLASS=A,MSGCLASS=X,TIME=NOLIMIT
583+
//DFHDPLOY EXEC PGM=DFHDPLOY,REGION=100M
584+
//STEPLIB DD DISP=SHR,DSN=12345678901234567890123456789012345.SDFHLOAD
585+
// DD DISP=SHR,DSN=abcde12345abcde12345abcde12345abcde.SEYUAUTH
586+
//SYSTSPRT DD SYSOUT=*
587+
//SYSIN DD *
588+
*
589+
SET CICSPLEX(12345678);
590+
*
591+
DEPLOY BUNDLE(12345678)
592+
BUNDLEDIR(1234567890)
593+
SCOPE(12345678)
594+
STATE(ENABLED)
595+
/*
596+
"
597+
`;
598+
581599
exports[`BundleDeployer01 should tolerate bundledir with extra slasshes 1`] = `
582600
"//DFHDPLOY JOB DFHDPLOY,CLASS=A,MSGCLASS=X,TIME=NOLIMIT
583601
//DFHDPLOY EXEC PGM=DFHDPLOY,REGION=100M

docs/pages/cdp/cdp-Installing.md

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,19 @@ toc: false
2121
2. Install [Zowe CLI](https://zowe.github.io/docs-site/latest/user-guide/cli-installcli.html). For example, to install using npm:
2222

2323
```console
24-
sudo npm install -g @brightside/core
24+
npm install -g @brightside/core
2525
```
2626

27-
3. Build and install the cics-deploy plug-in as described in [Setting up your development environment](https://github.com/IBM/zowe-cli-cics-deploy-plugin/blob/master/docs-internal/tutorials/Setup.md). For example:
27+
3. Install the cics plugin:
2828

2929
```console
30-
mkdir ~/cics-deploy
31-
cd ~/cics-deploy
32-
rm -Rf *
33-
git clone https://github.com/IBM/zowe-cli-cics-deploy-plugin
34-
cd zowe-cli-cics-deploy-plugin
35-
npm install
36-
npm run build
37-
zowe plugins install .
30+
zowe plugins install @brightside/cics@lts-incremental
3831
```
3932

40-
4. Install the cics plugin:
33+
4. Install the cics-deploy plugin:
4134

4235
```console
43-
zowe plugins install @brightside/cics
36+
zowe plugins install zowe-cli-cics-deploy-plugin
4437
```
4538

4639
5. Verify the plug-ins are installed:
@@ -49,15 +42,16 @@ toc: false
4942
zowe plugins list
5043
```
5144

52-
Displays a list of the installed plug-ins:
45+
Displays a list of the installed plugins:
5346

54-
<pre class="messageText">
55-
-- pluginName: zowe-cli-cics-deploy-plugin
56-
-- package: zowe-cli-cics-deploy-plugin
57-
-- version: 0.5.0
58-
-- registry: https://eu.artifactory.swg-devops.com/artifactory/api/npm/cicsts-npm-virtual
47+
<pre class="messageText">
48+
Installed plugins:
5949

60-
-- pluginName: @zowe/cics
61-
-- package: @zowe/cics
62-
-- version: 2.0.1
63-
-- registry: https://eu.artifactory.swg-devops.com/artifactory/api/npm/cicsts-npm-virtual</pre>
50+
-- pluginName: @brightside/cics
51+
-- package: @brightside/cics@lts-incremental
52+
-- version: 1.1.1
53+
-- registry: https://registry.npmjs.org/<br>
54+
-- pluginName: zowe-cli-cics-deploy-plugin
55+
-- package: zowe-cli-cics-deploy-plugin
56+
-- version: 0.5.0
57+
-- registry: https://registry.npmjs.org/ </pre>

src/api/BundleDeploy/ParmValidator.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,19 @@ export class ParmValidator {
309309

310310
// split the jobcard into a comma separated list
311311
const jobcardParts = params.arguments.jobcard.split(",");
312-
const firstPart = jobcardParts[0].trim();
312+
let firstPart = jobcardParts[0].trim();
313313

314314
// check that it starts with '//'
315315
if (firstPart.indexOf("//") !== 0) {
316-
throw new Error("--jobcard parameter does not start with //");
316+
317+
// gitbash can swallow a '/' character. If we only have one then add another.
318+
if (firstPart.startsWith("/")) {
319+
params.arguments.jobcard = "/" + params.arguments.jobcard;
320+
firstPart = "/" + firstPart;
321+
}
322+
else {
323+
throw new Error("--jobcard parameter does not start with //");
324+
}
317325
}
318326

319327
// split the first section of the jobcard into chunks

0 commit comments

Comments
 (0)