Skip to content

feat(e2e): share orchestrator installation script#60

Merged
subhashkhileri merged 9 commits intoredhat-developer:mainfrom
AndrienkoAleksandr:share-orchestrator-installation-script
Mar 25, 2026
Merged

feat(e2e): share orchestrator installation script#60
subhashkhileri merged 9 commits intoredhat-developer:mainfrom
AndrienkoAleksandr:share-orchestrator-installation-script

Conversation

@AndrienkoAleksandr
Copy link
Copy Markdown
Contributor

Our e2e tests should cover Orchestrator feature for two plugins: orchestrator and bulk-import. It would be nice to have a common script place to use this script in the overlay repository. Also this pr is reaction on comment redhat-developer/rhdh-plugin-export-overlays#1972 (comment)

Copy link
Copy Markdown
Member

@subhashkhileri subhashkhileri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script is added to the files array so it ships with the npm package, but there's no clean way for consumers to invoke it. They'd have to reference it via a fragile node_modules
path:

await $bash node_modules/@red-hat-developer-hub/e2e-test-utils/scripts/install-orchestrator.sh ${namespace};

This is brittle (breaks with different package manager hoisting strategies like yarn PnP, pnpm) and inconsistent with the rest of the package where everything is exported as
TypeScript.

Suggestion: Add a TypeScript wrapper that uses zx's $ and export it. Following the existing pattern of keycloak/ and rhdh/ under src/deployment/, orchestrator should be its own
deployment module with the script co-located:

src/deployment/orchestrator/
├── index.ts # exports installOrchestrator()
└── install-orchestrator.sh # the script (moved from scripts/)

// src/deployment/orchestrator/index.ts
import { resolve } from "path";
import { $ } from "../../utils/index.js";

const scriptPath = resolve(import.meta.dirname, "install-orchestrator.sh");

export async function installOrchestrator(namespace = "orchestrator") {
await $bash ${scriptPath} ${namespace};
}

The .sh file needs to be copied to dist/ during build, following the existing pattern used by rhdh/config and keycloak/config:

"build": "yarn clean && tsc -p tsconfig.build.json && cp -r src/deployment/rhdh/config dist/deployment/rhdh/ && cp -r src/deployment/keycloak/config dist/deployment/keycloak/ && cp
src/deployment/orchestrator/install-orchestrator.sh dist/deployment/orchestrator/"

With a new export in package.json:

"./orchestrator": {
"types": "./dist/deployment/orchestrator/index.d.ts",
"default": "./dist/deployment/orchestrator/index.js"
}

This way the "scripts" entry in the files array can be dropped — the script ships inside dist/ which is already included.

Consumer usage would then be clean and consistent:

import { installOrchestrator } from "@red-hat-developer-hub/e2e-test-utils/orchestrator";

test.beforeAll(async () => {
await installOrchestrator("my-namespace");
});

also please fix the failing pr checks on this pr. and I hope we are also testing these changes locally for your new PR on overlay because we don't have a any job/pr check that validates this.

AndrienkoAleksandr and others added 5 commits March 19, 2026 15:02
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Co-authored-by: Yona First <yfirst@redhat.com>
Co-authored-by: Gustavo Lira e Silva <guga.java@gmail.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Co-authored-by: Subhash Khileri <subhashkhileri2@gmail.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
@AndrienkoAleksandr AndrienkoAleksandr force-pushed the share-orchestrator-installation-script branch from 20eb736 to 072b9ff Compare March 19, 2026 13:04
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
@AndrienkoAleksandr AndrienkoAleksandr force-pushed the share-orchestrator-installation-script branch from 072b9ff to 9923780 Compare March 19, 2026 13:09
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
@AndrienkoAleksandr AndrienkoAleksandr force-pushed the share-orchestrator-installation-script branch from ffac7a3 to b5f6a80 Compare March 19, 2026 13:24
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
@AndrienkoAleksandr
Copy link
Copy Markdown
Contributor Author

Suggestion: Add a TypeScript wrapper that uses zx's $ and export it. Following the existing pattern of keycloak/ and rhdh/ under src/deployment/, orchestrator should be its own
deployment module with the script co-located:

src/deployment/orchestrator/
├── index.ts # exports installOrchestrator()
└── install-orchestrator.sh # the script (moved from scripts/)

@subhashkhileri, thank you very much! Done.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
@subhashkhileri subhashkhileri merged commit 41bf831 into redhat-developer:main Mar 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants