Skip to content

Commit

Permalink
Merge pull request #75 from zowe/feat/support-zowe-v3
Browse files Browse the repository at this point in the history
Use zowe-v3-lts tag and remove profiles directory
  • Loading branch information
awharn authored Sep 25, 2024
2 parents 1ea84a5 + 6885690 commit cb92fe4
Show file tree
Hide file tree
Showing 117 changed files with 39 additions and 172,144 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,22 @@ jobs:
if: ${{ github.event.inputs.zowe-version && github.event.inputs.zowe-version != '' }}
run: |
curl -s https://raw.githubusercontent.com/zowe/zowe-cli-standalone-package/${{ github.event.inputs.zowe-version }}/master/zowe-versions.yaml > __zowe__version__
npm install -g @zowe/cli@$(yq '.packages.cli."zowe-v2-lts"' __zowe__version__ | tr -d '"')
zowe plugins install @zowe/cics-for-zowe-cli@$(yq '.packages."cics-for-zowe-cli"."zowe-v2-lts"' __zowe__version__ | tr -d '"')
zowe plugins install @zowe/db2-for-zowe-cli@$(yq '.packages."db2-for-zowe-cli"."zowe-v2-lts"' __zowe__version__ | tr -d '"')
zowe plugins install @zowe/ims-for-zowe-cli@$(yq '.packages."ims-for-zowe-cli"."zowe-v2-lts"' __zowe__version__ | tr -d '"')
zowe plugins install @zowe/mq-for-zowe-cli@$(yq '.packages."mq-for-zowe-cli"."zowe-v2-lts"' __zowe__version__ | tr -d '"')
zowe plugins install @zowe/zos-ftp-for-zowe-cli@$(yq '.packages."zos-ftp-for-zowe-cli"."zowe-v2-lts"' __zowe__version__ | tr -d '"')
npm install -g @zowe/cli@$(yq '.packages.cli."zowe-v3-lts"' __zowe__version__ | tr -d '"')
zowe plugins install @zowe/cics-for-zowe-cli@$(yq '.packages."cics-for-zowe-cli"."zowe-v3-lts"' __zowe__version__ | tr -d '"')
zowe plugins install @zowe/db2-for-zowe-cli@$(yq '.packages."db2-for-zowe-cli"."zowe-v3-lts"' __zowe__version__ | tr -d '"')
zowe plugins install @zowe/mq-for-zowe-cli@$(yq '.packages."mq-for-zowe-cli"."zowe-v3-lts"' __zowe__version__ | tr -d '"')
zowe plugins install @zowe/zos-ftp-for-zowe-cli@$(yq '.packages."zos-ftp-for-zowe-cli"."zowe-v3-lts"' __zowe__version__ | tr -d '"')
rm __zowe__version__
- name: Set Up Zowe
id: setup-zowe
if: ${{ steps.get-version-from-workflow.outcome == 'skipped' }}
run: |
npm install -g @zowe/cli@zowe-v2-lts
zowe plugins install @zowe/cics-for-zowe-cli@zowe-v2-lts
zowe plugins install @zowe/db2-for-zowe-cli@zowe-v2-lts
zowe plugins install @zowe/ims-for-zowe-cli@zowe-v2-lts
zowe plugins install @zowe/mq-for-zowe-cli@zowe-v2-lts
zowe plugins install @zowe/zos-ftp-for-zowe-cli@zowe-v2-lts
npm install -g @zowe/cli@zowe-v3-lts
zowe plugins install @zowe/cics-for-zowe-cli@zowe-v3-lts
zowe plugins install @zowe/db2-for-zowe-cli@zowe-v3-lts
zowe plugins install @zowe/mq-for-zowe-cli@zowe-v3-lts
zowe plugins install @zowe/zos-ftp-for-zowe-cli@zowe-v3-lts
- name: Get Zowe version
id: get-version
Expand All @@ -86,7 +84,7 @@ jobs:
zowe --version || true
npm run build:local -- ${{ github.event.inputs.zowe-version || steps.get-version.outputs.number }}
export margin="0.4in"
puppeteer print ./generatedWebHelp/docs/all.html ./zowe.pdf --margin-top $margin --margin-right $margin --margin-bottom $margin --margin-left $margin --no-sandbox
puppeteer print ./generatedWebHelp/docs/all.html ./zowe.pdf --margin-top $margin --margin-right $margin --margin-bottom $margin --margin-left $margin --no-sandbox
- name: Archive Results
id: upload
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@ on:
jobs:
remove-pr:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout Pages Branch
uses: actions/checkout@v4
with:
ref: 'gh-pages'

- name: Remove directory
env:
GITHUB_TOKEN: ${{ secrets.ZOWE_ROBOT_TOKEN }}
run: |
run: |
rm -rf docs/pr-${{ github.event.number }}
git config --global user.name ${{ secrets.ZOWE_ROBOT_USER }}
git config --global user.email ${{ secrets.ZOWE_ROBOT_EMAIL }}
git rm -r docs/pr-${{ github.event.number }}
git commit -sm "Remove Zowe Web Help for PR ${{ github.event.number }}"
git push origin HEAD
gh workflow run -r gh-pages deploy-pages.yml
gh workflow run -r gh-pages deploy-pages.yml
21 changes: 9 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,18 @@ jobs:

