Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
93ffb5c
feat: reproducible keystore generation via script
balhar-jakub Jul 20, 2026
f909df2
chore: remove committed keystores, add .gitignore rules
balhar-jakub Jul 20, 2026
aa46f7a
fix: synchronize Node.js version between Gradle and GitHub Actions
balhar-jakub Jul 20, 2026
0d61106
fix: use Exec task type for extractJwtPublicKey, avoiding removed pro…
balhar-jakub Jul 21, 2026
fcc51ad
revert: remove /api-defs volume mount additions from discovery-service-2
balhar-jakub Jul 21, 2026
48887d8
ci: remove container: ubuntu:latest from integration test jobs
balhar-jakub Jul 21, 2026
b9460aa
Revert "ci: remove container: ubuntu:latest from integration test jobs"
balhar-jakub Jul 21, 2026
78660be
ci: install openssl in setup action for container jobs
balhar-jakub Jul 21, 2026
2a155ca
ci: install openssl only when missing, handle non-root runners
balhar-jakub Jul 21, 2026
21fd863
Update action.yml
balhar-jakub Jul 22, 2026
9f4e138
Update versions.gradle
balhar-jakub Jul 22, 2026
abbed05
ci: share keystores via artifacts to fix CA mismatch
balhar-jakub Jul 22, 2026
01c69bf
fix: update onboarding-enabler-nodejs engines to npm 10.9.8, node 24.…
balhar-jakub Jul 22, 2026
21072f0
fix: use selective JDK cacerts import in generate-keystores.sh
balhar-jakub Jul 22, 2026
99121b3
fix: add www.mockserver.com cert to zaas-client test truststore
balhar-jakub Jul 22, 2026
1c1d24e
fix: embed mockserver certificate in generate-keystores.sh
balhar-jakub Jul 22, 2026
b6eef6e
trigger CI: DCO fix verification
balhar-jakub Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@
runs:
using: "composite"
steps:
- name: Install openssl if missing
run: |
if ! command -v openssl &>/dev/null; then
if [ "$(id -u)" = "0" ]; then apt-get update && apt-get install -y openssl
else sudo apt-get update && sudo apt-get install -y openssl; fi
fi
shell: bash
- name: Download keystores
uses: actions/download-artifact@v4
with:
name: keystores-${{ env.JOB_ID }}
path: keystore/
continue-on-error: true
- name: Set up JDK ${{ inputs.jdkVersion }}
uses: actions/setup-java@v4
with:
Expand All @@ -18,8 +31,8 @@
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '24.18.0'
- run: npm install -g npm@10.9.8
node-version: '24.18.0' # keep in sync with gradle/versions.gradle projectNode
- run: npm install -g npm@10.9.8 # keep in sync with gradle/versions.gradle projectNpm

Check warning on line 35 in .github/actions/setup/action.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Omitting "--ignore-scripts" allows lifecycle scripts to run during package installation.

See more on https://sonarcloud.io/project/issues?id=zowe_api-layer&issues=AZ-J2TPQDLnBipD5X_oE&open=AZ-J2TPQDLnBipD5X_oE&pullRequest=4826

Check warning

Code scanning / SonarCloud

JavaScript package manager scripts should not be executed during installation Medium

Omitting "--ignore-scripts" allows lifecycle scripts to run during package installation. See more on SonarQube Cloud
shell: bash
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
141 changes: 74 additions & 67 deletions .github/workflows/integration-tests.yml

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,15 @@ deploy-apiml.sh

