Skip to content

Commit

Permalink
Merge branch 'v3.x/staging' into v3.x/bugfix/zosmfValidate
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkAckert authored Sep 6, 2024
2 parents 9e055cd + 01ad229 commit 3ac08d5
Show file tree
Hide file tree
Showing 21 changed files with 345 additions and 276 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/cicd-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
name: Zowe CICD Integration Tests

permissions:
contents: write
issues: write
pull-requests: write
statuses: write

on:
workflow_dispatch:
inputs:
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,10 @@ Please check details in [playbooks folder](playbooks/README.md).
## Quick Sanity Check on Your Zowe Instance

Please check details in [sanity test folder](tests/sanity/README.md).

<p>Hosting infrastructure for this project is supported by:</p>
<p>
<a href="https://www.digitalocean.com/?refcode=77a4454d32a1&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge">
<img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg" width="201px">
</a>
</p>
2 changes: 1 addition & 1 deletion bin/libs/zosmf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function validateZosmfHostAndPort(zosmfHost: string, zosmfPort: number):
common.printError(`Warning: Could not validate if z/OS MF is available on 'https://${zosmfHost}:${zosmfPort}/zosmf/info'. NODE_HOME is not defined.`);
zosmfCheckPassed=false;
} else {
let execReturn = shell.execOutSync(`${std.getenv('NODE_HOME')}/bin/node`, `${std.getenv('ZWE_zowe_runtimeDirectory')}/bin/utils/curl.js`, `"https://${zosmfHost}:${zosmfPort}/zosmf/info"`, `-k`, `-H`, `"X-CSRF-ZOSMF-HEADER: true"`, `--response-type`, `status`);
const execReturn = shell.execOutSync(`${std.getenv('NODE_HOME')}/bin/node`, `${std.getenv('ZWE_zowe_runtimeDirectory')}/bin/utils/curl.js`, `https://${zosmfHost}:${zosmfPort}/zosmf/info`, `-k`, `-H`, `X-CSRF-ZOSMF-HEADER: true`, `--response-type`, `status`);
if (execReturn.rc || !execReturn.out) {
common.printError(`Warning: Could not validate if z/OS MF is available on 'https://${zosmfHost}:${zosmfPort}/zosmf/info'. No response code from z/OSMF server.`);
zosmfCheckPassed=false
Expand Down
24 changes: 12 additions & 12 deletions containers/base-jdk/ubi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
# Copyright Contributors to the Zowe Project.
#######################################################################

FROM zowe-docker-release.jfrog.io/ompzowe/base:latest-ubi
FROM zowe-docker-release.jfrog.io/ompzowe/base:3-ubi

##################################
# labels
LABEL name="Zowe Base Image with JDK enabled" \
maintainer="jack-tiefeng.jia@ibm.com" \
vendor="Zowe" \
version="2.0.2" \
release="0" \
summary="Base image for Zowe components with JDK enabled" \
description="Base image for Zowe components with JDK enabled"
maintainer="mark.ackert@broadcom.com" \
vendor="Zowe" \
version="3.0.0" \
release="0" \
summary="Base image for Zowe components with JDK enabled" \
description="Base image for Zowe components with JDK enabled"

##################################
# Install JDK
RUN microdnf install --nodocs \
java-1.8.0-openjdk \
&& microdnf clean all --enablerepo='*' \
# smoke tests
&& java -version
ENV JAVA_HOME=/usr/lib/jvm/jre-1.8.0
java-17-openjdk-headless \
&& microdnf clean all --enablerepo='*' \
# smoke tests
&& java -version
ENV JAVA_HOME=/usr/lib/jvm/jre-1.17.0
29 changes: 15 additions & 14 deletions containers/base-jdk/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,25 @@
# Copyright Contributors to the Zowe Project.
#######################################################################

FROM zowe-docker-release.jfrog.io/ompzowe/base:latest-ubuntu
FROM zowe-docker-release.jfrog.io/ompzowe/base:3-ubuntu

##################################
# labels
LABEL name="Zowe Base Image with JDK enabled" \
maintainer="jack-tiefeng.jia@ibm.com" \
vendor="Zowe" \
version="2.0.2" \
release="0" \
summary="Base image for Zowe components with JDK enabled" \
description="Base image for Zowe components with JDK enabled"
maintainer="mark.ackert@broadcom.com" \
vendor="Zowe" \
version="3.0.0" \
release="0" \
summary="Base image for Zowe components with JDK enabled" \
description="Base image for Zowe components with JDK enabled"

##################################
# Install JDK

# Install JDK.
RUN apt-get update \
&& apt-get install -y \
openjdk-8-jre \
&& rm -rf /var/lib/apt/lists/* \
# smoke tests
&& java -version
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
&& apt-get install -y \
openjdk-17-jre \
&& rm -rf /var/lib/apt/lists/* \
# smoke tests
&& java -version
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/jre
14 changes: 7 additions & 7 deletions containers/base-node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
#######################################################################

# base image tag
ARG ZOWE_BASE_IMAGE=latest-ubuntu
ARG ZOWE_BASE_IMAGE=3-ubuntu

FROM zowe-docker-release.jfrog.io/ompzowe/base:${ZOWE_BASE_IMAGE}

##################################
# labels
LABEL name="Zowe Base Image with node.js enabled" \
maintainer="jack-tiefeng.jia@ibm.com" \
vendor="Zowe" \
version="2.0.2" \
release="0" \
summary="Base image for Zowe components with node.js enabled" \
description="Base image for Zowe components with node.js enabled"
maintainer="mark.ackert@broadcom.com" \
vendor="Zowe" \
version="3.0.0" \
release="0" \
summary="Base image for Zowe components with node.js enabled" \
description="Base image for Zowe components with node.js enabled"

##################################
# node.js is installed in base image, so no actions here
Expand Down
115 changes: 57 additions & 58 deletions containers/base/ubi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ FROM registry.redhat.io/ubi8/ubi-minimal:latest
##################################
# labels
LABEL name="Zowe Base Image" \
maintainer="jack-tiefeng.jia@ibm.com" \
vendor="Zowe" \
version="2.0.2" \
release="0" \
summary="Base image for Zowe components" \
description="Base image for Zowe components"
maintainer="mark.ackert@broadcom.com" \
vendor="Zowe" \
version="3.0.0" \
release="0" \
summary="Base image for Zowe components" \
description="Base image for Zowe components"

##################################
# arguments
Expand All @@ -32,59 +32,58 @@ ARG NODE_CPU_ARCH=x64

##################################
# environments
ENV NODE_VERSION=16.18.1
ENV NODE_VERSION=18.20.4

##################################
# customize
RUN set -ex \
# shadow-utils is needed for having adduser groupadd commands
&& microdnf install --nodocs shadow-utils \
# define zowe user/group
&& groupadd --gid ${GID} zowe \
&& useradd -r -m --no-log-init --uid ${UID} --gid ${GID} --home /home/zowe zowe \
# create /licenses folder
&& mkdir -p /licenses \
&& chown zowe.zowe /licenses \
# create /component folder
&& mkdir -p /component \
&& chown zowe.zowe /component \
# install node.js which is mandatory for now
&& microdnf install --nodocs \
findutils \
tar \
xz \
&& ARCH=${NODE_CPU_ARCH} \
# gpg keys listed at https://github.com/nodejs/node#release-keys
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \
108F52B48DB57BB0CC439B2997B01419BD92F80A \
B9E2F5981AA6E0CD28160D9FF13993A75599653C \
; do \
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
done \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
# smoke tests
&& node --version \
&& npm --version \
# remove unused pacakges
&& microdnf remove \
findutils \
tar \
xz \
# clean up
&& microdnf clean all --enablerepo='*'
# shadow-utils is needed for having adduser groupadd commands
&& microdnf install --nodocs shadow-utils \
# define zowe user/group
&& groupadd --gid ${GID} zowe \
&& useradd -r -m --no-log-init --uid ${UID} --gid ${GID} --home /home/zowe zowe \
# create /licenses folder
&& mkdir -p /licenses \
&& chown zowe.zowe /licenses \
# create /component folder
&& mkdir -p /component \
&& chown zowe.zowe /component \
# install node.js which is mandatory for now
&& microdnf install --nodocs \
findutils \
tar \
xz \
&& ARCH=${NODE_CPU_ARCH} \
# gpg keys listed at https://github.com/nodejs/node#release-keys
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
141F07595B7B3FFE74309A937405533BE57C7D57 \
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 \
CC68F5A3106FF448322E48ED27F5E38D5B0A215F \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
108F52B48DB57BB0CC439B2997B01419BD92F80A \
A363A499291CBBC940DD62E41F10027AF002F8B0 \
; do \
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
done \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
# smoke tests
&& node --version \
&& npm --version \
# remove unused pacakges
&& microdnf remove \
findutils \
tar \
xz \
# clean up
&& microdnf clean all --enablerepo='*'
Loading

0 comments on commit 3ac08d5

Please sign in to comment.