UNPKG

@lib-feedit/commons

Version:

Reusable components, scripts, styles, hooks & more

64 lines (61 loc) 1.71 kB
type ReleaseScriptParams = { /** * App name, used in logs * @default App */ appName?: string; /** * Docker image name, including the repository. e.g., feedit/test. */ dockerImage: string; /** * Kubernetes YAML config filename. * * **Need to be located in `release` folder at the root level of the project** */ yamlFile: string; /** * The SSH server alias name where the Kubernetes YAML file will be sent. */ serverName: string; /** Kubernetes YAML config filename for **beta**. **Need to be located in `release` folder at the root level of the project** */ betaYamlFile?: string; }; declare class ReleaseScript { private readonly appName; private readonly dockerImage; private readonly yamlFile; private readonly serverName; private readonly betaYamlFile; constructor(params: ReleaseScriptParams); /** * Test parameters provided in constructor call */ private beforeStart; start(): Promise<void>; /** * Make a release, either for the prod or the beta */ private release; /** * Build the image, push it to the Docker Hub repository and return the new image digest. */ private docker; /** * Update the Kubernetes YAML config file with the new Docker image digest. */ private yaml; /** * Send the updated Kubernetes YAML config file to the server. */ private scp; /** * Push the modifications (YAML file and package.json) to Git and add a tag version to this commit. */ private git; } export { ReleaseScript }; export type { ReleaseScriptParams };