Skip to content

Commit

Permalink
Merge pull request #28 from zowe/fix-secrets
Browse files Browse the repository at this point in the history
Fix: secrets SDK usage
  • Loading branch information
zFernand0 authored Feb 5, 2024
2 parents be2e3f3 + 8ff1c16 commit a90c46b
Show file tree
Hide file tree
Showing 42 changed files with 8,020 additions and 5,098 deletions.
20 changes: 10 additions & 10 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ overrides:
rules:
no-magic-numbers: off
# There are several errors falling under these rules; resolve
"@typescript-eslint/require-await": warn
"@typescript-eslint/require-await": off
"@typescript-eslint/no-misused-promises": warn
"@typescript-eslint/no-unsafe-return": warn
"@typescript-eslint/restrict-plus-operands": warn
"@typescript-eslint/restrict-template-expressions": warn
"@typescript-eslint/explicit-function-return-type": warn
"@typescript-eslint/restrict-plus-operands": off
"@typescript-eslint/restrict-template-expressions": off
"@typescript-eslint/explicit-function-return-type": off
"@typescript-eslint/unbound-method": warn
parser: "@typescript-eslint/parser"
parserOptions:
ecmaVersion: 6
sourceType: module
project:
- "./tsconfig.json"
- "./tsconfig-tests.json"
- "./__tests__/test-tsconfig.json"
plugins:
- "@typescript-eslint"
rules:
"@typescript-eslint/await-thenable": off
"@typescript-eslint/consistent-type-assertions": warn
"@typescript-eslint/restrict-plus-operands": warn
"@typescript-eslint/restrict-plus-operands": off
"@typescript-eslint/explicit-member-accessibility": warn
"@typescript-eslint/explicit-function-return-type": warn
"@typescript-eslint/restrict-template-expressions": warn
"@typescript-eslint/explicit-function-return-type": off
"@typescript-eslint/restrict-template-expressions": off
indent": off
"@typescript-eslint/indent":
- error
Expand All @@ -50,7 +50,7 @@ rules:

"@typescript-eslint/no-shadow": error
"@typescript-eslint/no-unused-expressions": error
"@typescript-eslint/no-var-requires": warn
"@typescript-eslint/no-var-requires": off
array-callback-return: error
complexity:
- warn
Expand Down Expand Up @@ -91,4 +91,4 @@ rules:
# prefer-const: warn
prefer-object-spread: warn
space-in-parens: warn
root: true
root: true
47 changes: 12 additions & 35 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,15 @@
## Proposed changes
**What It Does**
<!-- A list of relevant issues, enhancements, fixed bugs, etc -->

<!-- Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. -->
**How to Test**
<!-- If a bug has been fixed, how can reviewers verify that the change(s) fixed it? -->

## Release Notes
**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)

Milestone:
<!-- Include the Milestone Number and a small description of your change that will be added to the changelog -->
<!-- If there is a linked issue, it should have the same milestone as this PR -->

Changelog:

## Types of changes

What types of changes does your code introduce to Zowe CICS Explorer?
_Put an `x` in the boxes that apply_

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Updates to Documentation or Tests (if none of the other choices apply)

## Checklist

_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This checklist will be used as reference for both the contributor and the reviewer_

- [ ] PR Description is included
- [ ] gif or screenshot is included if visual changes are made
- [ ] All checks have passed (DCO, Jenkins and Code Coverage)
- [ ] I have added unit test and it is passing
- [ ] There is coverage for the code that I have added
- [ ] I have tested it manually and there are no regressions found
- [ ] I have added necessary documentation (if appropriate)
- [ ] Any PR dependencies have been merged and published (if appropriate)

## Further comments

