-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance service readiness checks in CI workflow and add get-port script
- Loading branch information
Showing
2 changed files
with
89 additions
and
7 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
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,26 @@ | ||
//@ts-ignore | ||
import { config } from "@eda/config"; | ||
|
||
const serviceName = process.argv[2]; | ||
|
||
if (!serviceName) { | ||
console.error("Service name required"); | ||
process.exit(1); | ||
} | ||
|
||
// Get port from config | ||
const port = config.ports[serviceName as keyof typeof config.ports]; | ||
|
||
if (port) { | ||
console.log(port); | ||
process.exit(0); | ||
} | ||
|
||
// Handle nested ports in db section | ||
const dbPort = config.ports.db[serviceName as keyof typeof config.ports.db]; | ||
if (dbPort) { | ||
console.log(dbPort); | ||
process.exit(0); | ||
} | ||
|
||
process.exit(1); |