tools/*
otel/otel-collector/export/*.json

# Generated keystores — do not commit, regenerate via scripts/generate-keystores.sh
keystore/**/*.p12
keystore/**/*.cer
keystore/**/*.key
keystore/**/*.pem
keystore/**/*.srl
keystore/**/*.crt
keystore/**/*.csr
zaas-client/src/test/resources/localhost.keystore.p12
zaas-client/src/test/resources/localhost.truststore.p12
common-service-core/src/test/resources/jwt-public-key.pub
81 changes: 81 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ configure(subprojects.findAll { it.name in [
configure(subprojects.findAll {it.name != 'platform'}) {
apply plugin: 'java-library'

tasks.withType(JavaCompile).configureEach {
dependsOn generateKeystores
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand Down Expand Up @@ -358,6 +362,83 @@ task runChaoticHATests(dependsOn: ":integration-tests:runChaoticHATests") {

clean.dependsOn nodejsClean

def generateKeystores = tasks.register('generateKeystores', Exec) {
group = 'build'
description = 'Generate TLS keystores for local development and testing'
workingDir = rootProject.projectDir
if (System.getProperty('os.name').toLowerCase().contains('win')) {
commandLine 'cmd', '/c', 'bash scripts/generate-keystores.sh'
} else {
commandLine 'bash', 'scripts/generate-keystores.sh'
}
onlyIf {
if (project.hasProperty('skipKeystoreGeneration')) {
logger.lifecycle('Keystore generation skipped: skipKeystoreGeneration property is set')
return false
}
def keystoreDir = file('keystore')
if (keystoreDir.exists() && !fileTree(keystoreDir).matching { include '**/*.p12' }.empty) {
logger.lifecycle('Keystore generation skipped: keystores already exist in {}', keystoreDir)
return false
}
try {
def proc = 'openssl version'.execute()
proc.waitFor()
if (proc.exitValue() != 0) {
logger.lifecycle('Keystore generation skipped: openssl not available')
return false
}
} catch (IOException e) {
logger.lifecycle('Keystore generation skipped: openssl not available')
return false
}
true
}
}

// Copy generated keystores to zaas-client test resources
// Runs when keystore/ is populated (generation OR artifact download)
tasks.register('copyTestKeystores', Copy) {
group = 'build'
description = 'Copy generated keystores to zaas-client test resources'
from('keystore/localhost') {
include 'localhost.keystore.p12', 'localhost.truststore.p12'
}
into layout.projectDirectory.dir('zaas-client/src/test/resources')
onlyIf {
file('keystore/localhost/localhost.keystore.p12').exists()
}
}

// Extract JWT public key from localhost keystore for common-service-core tests
tasks.register('extractJwtPublicKey', Exec) {
group = 'build'
description = 'Extract JWT public key for common-service-core tests'
workingDir = rootProject.projectDir
commandLine 'bash', '-c', """
openssl pkcs12 -in keystore/localhost/localhost.keystore.p12 \\
-passin pass:password -nokeys 2>/dev/null \\
| openssl x509 -pubkey -noout 2>/dev/null \\
| openssl pkey -pubin -outform DER 2>/dev/null \\
| base64 -w0 > "common-service-core/src/test/resources/jwt-public-key.pub"
"""
onlyIf {
file('keystore/localhost/localhost.keystore.p12').exists()
}
}

// Wire tasks into subproject build lifecycle
project(':zaas-client') {
tasks.named('processTestResources') {
dependsOn rootProject.tasks.named('copyTestKeystores')
}
}
project(':common-service-core') {
tasks.named('processTestResources') {
dependsOn rootProject.tasks.named('extractJwtPublicKey')
}
}

publishAllVersions.dependsOn publishZoweServerArtifacts

publishAllSDKVersions.dependsOn publishZoweServerArtifacts
Expand Down
1 change: 0 additions & 1 deletion common-service-core/src/test/resources/jwt-public-key.pub

This file was deleted.

6 changes: 3 additions & 3 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencyResolutionManagement {
versionCatalogs {
libs {
// for node projects
version('projectNode', '24.10.0')
version('projectNpm', '10.9.0')
// for node projects — keep in sync with .github/actions/setup/action.yml
version('projectNode', '24.18.0')
version('projectNpm', '10.9.8') // keep in sync with .github/actions/setup/action.yml

version('springBoot', '3.5.16')
version('springBootGraphQl', '3.5.16')
Expand Down
Binary file removed keystore/client_cert/ca/apiml_ca.p12
Binary file not shown.
Binary file removed keystore/client_cert/client-certs.p12
Binary file not shown.
59 changes: 0 additions & 59 deletions keystore/docker/all-services.cer

This file was deleted.

35 changes: 0 additions & 35 deletions keystore/docker/all-services.keystore.cer

This file was deleted.

28 changes: 0 additions & 28 deletions keystore/docker/all-services.keystore.key

This file was deleted.

Binary file removed keystore/docker/all-services.keystore.p12
Binary file not shown.
87 changes: 0 additions & 87 deletions keystore/docker/all-services.pem

This file was deleted.

Binary file removed keystore/docker/all-services.truststore.p12
Binary file not shown.
Binary file removed keystore/docker/client-cert.p12
Binary file not shown.
Binary file removed keystore/docker/server-only.p12
Binary file not shown.
Loading
Loading