From 4b885e62202e9b234c952a3258b46fdd6ec8a7b7 Mon Sep 17 00:00:00 2001 From: Amber Torrise Date: Mon, 8 May 2023 10:53:19 -0400 Subject: [PATCH 1/9] updating workflows and adding templates Signed-off-by: Amber Torrise --- .github/ISSUE_TEMPLATE/bug_report.md | 36 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 +++ .github/ISSUE_TEMPLATE/feature_request.md | 23 +++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++++ .github/label-actions.yml | 11 +++++++ .github/workflows/audit.yml | 4 +-- .github/workflows/auto-comment.yml | 16 ++++++++++ .github/workflows/changelog.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/linter.yml | 4 +-- .github/workflows/stale.yml | 39 +++++++++++++++++++++++ .github/workflows/zowe-cli-plugin.yml | 16 +++++----- 12 files changed, 160 insertions(+), 14 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/label-actions.yml create mode 100644 .github/workflows/auto-comment.yml create mode 100644 .github/workflows/stale.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..c653277 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,36 @@ +--- +name: Bug report +about: Create a report to help us improve +labels: bug, new +--- + + + + + +**Describe the bug** + + + +**Expected and actual results** + + +**Describe your environment** + + + +**Additional context** + + \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..eb02796 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Question + url: https://github.com/zowe/zowe-cli-secrets-for-kubernetes/discussions/categories/q-a + about: Please ask and answer questions here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..3a2a8a7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,23 @@ +--- +name: Feature request +about: Suggest an idea +labels: enhancement, new +--- + + + +**Is your feature or enhancement request related to a problem or limitation? Please describe** + + + +**Describe your enhancement idea** + + + +**Describe alternatives you've considered** + + + +**Provide any additional context** + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..849511b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +**What It Does** + + +**How to Test** + + +**Review Checklist** +I certify that I have: +- [ ] tested my changes +- [ ] added/updated automated tests +- [ ] updated the changelog +- [ ] followed the [contribution guidelines](https://github.com/zowe/zowe-cli/blob/master/CONTRIBUTING.md) + + +**Additional Comments** + \ No newline at end of file diff --git a/.github/label-actions.yml b/.github/label-actions.yml new file mode 100644 index 0000000..443c741 --- /dev/null +++ b/.github/label-actions.yml @@ -0,0 +1,11 @@ +bug: + comment: | + Thank you for creating a bug report. + We will investigate the bug and evaluate its impact on the product. + If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible. +enhancement: + comment: | + Thank you for raising this enhancement request. + The community has 90 days to vote on it. + If the enhancement receives at least 5 upvotes, it is added to our development backlog. + If it receives fewer votes, the issue is closed. \ No newline at end of file diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 5663f25..8a206a7 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -13,10 +13,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Use Node.js LTS - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: lts/* diff --git a/.github/workflows/auto-comment.yml b/.github/workflows/auto-comment.yml new file mode 100644 index 0000000..2a7a81f --- /dev/null +++ b/.github/workflows/auto-comment.yml @@ -0,0 +1,16 @@ +name: Auto Responder for New Issues +# This workflow is triggered when a label is added to an issue. +on: + issues: + types: labeled + +jobs: + processLabelAction: + name: Process Label Action + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Process Label Action + uses: hramos/respond-to-issue-based-on-label@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index cc3f7d1..84ea88f 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 085fc15..296401d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 67abfd2..481ff51 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -15,10 +15,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Use Node.js LTS - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: lts/* diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..4d7ac81 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,39 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '0 */6 * * *' + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v8 + with: + # General rules applied to both, issues and pull requests (PRs) + start-date: "2022-07-30T00:00:00Z" + days-before-close: 14 + days-before-stale: 90 + exempt-all-assignees: true + exempt-all-milestones: true + + # Rules applied to Issues + exempt-issue-labels: "Epic, bug, priority-critical, priority-high, community-upvoted, for-review, security, keep" + stale-issue-message: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. + close-issue-message: > + This issue has been automatically closed due to lack of activity. In an + effort to reduce noise, please do not comment any further. + + # Rules applied to PRs + exempt-pr-labels: "community-upvoted, for-review, security, keep" + stale-pr-message: > + This pull request has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. + close-pr-message: > + This pull request has been automatically closed due to lack of activity. In an + effort to reduce noise, please do not comment any further. \ No newline at end of file diff --git a/.github/workflows/zowe-cli-plugin.yml b/.github/workflows/zowe-cli-plugin.yml index db4303b..1171d6c 100644 --- a/.github/workflows/zowe-cli-plugin.yml +++ b/.github/workflows/zowe-cli-plugin.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [16.x, 18.x] os: [windows-latest, ubuntu-latest, macos-latest] env: @@ -28,7 +28,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 @@ -49,7 +49,7 @@ jobs: - name: Update Dependencies id: npm-update - uses: zowe-actions/octorelease-script@master + uses: zowe-actions/octorelease/script@v1 with: script: npmUpdate @@ -84,7 +84,7 @@ jobs: - name: Archive Results if: ${{ always() && steps.build.outcome == 'success' }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ matrix.os }}-${{ matrix.node-version }}-results path: __tests__/__results__/ @@ -102,14 +102,14 @@ jobs: # steps: # - name: Checkout - # uses: actions/checkout@v2 + # uses: actions/checkout@v3 # with: # fetch-depth: 0 # persist-credentials: false # ref: ${{ github.ref }} # - name: Use Node.js LTS - # uses: actions/setup-node@v2 + # uses: actions/setup-node@v3 # with: # node-version: 'lts/*' @@ -117,7 +117,7 @@ jobs: # run: npm ci # - name: Update Dependencies - # uses: zowe-actions/octorelease-script@master + # uses: zowe-actions/octorelease/script@v1 # env: # GIT_COMMITTER_NAME: ${{ secrets.ZOWE_ROBOT_USER }} # GIT_COMMITTER_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }} @@ -128,7 +128,7 @@ jobs: # - name: Build Source # run: npm run build - # - uses: zowe-actions/octorelease@master + # - uses: zowe-actions/octorelease@v1 # env: # GIT_COMMITTER_NAME: ${{ secrets.ZOWE_ROBOT_USER }} # GIT_COMMITTER_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }} From 06eff92a027dc28647bf9bcb09e5f1204082f2a7 Mon Sep 17 00:00:00 2001 From: Amber Torrise <112635587+ATorrise@users.noreply.github.com> Date: Tue, 9 May 2023 10:36:14 -0400 Subject: [PATCH 2/9] Update changelog.yml Signed-off-by: Amber Torrise <112635587+ATorrise@users.noreply.github.com> --- .github/workflows/changelog.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 84ea88f..d546401 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -18,8 +18,8 @@ jobs: - name: Check Changelog Updated id: checkchangelogupdated - uses: awharn/check_changelog_action@v0.0.2 + uses: awharn/check_changelog_action@v1 with: header: '## Recent Changes' file: 'CHANGELOG.md' - lerna: false \ No newline at end of file + lerna: false From 7e76f843698f314642332acffd5864fe7a0912fc Mon Sep 17 00:00:00 2001 From: Amber Torrise <112635587+ATorrise@users.noreply.github.com> Date: Tue, 9 May 2023 10:39:30 -0400 Subject: [PATCH 3/9] Update zowe-cli-plugin.yml Signed-off-by: Amber Torrise <112635587+ATorrise@users.noreply.github.com> --- .github/workflows/zowe-cli-plugin.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/zowe-cli-plugin.yml b/.github/workflows/zowe-cli-plugin.yml index 1171d6c..ee8f01d 100644 --- a/.github/workflows/zowe-cli-plugin.yml +++ b/.github/workflows/zowe-cli-plugin.yml @@ -40,10 +40,6 @@ jobs: echo "::remove-matcher owner=eslint-compact::" echo "::remove-matcher owner=eslint-stylish::" - - name: Update NPM - if: ${{ matrix.node-version == '14.x' }} - run: npm install -g npm@7 - - name: Install Dependencies run: npm ci @@ -64,9 +60,7 @@ jobs: - name: Start K3s Cluster id: k3s if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-latest' }} - uses: debianmaster/actions-k3s@master - with: - version: latest + uses: nolar/setup-k3d-k3s@latest - name: Create System Test Properties if: ${{ always() && steps.k3s.outcome == 'success' }} From c54c4638ad9a3b307125259611ff992aed13fce6 Mon Sep 17 00:00:00 2001 From: Amber Torrise <112635587+ATorrise@users.noreply.github.com> Date: Thu, 11 May 2023 11:14:30 -0400 Subject: [PATCH 4/9] switching to nolar/setup-k3d-k3s@v1 Signed-off-by: Amber Torrise <112635587+ATorrise@users.noreply.github.com> --- .github/workflows/zowe-cli-plugin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zowe-cli-plugin.yml b/.github/workflows/zowe-cli-plugin.yml index ee8f01d..8f5e143 100644 --- a/.github/workflows/zowe-cli-plugin.yml +++ b/.github/workflows/zowe-cli-plugin.yml @@ -60,7 +60,7 @@ jobs: - name: Start K3s Cluster id: k3s if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-latest' }} - uses: nolar/setup-k3d-k3s@latest + uses: nolar/setup-k3d-k3s@v1 - name: Create System Test Properties if: ${{ always() && steps.k3s.outcome == 'success' }} From 0aadba122a51e9be330ab39492b8a8ce39210c7e Mon Sep 17 00:00:00 2001 From: Amber Torrise <112635587+ATorrise@users.noreply.github.com> Date: Fri, 12 May 2023 15:30:13 -0400 Subject: [PATCH 5/9] ensure default namespace Signed-off-by: Amber Torrise <112635587+ATorrise@users.noreply.github.com> --- .github/workflows/zowe-cli-plugin.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/zowe-cli-plugin.yml b/.github/workflows/zowe-cli-plugin.yml index 8f5e143..b1b7216 100644 --- a/.github/workflows/zowe-cli-plugin.yml +++ b/.github/workflows/zowe-cli-plugin.yml @@ -61,6 +61,10 @@ jobs: id: k3s if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-latest' }} uses: nolar/setup-k3d-k3s@v1 + + - name: Set K8s Namespace + if: ${{ always() && steps.k3s.outcome == 'success' }} + run: kubectl config set-context --current --namespace=default - name: Create System Test Properties if: ${{ always() && steps.k3s.outcome == 'success' }} From e152ba8d50994de3faf6a1ee1df36e4e0239814a Mon Sep 17 00:00:00 2001 From: Amber Torrise <112635587+ATorrise@users.noreply.github.com> Date: Mon, 15 May 2023 09:31:26 -0400 Subject: [PATCH 6/9] keeping updates Signed-off-by: Amber Torrise <112635587+ATorrise@users.noreply.github.com> --- .github/workflows/zowe-cli-plugin.yml | 178 +++++++++++++------------- 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/.github/workflows/zowe-cli-plugin.yml b/.github/workflows/zowe-cli-plugin.yml index d3b38cb..d9d2510 100644 --- a/.github/workflows/zowe-cli-plugin.yml +++ b/.github/workflows/zowe-cli-plugin.yml @@ -1,94 +1,94 @@ -name: zowe-cli-plugin - on: [push, pull_request, workflow_dispatch] jobs: - test: - if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, '[ci skip]') - runs-on: ${{ matrix.os }} - outputs: - npm-resolutions: ${{ steps.npm-update.outputs.result }} - - strategy: - fail-fast: false - matrix: - node-version: [16.x, 18.x] - os: [windows-latest, ubuntu-latest, macos-latest] - - env: - OS: ${{ matrix.os }} - NODE: ${{ matrix.node-version }} - NODE_OPTIONS: --max_old_space_size=4096 - - timeout-minutes: 60 - - concurrency: - group: ${{ matrix.os }}-node-${{ matrix.node-version }}-ci-${{ github.ref }} - cancel-in-progress: true - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Disable Lint Annotations - run: | - echo "::remove-matcher owner=eslint-compact::" - echo "::remove-matcher owner=eslint-stylish::" - - - name: Install Dependencies - run: npm ci - - - name: Update Dependencies - id: npm-update - uses: zowe-actions/octorelease/script@v1 - with: - script: npmUpdate - - - name: Build Source - id: build - run: npm run build - - - name: Unit Tests - if: ${{ always() && steps.build.outcome == 'success' }} - run: npm run test:unit - - - name: Start K3s Cluster - id: k3s - if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-latest' }} - uses: nolar/setup-k3d-k3s@v1 - - - - name: Create System Test Properties - if: ${{ always() && steps.k3s.outcome == 'success' }} - run: > - echo "zosmf: - user: ibmuser - pass: plaintext - host: localhost - port: 12345 - " > packages/cli/__tests__/__resources__/properties/custom_properties.yaml - - - name: System Tests - if: ${{ always() && steps.k3s.outcome == 'success' }} - run: npm run test:system - - - name: Archive Results - if: ${{ always() && steps.build.outcome == 'success' }} - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.os }}-${{ matrix.node-version }}-results - path: __tests__/__results__/ - - - name: Upload Results to Codecov - if: ${{ always() && steps.build.outcome == 'success' }} - uses: codecov/codecov-action@v3 - with: - env_vars: OS,NODE + test: + if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, '[ci skip]') + runs-on: ${{ matrix.os }} + outputs: + npm-resolutions: ${{ steps.npm-update.outputs.result }} + + strategy: + fail-fast: false + matrix: + node-version: [14.x, 16.x, 18.x] + os: [windows-latest, ubuntu-latest, macos-latest] + + env: + OS: ${{ matrix.os }} + NODE: ${{ matrix.node-version }} + NODE_OPTIONS: --max_old_space_size=4096 + + timeout-minutes: 60 + + concurrency: + group: ${{ matrix.os }}-node-${{ matrix.node-version }}-ci-${{ github.ref }} + cancel-in-progress: true + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Disable Lint Annotations + run: | + echo "::remove-matcher owner=eslint-compact::" + echo "::remove-matcher owner=eslint-stylish::" + - name: Update NPM + run: npm install -g npm@8 + + - name: Install Dependencies + run: npm ci + + - name: Update Dependencies + id: npm-update + uses: zowe-actions/octorelease-script@master + with: + script: npmUpdate + + - name: Build Source + id: build + run: npm run build + + - name: Unit Tests + if: ${{ always() && steps.build.outcome == 'success' }} + run: npm run test:unit + + - name: Start K3s Cluster + id: k3s + if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-latest' }} + uses: debianmaster/actions-k3s@master + with: + version: latest + + - name: Create System Test Properties + if: ${{ always() && steps.k3s.outcome == 'success' }} + run: > + echo "zosmf: + user: ibmuser + pass: plaintext + host: localhost + port: 12345 + " > packages/cli/__tests__/__resources__/properties/custom_properties.yaml + - name: System Tests + if: ${{ always() && steps.k3s.outcome == 'success' }} + run: npm run test:system + + - name: Archive Results + if: ${{ always() && steps.build.outcome == 'success' }} + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.os }}-${{ matrix.node-version }}-results + path: __tests__/__results__/ + + - name: Upload Results to Codecov + if: ${{ always() && steps.build.outcome == 'success' }} + uses: codecov/codecov-action@v3 + with: + env_vars: OS,NODE # release: # if: github.event_name == 'push' && github.ref_protected @@ -131,4 +131,4 @@ jobs: # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # NPM_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} # NPM_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} - # NPM_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }} \ No newline at end of file + # NPM_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }} From 8b016500dddd03c15befa192c87d111a889ff296 Mon Sep 17 00:00:00 2001 From: Amber Torrise <112635587+ATorrise@users.noreply.github.com> Date: Mon, 15 May 2023 09:34:42 -0400 Subject: [PATCH 7/9] Update zowe-cli-plugin.yml Signed-off-by: Amber Torrise <112635587+ATorrise@users.noreply.github.com> --- .github/workflows/zowe-cli-plugin.yml | 172 +++++++++++++------------- 1 file changed, 84 insertions(+), 88 deletions(-) diff --git a/.github/workflows/zowe-cli-plugin.yml b/.github/workflows/zowe-cli-plugin.yml index d9d2510..2799d9c 100644 --- a/.github/workflows/zowe-cli-plugin.yml +++ b/.github/workflows/zowe-cli-plugin.yml @@ -1,94 +1,90 @@ on: [push, pull_request, workflow_dispatch] jobs: - test: - if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, '[ci skip]') - runs-on: ${{ matrix.os }} - outputs: - npm-resolutions: ${{ steps.npm-update.outputs.result }} - - strategy: - fail-fast: false - matrix: - node-version: [14.x, 16.x, 18.x] - os: [windows-latest, ubuntu-latest, macos-latest] - - env: - OS: ${{ matrix.os }} - NODE: ${{ matrix.node-version }} - NODE_OPTIONS: --max_old_space_size=4096 - - timeout-minutes: 60 - - concurrency: - group: ${{ matrix.os }}-node-${{ matrix.node-version }}-ci-${{ github.ref }} - cancel-in-progress: true - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Disable Lint Annotations - run: | - echo "::remove-matcher owner=eslint-compact::" - echo "::remove-matcher owner=eslint-stylish::" - - name: Update NPM - run: npm install -g npm@8 - - - name: Install Dependencies - run: npm ci - - - name: Update Dependencies - id: npm-update - uses: zowe-actions/octorelease-script@master - with: - script: npmUpdate - - - name: Build Source - id: build - run: npm run build - - - name: Unit Tests - if: ${{ always() && steps.build.outcome == 'success' }} - run: npm run test:unit - - - name: Start K3s Cluster - id: k3s - if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-latest' }} - uses: debianmaster/actions-k3s@master - with: - version: latest - - - name: Create System Test Properties - if: ${{ always() && steps.k3s.outcome == 'success' }} - run: > - echo "zosmf: - user: ibmuser - pass: plaintext - host: localhost - port: 12345 - " > packages/cli/__tests__/__resources__/properties/custom_properties.yaml - - name: System Tests - if: ${{ always() && steps.k3s.outcome == 'success' }} - run: npm run test:system - - - name: Archive Results - if: ${{ always() && steps.build.outcome == 'success' }} - uses: actions/upload-artifact@v2 - with: - name: ${{ matrix.os }}-${{ matrix.node-version }}-results - path: __tests__/__results__/ - - - name: Upload Results to Codecov - if: ${{ always() && steps.build.outcome == 'success' }} - uses: codecov/codecov-action@v3 - with: - env_vars: OS,NODE + test: + if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, '[ci skip]') + runs-on: ${{ matrix.os }} + outputs: + npm-resolutions: ${{ steps.npm-update.outputs.result }} + + strategy: + fail-fast: false + matrix: + node-version: [16.x, 18.x] + os: [windows-latest, ubuntu-latest, macos-latest] + + env: + OS: ${{ matrix.os }} + NODE: ${{ matrix.node-version }} + NODE_OPTIONS: --max_old_space_size=4096 + + timeout-minutes: 60 + + concurrency: + group: ${{ matrix.os }}-node-${{ matrix.node-version }}-ci-${{ github.ref }} + cancel-in-progress: true + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Disable Lint Annotations + run: | + echo "::remove-matcher owner=eslint-compact::" + echo "::remove-matcher owner=eslint-stylish::" + - name: Install Dependencies + run: npm ci + + - name: Update Dependencies + id: npm-update + uses: zowe-actions/octorelease/script@v1 + with: + script: npmUpdate + + - name: Build Source + id: build + run: npm run build + + - name: Unit Tests + if: ${{ always() && steps.build.outcome == 'success' }} + run: npm run test:unit + + - name: Start K3s Cluster + id: k3s + if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-latest' }} + uses: nolar/setup-k3d-k3s@v1 + + - name: Create System Test Properties + if: ${{ always() && steps.k3s.outcome == 'success' }} + run: > + echo "zosmf: + user: ibmuser + pass: plaintext + host: localhost + port: 12345 + " > packages/cli/__tests__/__resources__/properties/custom_properties.yaml + + - name: System Tests + if: ${{ always() && steps.k3s.outcome == 'success' }} + run: npm run test:system + + - name: Archive Results + if: ${{ always() && steps.build.outcome == 'success' }} + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.os }}-${{ matrix.node-version }}-results + path: __tests__/__results__/ + + - name: Upload Results to Codecov + if: ${{ always() && steps.build.outcome == 'success' }} + uses: codecov/codecov-action@v3 + with: + env_vars: OS,NODE # release: # if: github.event_name == 'push' && github.ref_protected From 6c543ba0193dabb3609babb3d59c4362798d0942 Mon Sep 17 00:00:00 2001 From: Amber Torrise Date: Mon, 15 May 2023 09:48:01 -0400 Subject: [PATCH 8/9] fixing butchering of file post merge conflict resolution with github editor Signed-off-by: Amber Torrise --- .github/workflows/zowe-cli-plugin.yml | 258 +++++++++++++------------- 1 file changed, 131 insertions(+), 127 deletions(-) diff --git a/.github/workflows/zowe-cli-plugin.yml b/.github/workflows/zowe-cli-plugin.yml index 2799d9c..8783e0d 100644 --- a/.github/workflows/zowe-cli-plugin.yml +++ b/.github/workflows/zowe-cli-plugin.yml @@ -1,130 +1,134 @@ +name: zowe-cli-plugin + on: [push, pull_request, workflow_dispatch] jobs: - test: - if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, '[ci skip]') - runs-on: ${{ matrix.os }} - outputs: - npm-resolutions: ${{ steps.npm-update.outputs.result }} - - strategy: - fail-fast: false - matrix: - node-version: [16.x, 18.x] - os: [windows-latest, ubuntu-latest, macos-latest] - - env: - OS: ${{ matrix.os }} - NODE: ${{ matrix.node-version }} - NODE_OPTIONS: --max_old_space_size=4096 - - timeout-minutes: 60 - - concurrency: - group: ${{ matrix.os }}-node-${{ matrix.node-version }}-ci-${{ github.ref }} - cancel-in-progress: true - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Disable Lint Annotations - run: | - echo "::remove-matcher owner=eslint-compact::" - echo "::remove-matcher owner=eslint-stylish::" - - name: Install Dependencies - run: npm ci - - - name: Update Dependencies - id: npm-update - uses: zowe-actions/octorelease/script@v1 - with: - script: npmUpdate - - - name: Build Source - id: build - run: npm run build - - - name: Unit Tests - if: ${{ always() && steps.build.outcome == 'success' }} - run: npm run test:unit - - - name: Start K3s Cluster - id: k3s - if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-latest' }} - uses: nolar/setup-k3d-k3s@v1 - - - name: Create System Test Properties - if: ${{ always() && steps.k3s.outcome == 'success' }} - run: > - echo "zosmf: - user: ibmuser - pass: plaintext - host: localhost - port: 12345 - " > packages/cli/__tests__/__resources__/properties/custom_properties.yaml - - - name: System Tests - if: ${{ always() && steps.k3s.outcome == 'success' }} - run: npm run test:system - - - name: Archive Results - if: ${{ always() && steps.build.outcome == 'success' }} - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.os }}-${{ matrix.node-version }}-results - path: __tests__/__results__/ - - - name: Upload Results to Codecov - if: ${{ always() && steps.build.outcome == 'success' }} - uses: codecov/codecov-action@v3 - with: - env_vars: OS,NODE - - # release: - # if: github.event_name == 'push' && github.ref_protected - # needs: test - # runs-on: ubuntu-latest - - # steps: - # - name: Checkout - # uses: actions/checkout@v3 - # with: - # fetch-depth: 0 - # persist-credentials: false - # ref: ${{ github.ref }} - - # - name: Use Node.js LTS - # uses: actions/setup-node@v3 - # with: - # node-version: 'lts/*' - - # - name: Install Dependencies - # run: npm ci - - # - name: Update Dependencies - # uses: zowe-actions/octorelease/script@v1 - # env: - # GIT_COMMITTER_NAME: ${{ secrets.ZOWE_ROBOT_USER }} - # GIT_COMMITTER_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }} - # NPM_RESOLUTIONS: ${{ needs.test.outputs.npm-resolutions }} - # with: - # script: npmUpdate - - # - name: Build Source - # run: npm run build - - # - uses: zowe-actions/octorelease@v1 - # env: - # GIT_COMMITTER_NAME: ${{ secrets.ZOWE_ROBOT_USER }} - # GIT_COMMITTER_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }} - # GIT_CREDENTIALS: x-access-token:${{ secrets.ZOWE_ROBOT_TOKEN }} - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # NPM_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} - # NPM_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} - # NPM_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }} + test: + if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, '[ci skip]') + runs-on: ${{ matrix.os }} + outputs: + npm-resolutions: ${{ steps.npm-update.outputs.result }} + + strategy: + fail-fast: false + matrix: + node-version: [16.x, 18.x] + os: [windows-latest, ubuntu-latest, macos-latest] + + env: + OS: ${{ matrix.os }} + NODE: ${{ matrix.node-version }} + NODE_OPTIONS: --max_old_space_size=4096 + + timeout-minutes: 60 + + concurrency: + group: ${{ matrix.os }}-node-${{ matrix.node-version }}-ci-${{ github.ref }} + cancel-in-progress: true + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Disable Lint Annotations + run: | + echo "::remove-matcher owner=eslint-compact::" + echo "::remove-matcher owner=eslint-stylish::" + - name: Update NPM + run: npm install -g npm@8 + + - name: Install Dependencies + run: npm ci + + - name: Update Dependencies + id: npm-update + uses: zowe-actions/octorelease/script@v1 + with: + script: npmUpdate + + - name: Build Source + id: build + run: npm run build + + - name: Unit Tests + if: ${{ always() && steps.build.outcome == 'success' }} + run: npm run test:unit + + - name: Start K3s Cluster + id: k3s + if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-latest' }} + uses: nolar/setup-k3d-k3s@v1 + + - name: Create System Test Properties + if: ${{ always() && steps.k3s.outcome == 'success' }} + run: > + echo "zosmf: + user: ibmuser + pass: plaintext + host: localhost + port: 12345 + " > packages/cli/__tests__/__resources__/properties/custom_properties.yaml + - name: System Tests + if: ${{ always() && steps.k3s.outcome == 'success' }} + run: npm run test:system + + - name: Archive Results + if: ${{ always() && steps.build.outcome == 'success' }} + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.os }}-${{ matrix.node-version }}-results + path: __tests__/__results__/ + + - name: Upload Results to Codecov + if: ${{ always() && steps.build.outcome == 'success' }} + uses: codecov/codecov-action@v3 + with: + env_vars: OS,NODE + + # release: + # if: github.event_name == 'push' && github.ref_protected + # needs: test + # runs-on: ubuntu-latest + + # steps: + # - name: Checkout + # uses: actions/checkout@v3 + # with: + # fetch-depth: 0 + # persist-credentials: false + # ref: ${{ github.ref }} + + # - name: Use Node.js LTS + # uses: actions/checkout@v3 + # with: + # node-version: 'lts/*' + + # - name: Install Dependencies + # run: npm ci + + # - name: Update Dependencies + # uses: zowe-actions/octorelease/script@v1 + # env: + # GIT_COMMITTER_NAME: ${{ secrets.ZOWE_ROBOT_USER }} + # GIT_COMMITTER_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }} + # NPM_RESOLUTIONS: ${{ needs.test.outputs.npm-resolutions }} + # with: + # script: npmUpdate + + # - name: Build Source + # run: npm run build + + # - uses: zowe-actions/octorelease@v1 + # env: + # GIT_COMMITTER_NAME: ${{ secrets.ZOWE_ROBOT_USER }} + # GIT_COMMITTER_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }} + # GIT_CREDENTIALS: x-access-token:${{ secrets.ZOWE_ROBOT_TOKEN }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # NPM_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} + # NPM_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} + # NPM_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }} \ No newline at end of file From 185c48f6e74b6d0345fcf9fecc0130f4db856f07 Mon Sep 17 00:00:00 2001 From: Amber Torrise Date: Mon, 15 May 2023 09:55:13 -0400 Subject: [PATCH 9/9] namespace Signed-off-by: Amber Torrise --- .github/workflows/zowe-cli-plugin.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/zowe-cli-plugin.yml b/.github/workflows/zowe-cli-plugin.yml index 8783e0d..6f2fac1 100644 --- a/.github/workflows/zowe-cli-plugin.yml +++ b/.github/workflows/zowe-cli-plugin.yml @@ -64,6 +64,10 @@ jobs: if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-latest' }} uses: nolar/setup-k3d-k3s@v1 + - name: Set K8s Namespace + if: ${{ always() && steps.k3s.outcome == 'success' }} + run: kubectl config set-context --current --namespace=default + - name: Create System Test Properties if: ${{ always() && steps.k3s.outcome == 'success' }} run: >