- name: Install Node Package Dependencies
id: install-node
run: |
run: |
npm i --prod
npm install -g puppeteer-cli
- name: Set Up Zowe
id: setup-zowe
run: |
npm install -g @zowe/cli@zowe-v2-lts
zowe plugins install @zowe/cics-for-zowe-cli@zowe-v2-lts
zowe plugins install @zowe/db2-for-zowe-cli@zowe-v2-lts
zowe plugins install @zowe/ims-for-zowe-cli@zowe-v2-lts
zowe plugins install @zowe/mq-for-zowe-cli@zowe-v2-lts
zowe plugins install @zowe/zos-ftp-for-zowe-cli@zowe-v2-lts
npm install -g @zowe/cli@zowe-v3-lts
zowe plugins install @zowe/cics-for-zowe-cli@zowe-v3-lts
zowe plugins install @zowe/db2-for-zowe-cli@zowe-v3-lts
zowe plugins install @zowe/mq-for-zowe-cli@zowe-v3-lts
zowe plugins install @zowe/zos-ftp-for-zowe-cli@zowe-v3-lts
- name: Get Zowe version
id: get-version
Expand All @@ -49,16 +48,14 @@ jobs:
- name: Setup zowe.json file
id: setup
run: |
jq '.commandGroups=["cics","db2","ims","mq","zos-ftp"]' zowe.template.json > zowe.json
echo "$(jq '.profiles=["cics", "db2","ims","mq","zftp"]' zowe.json)" > zowe.json
jq '.commandGroups=["cics","db2","mq","zos-ftp"]' zowe.template.json > zowe.json
npm run contribute
- name: Teardown Zowe Plugins
id: teardown-zowe
run: |
zowe plugins uninstall @zowe/cics-for-zowe-cli
zowe plugins uninstall @zowe/db2-for-zowe-cli
zowe plugins uninstall @zowe/ims-for-zowe-cli
zowe plugins uninstall @zowe/mq-for-zowe-cli
zowe plugins uninstall @zowe/zos-ftp-for-zowe-cli
Expand All @@ -69,7 +66,7 @@ jobs:
zowe --version || true
npm run build:local -- ${{ steps.get-version.outputs.number }}
export margin="0.4in"
puppeteer print ./generatedWebHelp/docs/all.html ./zowe.pdf --margin-top $margin --margin-right $margin --margin-bottom $margin --margin-left $margin --no-sandbox
puppeteer print ./generatedWebHelp/docs/all.html ./zowe.pdf --margin-top $margin --margin-right $margin --margin-bottom $margin --margin-left $margin --no-sandbox
- name: Archive Results
id: upload
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
readarray -t all_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.all_changed_files }}')"
for file in ${all_files[@]}; do
[[ ''${file}'' == *.jsonc ]] || (echo "Not a JSON file: ${file}" && exit 1)
[[ ''${file}'' == commandGroups/* ]] || [[ ''${file}'' == profiles/* ]] || (echo "Wrong location: ${file}" && exit 1)
[[ ''${file}'' == commandGroups/* ]] || (echo "Wrong location: ${file}" && exit 1)
done
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ To add your conformant plug-in's commands, perform the following steps:
If it is not already installed, see Step 3 in the [Installing](#installing) section.
2. Define command groups and profiles that your plug-in contributes.
2. Define command groups that your plug-in contributes.
- Copy the template file `zowe.template.json` to a new file named `zowe.json`. This file will be ignored by git.
- Customize this file to include the full names of command group(s) of your plug-in(s), and the name(s) of your plug-in's profile(s), like the following:
- Customize this file to include the full names of command group(s) of your plug-in(s), like the following:
```json
{
"commandGroups": ["zowe-cli-sample"],
"profiles": ["sample"]
"commandGroups": ["zowe-cli-sample"]
}
```
> **Note:** No @zowe scoped plug-ins should be included in this repository, and the above is merely for demonstration purposes.
Expand All @@ -63,7 +62,7 @@ To add your conformant plug-in's commands, perform the following steps:
```bash
npm run contribute
```
This will retrieve the CLI command tree from Zowe CLI and all installed plug-ins, and extract the above command group(s) and profile(s) to `.jsonc` files in the "commandGroups" and "profiles" directories.
This will retrieve the CLI command tree from Zowe CLI and all installed plug-ins, and extract the above command group(s) to `.jsonc` files in the "commandGroups" directory.

5. Commit new files back to the GitHub repository.

Expand All @@ -81,7 +80,7 @@ To preview web help with your plug-in included locally, perform the following st

1. Ensure the latest CLI and plug-ins are installed to generate up-to-date help.

Install the latest version of Zowe CLI, and all @zowe scoped plug-ins (CICS, DB2, FTP, IMS, and MQ for Zowe v2) if they are not already installed. If you do not have a globally installed Zowe CLI available, the CLI can also be accessed in this repository by running `npx zowe`.
Install the latest version of Zowe CLI, and all @zowe scoped plug-ins (CICS, DB2, FTP, and MQ for Zowe v2) if they are not already installed. If you do not have a globally installed Zowe CLI available, the CLI can also be accessed in this repository by running `npx zowe`.

2. Build web help that includes all plug-ins contributed to this repository.

Expand Down
Empty file added commandGroups/.gitkeep
Empty file.
Loading

0 comments on commit cb92fe4

Please sign in to comment.