<!-- If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc... -->
**Additional Comments**
<!-- Anything else noteworthy about this pull request. This section is optional. -->
80 changes: 69 additions & 11 deletions .github/release.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
branches: [
{
name: "master",
name: "main",
channel: "latest",
level: "minor",
devDependencies: {
"@zowe/imperative": "zowe-v2-lts",
Expand All @@ -10,24 +11,81 @@ module.exports = {
},
{
name: "zowe-v1-lts",
channel: "zowe-v1-lts",
level: "patch",
devDependencies: {
"@zowe/imperative": "zowe-v1-lts",
"@zowe/zowe-explorer-api": "zowe-v1-lts",
}
},
{
name: "next",
channel: "next",
level: "major",
prerelease: true,
devDependencies: {
"@zowe/imperative": "next",
"@zowe/zowe-explorer-api": "next",
}
}
],
plugins: [
"@octorelease/changelog",
["@octorelease/npm", {
aliasTags: {
latest: ["zowe-v2-lts"]
[
"@octorelease/changelog",
{
displayNames: {
"cli": "IBM CICS Plug-in for Zowe CLI",
"sdk": "IBM CICS for Zowe SDK",
"vsce": "IBM CICS Extension for Zowe Explorer",
},
headerLine: "## Recent Changes",
},
],
[
"@octorelease/lerna",
{
pruneShrinkwrap: ["@zowe/cics-for-zowe-cli"],
// Use Lerna only for versioning and publish packages independently
npmPublish: false,
versionIndependent: ["cics-extension-for-zowe"],
},
],
[
"@octorelease/npm",
{
$cwd: "packages/sdk",
aliasTags: {
"latest": ["zowe-v2-lts"],
},
npmPublish: false,
tarballDir: "dist",
},
{
$cwd: "packages/cli",
aliasTags: {
"latest": ["zowe-v2-lts"],
},
npmPublish: false,
tarballDir: "dist",
},
],
[
"@octorelease/vsce",
{
$cwd: "packages/vsce",
ovsxPublish: false,
vscePublish: false,
vsixDir: "dist",
},
],
[
"@octorelease/github",
{
assets: ["dist/*.tgz", "dist/*.vsix"],
checkPrLabels: true,
draftRelease: true,
},
pruneShrinkwrap: false
}],
["@octorelease/github", {
checkPrLabels: true
}],
"@octorelease/git"
],
"@octorelease/git",
]
};
4 changes: 2 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js LTS
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*

Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/auto-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ jobs:
name: Process Label Action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hramos/respond-to-issue-based-on-label@v2
- uses: actions/checkout@v4

- name: Process Label Action
uses: hramos/respond-to-issue-based-on-label@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: '.github/label-actions.yml'
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check Changelog Updated
id: checkchangelogupdated
uses: awharn/check_changelog_action@v1
uses: awharn/check_changelog_action@temp-lerna
with:
header: '## Recent Changes'
file: 'CHANGELOG.md'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js LTS
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*

Expand Down
80 changes: 67 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Zowe CICS Main CI
on:
push:
paths:
- .github/**
- packages/**
pull_request:
paths:
Expand All @@ -19,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [16.x, 18.x]
node-version: [16.x, 18.x, 20.x]
os: [windows-latest, ubuntu-latest, macos-latest]

env:
Expand All @@ -35,10 +36,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -50,6 +51,13 @@ jobs:
- name: Install Dependencies
run: npm ci

- name: Update Dependencies
id: npm-update
uses: zowe-actions/octorelease/script@v1
with:
config-dir: .github
script: npmUpdate

- name: Build Source
id: build
run: npm run build
Expand All @@ -60,23 +68,69 @@ jobs:

- name: Archive Results
if: ${{ always() && steps.build.outcome == 'success' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.node-version }}-results
path: packages/*/__tests__/__results__/

- name: Upload Results to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
env_vars: OS,NODE

- name: Bundle all packages
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '18.x'
run: npm i -g vsce && npm run package
# - name: Bundle all packages
# if: matrix.os == 'ubuntu-latest' && matrix.node-version == '18.x'
# run: npm i -g vsce && npm run package

# - name: Archive all packages
# if: matrix.os == 'ubuntu-latest' && matrix.node-version == '18.x'
# uses: actions/upload-artifact@v4
# with:
# name: zowe-cics-client
# path: dist/*

release:
if: github.event_name == 'push' && github.ref_protected
needs: test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
ref: ${{ github.ref }}

- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install Dependencies
run: npm ci

- name: Update Dependencies
uses: zowe-actions/octorelease/script@v1
env:
GIT_COMMITTER_NAME: zowe_robot
GIT_COMMITTER_EMAIL: [email protected]
NPM_RESOLUTIONS: ${{ needs.test.outputs.npm-resolutions }}
with:
config-dir: .github
script: npmUpdate

- name: Build Source
run: npm run build

- name: Archive all packages
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '18.x'
uses: actions/upload-artifact@v3
- uses: zowe-actions/octorelease@fix/allow-first-time-publish2
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 }}
with:
name: zowe-cics-client
path: dist/*
config-dir: .github
Loading

0 comments on commit a90c46b

Please sign in to comment.