// Code generated by chant gitlab generate. DO NOT EDIT. // --- CI Entity classes --- export declare class AllowFailure { constructor(props: { exit_codes: number | number[]; }); } export declare class Artifacts { constructor(props: { access?: "none" | "developer" | "all"; exclude?: string[]; expire_in?: string; expose_as?: string; name?: string; paths?: string[]; reports?: Record; untracked?: boolean; when?: "on_success" | "on_failure" | "always"; }); } export declare class AutoCancel { constructor(props: { on_job_failure?: "none" | "all"; on_new_commit?: "conservative" | "interruptible" | "none"; }); } export declare class Cache { constructor(props: { fallback_keys?: string[]; key?: string | Record; paths?: string[]; policy?: string; unprotect?: boolean; untracked?: boolean; when?: "on_success" | "on_failure" | "always"; }); } export declare class Default { constructor(props: { after_script?: string | string[]; artifacts?: Artifacts; before_script?: string | string[]; cache?: Cache | Cache[]; hooks?: Record; id_tokens?: Record; identity?: "google_cloud"; image?: Image; interruptible?: boolean; retry?: Retry | number; services?: Service[]; tags?: any[]; timeout?: string; }); } export declare class Environment { constructor(props: { /** The name of the environment, e.g. 'qa', 'staging', 'production'. */ name: string; /** Specifies what this job will do. 'start' (default) indicates the job will start the deployment. 'prepare'/'verify'/'access' indicates this will not affect the deployment. 'stop' indicates this will stop the deployment. */ action?: "start" | "prepare" | "stop" | "verify" | "access"; /** The amount of time it should take before Gitlab will automatically stop the environment. Supports a wide variety of formats, e.g. '1 week', '3 mins 4 sec', '2 hrs 20 min', '2h20min', '6 mos 1 day', '47 yrs 6 mos and 4d', '3 weeks and 2 days'. */ auto_stop_in?: string; /** Explicitly specifies the tier of the deployment environment if non-standard environment name is used. */ deployment_tier?: "production" | "staging" | "testing" | "development" | "other"; /** Used to configure the kubernetes deployment for this environment. This is currently not supported for kubernetes clusters that are managed by Gitlab. */ kubernetes?: Record; /** The name of a job to execute when the environment is about to be stopped. */ on_stop?: string; /** When set, this will expose buttons in various places for the current environment in Gitlab, that will take you to the defined URL. */ url?: string; }); } export declare class Image { constructor(props: { /** Full name of the image that should be used. It should contain the Registry part if needed. */ name: string; docker?: Record; /** Command or script that should be executed as the container's entrypoint. It will be translated to Docker's --entrypoint option while creating the container. The syntax is similar to Dockerfile's ENTRYPOINT directive, where each shell token is a separate string in the array. */ entrypoint?: any[]; pull_policy?: "always" | "never" | "if-not-present" | ("always" | "never" | "if-not-present")[]; }); } export declare class Include { constructor(props: { /** Local path to component directory or full path to external component directory. */ component?: string; file?: string | string[]; inputs?: Record; /** Relative path from local repository root (`/`) to the `yaml`/`yml` file template. The file must be on the same branch, and does not work across git submodules. */ local?: string; /** Path to the project, e.g. `group/project`, or `group/sub-group/project` [Learn more](https://docs.gitlab.com/ee/ci/yaml/index.html#includefile). */ project?: string; /** Branch/Tag/Commit-hash for the target project. */ ref?: string; /** URL to a `yaml`/`yml` template file using HTTP/HTTPS. */ remote?: string; rules?: any[]; /** Use a `.gitlab-ci.yml` template as a base, e.g. `Nodejs.gitlab-ci.yml`. */ template?: string; }); } export declare class Inherit { constructor(props: { default?: boolean | ("after_script" | "artifacts" | "before_script" | "cache" | "image" | "interruptible" | "retry" | "services" | "tags" | "timeout")[]; variables?: boolean | string[]; }); } export declare class Job { constructor(props: { after_script?: string | string[]; allow_failure?: AllowFailure | boolean; artifacts?: Artifacts; before_script?: string | string[]; cache?: Cache | Cache[]; /** Must be a regular expression, optionally but recommended to be quoted, and must be surrounded with '/'. Example: '/Code coverage: \d+\.\d+/' */ coverage?: string; /** Specify a list of job names from earlier stages from which artifacts should be loaded. By default, all previous artifacts are passed. Use an empty array to skip downloading artifacts. */ dependencies?: string[]; /** Used to associate environment metadata with a deploy. Environment can have a name and URL attached to it, and will be displayed under /environments under the project. */ environment?: Environment | string; /** Job will run *except* for when these filtering options match. */ except?: any; /** The name of one or more jobs to inherit configuration from. */ extends?: string | string[]; hooks?: Record; id_tokens?: Record; identity?: "google_cloud"; image?: Image; inherit?: Inherit; interruptible?: boolean; manual_confirmation?: string; /** The list of jobs in previous stages whose sole completion is needed to start the current job. */ needs?: Need[]; /** Job will run *only* when these filtering options match. */ only?: any; pages?: Record | boolean; parallel?: Parallel | number; /** A path to a directory that contains the files to be published with Pages */ publish?: string; /** Indicates that the job creates a Release. */ release?: Release; /** Limit job concurrency. Can be used to ensure that the Runner will not run certain jobs simultaneously. */ resource_group?: string; retry?: Retry | number; rules?: Rule[]; run?: any[]; script?: string | string[]; secrets?: Record; services?: Service[]; /** Define what stage the job will run in. */ stage?: string | string[]; start_in?: string; tags?: any[]; timeout?: string; trigger?: Trigger | string; variables?: Record; when?: "on_success" | "on_failure" | "always" | "never" | "manual" | "delayed"; }); } export declare class Need { constructor(props: { job: string; artifacts?: boolean; optional?: boolean; parallel?: any; pipeline?: string; project?: string; ref?: string; }); } export declare class Parallel { constructor(props: { /** Defines different variables for jobs that are running in parallel. */ matrix: Record[]; }); } export declare class Release { constructor(props: { /** Specifies the longer description of the Release. */ description: string; /** The tag_name must be specified. It can refer to an existing Git tag or can be specified by the user. */ tag_name: string; assets?: Record; /** The title of each milestone the release is associated with. */ milestones?: string[]; /** The Release name. If omitted, it is populated with the value of release: tag_name. */ name?: string; /** If the release: tag_name doesn’t exist yet, the release is created from ref. ref can be a commit SHA, another tag name, or a branch name. */ ref?: string; /** The date and time when the release is ready. Defaults to the current date and time if not defined. Should be enclosed in quotes and expressed in ISO 8601 format. */ released_at?: string; /** Message to use if creating a new annotated tag. */ tag_message?: string; }); } export declare class Retry { constructor(props: { exit_codes?: number[] | number; max?: number; when?: any[]; }); } export declare class Rule { constructor(props: { allow_failure?: AllowFailure | boolean; changes?: any; exists?: any; if?: string; interruptible?: boolean; needs?: any[]; start_in?: string; variables?: Record; when?: "on_success" | "on_failure" | "always" | "never" | "manual" | "delayed"; }); } export declare class Service { constructor(props: { /** Full name of the image that should be used. It should contain the Registry part if needed. */ name: string; alias?: string; command?: string[]; docker?: Record; entrypoint?: string[]; pull_policy?: "always" | "never" | "if-not-present" | ("always" | "never" | "if-not-present")[]; variables?: Record; }); } export declare class Trigger { constructor(props: { /** The branch name that a downstream pipeline will use */ branch?: string; /** Specify what to forward to the downstream pipeline. */ forward?: Record; include?: string | Record[]; /** Path to the project, e.g. `group/project`, or `group/sub-group/project`. */ project?: string; /** You can mirror the pipeline status from the triggered pipeline to the source bridge job by using strategy: depend */ strategy?: "depend"; }); } export declare class Workflow { constructor(props: { auto_cancel?: AutoCancel; name?: string; rules?: WorkflowRule[]; }); } export declare class WorkflowRule { constructor(props: { auto_cancel?: AutoCancel; changes?: any; exists?: any; if?: string; variables?: Record; when?: "always" | "never"; }); } // --- CI/CD Variables --- export declare const CI: { readonly CommitBranch: string; readonly CommitRef: string; readonly CommitSha: string; readonly CommitTag: string; readonly DefaultBranch: string; readonly Environment: string; readonly JobId: string; readonly JobName: string; readonly JobStage: string; readonly MergeRequestIid: string; readonly PipelineId: string; readonly PipelineSource: string; readonly ProjectDir: string; readonly ProjectId: string; readonly ProjectName: string; readonly ProjectPath: string; readonly Registry: string; readonly RegistryImage: string; };