-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v2.x/staging' into bugfix/v2/ZWENOKYR
- Loading branch information
Showing
58 changed files
with
1,041 additions
and
465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
name: Build ompzowe/zowecicd-node-java builder | ||
on: | ||
# push: | ||
# pull_request: | ||
workflow_dispatch: | ||
inputs: | ||
release: | ||
description: 'Set to "true" if we want to release the base images' | ||
required: false | ||
default: '' | ||
RANDOM_DISPATCH_EVENT_ID: | ||
description: 'random dispatch event id' | ||
required: false | ||
type: string | ||
env: | ||
IMAGE_BASE_DIR: containers/server-bundle | ||
|
||
jobs: | ||
display-dispatch-event-id: | ||
if: github.event.inputs.RANDOM_DISPATCH_EVENT_ID != '' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: RANDOM_DISPATCH_EVENT_ID is ${{ github.event.inputs.RANDOM_DISPATCH_EVENT_ID }} | ||
run: echo "prints random dispatch event id sent from workflow dispatch event" | ||
|
||
build-ubuntu-amd64: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: zowe-actions/shared-actions/prepare-workflow@main | ||
|
||
- uses: zowe-actions/shared-actions/docker-prepare@main | ||
with: | ||
registry-user: ${{ secrets.ARTIFACTORY_X_USERNAME }} | ||
registry-password: ${{ secrets.ARTIFACTORY_X_PASSWORD }} | ||
release: ${{ github.event.inputs.release }} | ||
base-directory: ${{ env.IMAGE_BASE_DIR }} | ||
image-name: zowecicd-node-java | ||
linux-distro: ubuntu | ||
cpu-arch: amd64 | ||
|
||
- uses: zowe-actions/shared-actions/docker-build-local@main | ||
with: | ||
build-arg-list: NODE_CPU_ARCH=x64 | ||
timeout-minutes: 5 | ||
|
||
- name: Run Snyk to check Docker image for vulnerabilities | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
continue-on-error: true | ||
uses: snyk/actions/docker@master | ||
with: | ||
image: ${{ env.IMAGE_NAME_FULL_REMOTE }} | ||
args: --file=${{ env.IMAGE_DIRECTORY }}/Dockerfile.nodejava.amd64 | ||
command: test | ||
|
||
- name: Upload result to GitHub Code Scanning | ||
uses: github/codeql-action/upload-sarif@v1 | ||
if: hashFiles('snyk.sarif') != '' | ||
with: | ||
sarif_file: snyk.sarif | ||
|
||
build-ubuntu-s390x: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: zowe-actions/shared-actions/prepare-workflow@main | ||
|
||
- uses: zowe-actions/shared-actions/docker-prepare@main | ||
with: | ||
registry-user: ${{ secrets.ARTIFACTORY_X_USERNAME }} | ||
registry-password: ${{ secrets.ARTIFACTORY_X_PASSWORD }} | ||
release: ${{ github.event.inputs.release }} | ||
base-directory: ${{ env.IMAGE_BASE_DIR }} | ||
image-name: zowecicd-node-java | ||
linux-distro: ubuntu | ||
cpu-arch: s390x | ||
|
||
- uses: zowe-actions/shared-actions/docker-build-zlinux@main | ||
with: | ||
zlinux-host: ${{ secrets.ZLINUX_HOST }} | ||
zlinux-ssh-user: ${{ secrets.ZLINUX_SSH_USER }} | ||
zlinux-ssh-key: ${{ secrets.ZLINUX_SSH_KEY }} | ||
zlinux-ssh-passphrase: ${{ secrets.ZLINUX_SSH_PASSPHRASE }} | ||
build-arg-list: NODE_CPU_ARCH=s390x | ||
timeout-minutes: 10 | ||
|
||
- name: Run Snyk to check Docker image for vulnerabilities | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
continue-on-error: true | ||
uses: snyk/actions/docker@master | ||
with: | ||
image: ${{ env.IMAGE_NAME_FULL_REMOTE }} | ||
args: --file=${{ env.IMAGE_DIRECTORY }}/Dockerfile.nodejava.s390x | ||
command: test | ||
|
||
- name: Upload result to GitHub Code Scanning | ||
uses: github/codeql-action/upload-sarif@v1 | ||
if: hashFiles('snyk.sarif') != '' | ||
with: | ||
sarif_file: snyk.sarif | ||
|
||
define-ubuntu-manifest: | ||
needs: | ||
- build-ubuntu-amd64 | ||
- build-ubuntu-s390x | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: zowe-actions/shared-actions/prepare-workflow@main | ||
|
||
- uses: zowe-actions/shared-actions/docker-prepare@main | ||
with: | ||
registry-user: ${{ secrets.ARTIFACTORY_X_USERNAME }} | ||
registry-password: ${{ secrets.ARTIFACTORY_X_PASSWORD }} | ||
release: ${{ github.event.inputs.release }} | ||
base-directory: ${{ env.IMAGE_BASE_DIR }} | ||
image-name: zowecicd-node-java | ||
linux-distro: ubuntu | ||
|
||
- uses: zowe-actions/shared-actions/docker-manifest@main | ||
with: | ||
linux-distro: ubuntu | ||
cpu-arch-list: "amd64 s390x" | ||
timeout-minutes: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ZWEL0102E|102|Invalid parameter %s. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
zwe diagnose -e ZWES0014I |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Display the message corresponding to the error code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
error-code|e|string|required||||Error Code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
This program and the accompanying materials are made available | ||
under the terms of the Eclipse Public License v2.0 which | ||
accompanies this distribution, and is available at | ||
https://www.eclipse.org/legal/epl-v20.html | ||
SPDX-License-Identifier: EPL-2.0 | ||
Copyright Contributors to the Zowe Project. | ||
*/ | ||
|
||
import * as index from './index'; | ||
index.execute(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
|
||
####################################################################### | ||
# This program and the accompanying materials are made available | ||
# under the terms of the Eclipse Public License v2.0 which | ||
# accompanies this distribution, and is available at | ||
# https://www.eclipse.org/legal/epl-v20.html | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Copyright Contributors to the Zowe Project. | ||
####################################################################### | ||
|
||
error_code="${ZWE_CLI_PARAMETER_ERROR_CODE}" | ||
|
||
server_code=$(echo "${error_code}" | cut -c4) | ||
|
||
if echo $error_code | grep -q -E "^[zZ][wW][eE][AaSsDdLl][A-Za-z]?[0-9]{3,4}[A-Za-z]$"; then | ||
if [[ "$server_code" == [Dd] ]]; then | ||
print_message "This code corresponds to the errors related to the ZOWE Desktop and the App Server." | ||
print_message "To find the description of this error code, refer to the Zowe documentation at https://github.com/zowe/docs-site/blob/master/docs/troubleshoot/app-framework/appserver-error-codes.md" | ||
elif [[ "$server_code" == [Ss] ]]; then | ||
print_message "This code corresponds to the errors related to the Zowe Subsystem Services (ZSS) and Zowe Installation Services (ZIS)" | ||
print_message "To find the description of this error code, refer to the Zowe documentation for ZSS at https://docs.zowe.org/stable/troubleshoot/app-framework/zss-error-codes and for ZIS at https://github.com/zowe/docs-site/blob/master/docs/troubleshoot/app-framework/zis-error-codes.md" | ||
elif [[ "$server_code" == [Aa] ]]; then | ||
print_message "This code corresponds to the errors related to the Zowe API Mediation Layer (APIML)." | ||
print_message "To find the description of this error code, refer to the Zowe documentation at https://docs.zowe.org/stable/troubleshoot/troubleshoot-apiml-error-codes" | ||
elif [[ "$server_code" == [Ll] ]]; then | ||
print_message "This code corresponds to the errors related to the Zowe Launcher and ZWE" | ||
print_message "To find the description of this error code, refer to the Zowe documentation for the Launcher at https://docs.zowe.org/stable/troubleshoot/launcher/launcher-error-codes and https://github.com/zowe/launcher/blob/v2.x/master/src/msg.h, and for ZWE at https://docs.zowe.org/stable/appendix/zwe_server_command_reference/zwe/ " | ||
fi | ||
print_message "You may also explore reports from other users experiencing the same error by searching here https://github.com/search?q=org%3Azowe+${error_code}&type=discussions" | ||
else | ||
print_error_and_exit "Invalid Error Code" "" 102 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
This program and the accompanying materials are made available | ||
under the terms of the Eclipse Public License v2.0 which | ||
accompanies this distribution, and is available at | ||
https://www.eclipse.org/legal/epl-v20.html | ||
SPDX-License-Identifier: EPL-2.0 | ||
Copyright Contributors to the Zowe Project. | ||
*/ | ||
|
||
import * as std from 'cm_std'; | ||
import * as common from '../../libs/common'; | ||
|
||
export function execute() { | ||
const errorCode: string = std.getenv('ZWE_CLI_PARAMETER_ERROR_CODE'); | ||
|
||
const serverCode: string = errorCode.charAt(3); | ||
|
||
if (/^[zZ][wW][eE][AaSsDdLl][A-Za-z]?[0-9]{3,4}[A-Za-z]$/.test(errorCode)) { | ||
if (serverCode.toLowerCase() === 'd') { | ||
common.printMessage("This code corresponds to the errors related to the ZOWE Desktop and the App Server."); | ||
common.printMessage("To find the description of this error code, refer to the Zowe documentation at https://github.com/zowe/docs-site/blob/master/docs/troubleshoot/app-framework/appserver-error-codes.md"); | ||
} else if (serverCode.toLowerCase() === 's') { | ||
common.printMessage("This code corresponds to the errors related to the Zowe Subsystem Services (ZSS) and Zowe Installation Services (ZIS)"); | ||
common.printMessage("To find the description of this error code, refer to the Zowe documentation for ZSS at https://docs.zowe.org/stable/troubleshoot/app-framework/zss-error-codes and for ZIS at https://github.com/zowe/docs-site/blob/master/docs/troubleshoot/app-framework/zis-error-codes.md"); | ||
} else if (serverCode.toLowerCase() === 'a') { | ||
common.printMessage("This code corresponds to the errors related to the Zowe API Mediation Layer (APIML)."); | ||
common.printMessage("To find the description of this error code, refer to the Zowe documentation at https://docs.zowe.org/stable/troubleshoot/troubleshoot-apiml-error-codes"); | ||
} else if (serverCode.toLowerCase() === 'l') { | ||
common.printMessage("This code corresponds to the errors related to the Zowe Launcher and ZWE"); | ||
common.printMessage("To find the description of this error code, refer to the Zowe documentation for the Launcher at https://docs.zowe.org/stable/troubleshoot/launcher/launcher-error-codes and https://github.com/zowe/launcher/blob/v2.x/master/src/msg.h, and for ZWE at https://docs.zowe.org/stable/appendix/zwe_server_command_reference/zwe/"); | ||
} | ||
common.printMessage(`You may also explore reports from other users experiencing the same error by searching here https://github.com/search?q=org%3Azowe+${errorCode}&type=discussions`) | ||
} else { | ||
common.printErrorAndExit("Invalid Error Code", undefined, 102); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.