Skip to content

Commit

Permalink
Update dependencies and implement github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Coulthard <a.p.coulthard@uk.ibm.com>
  • Loading branch information
Adam Coulthard committed Jun 5, 2024
1 parent 1683280 commit 3ecc475
Show file tree
Hide file tree
Showing 8 changed files with 554 additions and 85 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Node CI

on: [push]

jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: npm install, build, and test
run: |
echo "Running npm install"
npm install
echo "Running npm run build"
npm run build
echo "Running npm run test:unit"
npm run test:unit || true
- name: npm pack
run: |
echo "Running npm pack"
npm pack
- name: Archive package
uses: actions/upload-artifact@v4
with:
name: zowe-cli-cics-deploy-plugin
path: zowe-cli-cics-deploy-plugin-*.tgz
2 changes: 1 addition & 1 deletion __tests__/__src__/TestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {ITestEnvironment} from "./environment/doc/response/ITestEnvironment";
* @returns node.js details about the results of
* executing the script, including exit code and output
*/
export function runCliScript(scriptPath: string, testEnvironment: ITestEnvironment, args: any[] = []): SpawnSyncReturns<Buffer> {
export function runCliScript(scriptPath: string, testEnvironment: ITestEnvironment, args: any[] = []): SpawnSyncReturns<string | Buffer> {
if (fs.existsSync(scriptPath)) {

// We force the color off to prevent any oddities in the snapshots or expected values
Expand Down
4 changes: 2 additions & 2 deletions __tests__/api/BundleContent/BundleMocked.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import { Bundle } from "../../../src/api/BundleContent/Bundle";
import * as fs from "fs";
import * as parser from "fast-xml-parser";
const { XMLParser } = require("fast-xml-parser");

// Note, the following tests mock the file-system. Snapshot based tests are unlikely to
// work as the jest implementation will itself need to interact with the filesystem.
Expand Down Expand Up @@ -569,7 +569,7 @@ describe("MockedFilesystemTests", () => {

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

jest.spyOn(parser, "parse").mockImplementationOnce(() => { throw new Error("Wibble"); });
jest.spyOn(XMLParser, "parse").mockImplementationOnce(() => { throw new Error("Wibble"); });

let err: Error;
try {
Expand Down
58 changes: 29 additions & 29 deletions docs/pages/cdp/CLIReadme.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ the target group of CICS regions\.
* Specifies the job card to use with any generated DFHDPLOY JCL\. Use this
parameter if you need to tailor the job card and you have not set the
\-\-cics\-deploy\-profile option\. You can separate multiple lines of the
jobcard with \n\.
jobcard with \\n\.

Default value: //DFHDPLOY JOB DFHDPLOY,CLASS=A,MSGCLASS=X,TIME=NOLIMIT

Expand Down Expand Up @@ -154,7 +154,7 @@ processing takes too long:
* `$ zowe cics-deploy deploy bundle --name EXAMPLE --bundle-directory /u/example/bundleDir --timeout 60`

* Deploy a CICS bundle to a specific target environment by
using specific zosmf & cics-deploy profiles:
using specific zosmf & cics\-deploy profiles:

* `$ zowe cics-deploy deploy bundle --name EXAMPLE --bundle-directory /u/example/bundleDir --cicsplex TESTPLEX --scope SCOPE --res-group BUNDGRP --cics-hlq CICSTS55.CICS720 --cpsm-hlq CICSTS55.CPSM550 --zosmf-profile testplex --cics-deploy-profile devcics`

Expand Down Expand Up @@ -188,7 +188,7 @@ required\.

* `--nodejsapp` | `-n` | `--nj` | `--nja` *(string)*

* The ID of the generated CICS NODEJSAPP resource, up to 32 characters\. If no
* The ID of the generated CICS NODEJSAPP resource, up to 32 characters\. If no
value is specified, a default value is created from the 'name' property in
package\.json, or the bundleid option if specified\. If the value is too long it
is truncated\. If it contains characters that are not supported by CICS, each
Expand Down Expand Up @@ -225,17 +225,17 @@ required\.
#### Examples

* Generate a CICS bundle in the working directory, taking
information from package.json:
information from package\.json:

* `$ zowe cics-deploy generate bundle`

* Generate a CICS bundle in the working directory, based on
package.json but using a bundle ID of "mybundle":
package\.json but using a bundle ID of "mybundle":

* `$ zowe cics-deploy generate bundle --bundle-id mybundle`

* Generate a CICS bundle in the working directory in which a
package.json does not exist:
package\.json does not exist:

* `$ zowe cics-deploy generate bundle --bundle-id mybundle --nodejsapp myapp --start-script server.js`

Expand Down Expand Up @@ -309,7 +309,7 @@ Push a CICS bundle from the working directory to a target CICSplex\.
* Specifies the job card to use with any generated DFHDPLOY JCL\. Use this
parameter if you need to tailor the job card and you have not set the
\-\-cics\-deploy\-profile option\. You can separate multiple lines of the
jobcard with \n\.
jobcard with \\n\.

Default value: //DFHDPLOY JOB DFHDPLOY,CLASS=A,MSGCLASS=X,TIME=NOLIMIT

Expand Down Expand Up @@ -447,12 +447,12 @@ Push a CICS bundle from the working directory to a target CICSplex\.
#### Examples

* Push a CICS bundle from the working directory by using
default cics-deploy, cics, ssh and zosmf profiles:
default cics\-deploy, cics, ssh and zosmf profiles:

* `$ zowe cics-deploy push bundle --name EXAMPLE --target-directory /u/example/bundles`

* Push a CICS bundle from the working directory by using
specific zosmf, ssh & cics-deploy profiles:
specific zosmf, ssh & cics\-deploy profiles:

* `$ zowe cics-deploy push bundle --name EXAMPLE --target-directory /u/example/bundles --zosmf-profile testplex --cics-deploy-profile devcics --ssh-profile ssh`

Expand Down Expand Up @@ -522,7 +522,7 @@ target group of CICS regions\.
* Specifies the job card to use with any generated DFHDPLOY JCL\. Use this
parameter if you need to tailor the job card and you have not set the
\-\-cics\-deploy\-profile option\. You can separate multiple lines of the
jobcard with \n\.
jobcard with \\n\.

Default value: //DFHDPLOY JOB DFHDPLOY,CLASS=A,MSGCLASS=X,TIME=NOLIMIT

Expand Down Expand Up @@ -585,7 +585,7 @@ target group of CICS regions\.

#### Examples

* Undeploy a CICS bundle by using the default cics-deploy and
* Undeploy a CICS bundle by using the default cics\-deploy and
zosmf profiles:

* `$ zowe cics-deploy undeploy bundle --name EXAMPLE`
Expand All @@ -596,12 +596,12 @@ processing takes too long:
* `$ zowe cics-deploy undeploy bundle --name EXAMPLE --timeout 60`

* Undeploy a CICS bundle from a specific target environment by
using specific zosmf and cics-deploy profiles:
using specific zosmf and cics\-deploy profiles:

* `$ zowe cics-deploy undeploy bundle --name EXAMPLE --cics-plex TESTPLEX --scope SCOPE --res-group BUNDGRP --cics-hlq CICSTS55.CICS720 --cpsm-hlq CICSTS55.CPSM550 --zosmf-profile testplex --cics-deploy-profile devcics`

# profiles<a name="module-profiles"></a>
Create and manage configuration profiles
Create and manage configuration profiles.
## create | cre<a name="module-create"></a>
Create new configuration profiles.
### cics-deploy-profile<a name="command-cics-deploy-profile"></a>
Expand Down Expand Up @@ -679,21 +679,21 @@ actions\.

#### Examples

* Create a cics-deploy profile called 'example1' to connect to
a CPSM managed group of CICS regions within the TESTGRP1 scope of a cicsplex
* Create a cics\-deploy profile called 'example1' to connect
to a CPSM managed group of CICS regions within the TESTGRP1 scope of a cicsplex
named PLEX1:

* `$ zowe profiles create cics-deploy-profile example1 --cicsplex PLEX1 --scope TESTGRP1 --cics-hlq CICSTS55.CICS720 --cpsm-hlq CICSTS55.CPSM550`

* Create a cics-deploy profile called 'example2' to connect to
the same CPSM managed group of regions, and identify a BAS resource group
* Create a cics\-deploy profile called 'example2' to connect
to the same CPSM managed group of regions, and identify a BAS resource group
BUNDGRP1 in which to store resource definitions:

* `$ zowe profiles create cics-deploy-profile example2 --cicsplex PLEX1 --scope TESTGRP1 --cics-hlq CICSTS55.CICS720 --cpsm-hlq CICSTS55.CPSM550 --res-group BUNDGRP1`

* Create a cics-deploy profile called 'example3' to connect to
the same CPSM managed group of regions, and identify the default USS directory
to which bundles should be uploaded:
* Create a cics\-deploy profile called 'example3' to connect
to the same CPSM managed group of regions, and identify the default USS
directory to which bundles should be uploaded:

* `$ zowe profiles create cics-deploy-profile example3 --cicsplex PLEX1 --scope TESTGRP1 --cics-hlq CICSTS55.CICS720 --cpsm-hlq CICSTS55.CPSM550 --target-directory /var/cicsts/bundles`

Expand Down Expand Up @@ -775,25 +775,25 @@ command\. By default, you will be prompted to confirm the profile removal\.

* `profileName` *(string)*

* Specifies the name of the cics\-deploy profile to be deleted\. You can also load
this profile by using the name on commands that support the
* Specifies the name of the cics\-deploy profile to be deleted\. You can also
load this profile by using the name on commands that support the
"\-\-cics\-deploy\-profile" option\.

#### Options

* `--force` *(boolean)*

* Force deletion of profile, and dependent profiles if specified\. No prompt will
be displayed before deletion occurs\.
be displayed before deletion occurs\.

#### Examples

* Delete a cics-deploy profile named profilename:
* Delete a cics\-deploy profile named profilename:

* `$ zowe profiles delete cics-deploy-profile profilename`

## list | ls<a name="module-list"></a>
List profiles of the type
List profiles of the type .
### cics-deploy-profiles<a name="command-cics-deploy-profiles"></a>
Specifies the target environment for the cics\-deploy deploy and undeploy
actions\.
Expand All @@ -806,16 +806,16 @@ actions\.

* `--show-contents` | `--sc` *(boolean)*

* List cics\-deploy profiles and their contents\. All profile details will be
* List cics\-deploy profiles and their contents\. All profile details will be
printed as part of command output\.

#### Examples

* List profiles of type cics-deploy:
* List profiles of type cics\-deploy:

* `$ zowe profiles list cics-deploy-profiles`

* List profiles of type cics-deploy and display their
* List profiles of type cics\-deploy and display their
contents:

* `$ zowe profiles list cics-deploy-profiles --sc`
Expand Down Expand Up @@ -844,7 +844,7 @@ requirements\.

#### Examples

* Set the default profile for type cics-deploy to the profile
* Set the default profile for type cics\-deploy to the profile
named 'profilename':

* `$ zowe profiles set-default cics-deploy-profile profilename`
Expand Down
Loading

0 comments on commit 3ecc475

Please sign in to comment.