/**
 * This file was automatically generated by json-schema-to-typescript.
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
 * and run json-schema-to-typescript to regenerate this file.
 */
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "image".
 */
export type Image = string | {
    /**
     * Full name of the image that should be used. It should contain the Registry part if needed.
     */
    name: string;
    /**
     * 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.
     *
     * @minItems 1
     */
    entrypoint?: any[];
    pull_policy?: ("always" | "never" | "if-not-present") | ("always" | "never" | "if-not-present")[];
} | string[];
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "services".
 */
export type Services = (string | {
    /**
     * Full name of the image that should be used. It should contain the Registry part if needed.
     */
    name: string;
    /**
     * @minItems 1
     */
    entrypoint?: string[];
    pull_policy?: ("always" | "never" | "if-not-present") | ("always" | "never" | "if-not-present")[];
    /**
     * @minItems 1
     */
    command?: string[];
    alias?: string;
    variables?: JobVariables;
})[];
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "before_script".
 */
export type BeforeScript = (string | string[])[];
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "after_script".
 */
export type AfterScript = (string | string[])[];
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "!reference".
 */
export type Reference = string[];
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "interruptible".
 */
export type Interruptible = boolean;
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "retry".
 */
export type Retry = RetryMax | {
    max?: RetryMax;
    when?: RetryErrors | RetryErrors[];
};
/**
 * The number of times the job will be retried if it fails. Defaults to 0 and can max be retried 2 times (3 times total).
 *
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "retry_max".
 */
export type RetryMax = number;
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "retry_errors".
 */
export type RetryErrors = "always" | "unknown_failure" | "script_failure" | "api_failure" | "stuck_or_timeout_failure" | "runner_system_failure" | "runner_unsupported" | "stale_schedule" | "job_execution_timeout" | "archived_failure" | "unmet_prerequisites" | "scheduler_failure" | "data_integrity_failure";
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "tags".
 */
export type Tags = (string | string[])[];
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "timeout".
 */
export type Timeout = string;
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "include_item".
 */
export type IncludeItem = string | {
    /**
     * 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;
    rules?: IncludeRules;
    inputs?: Inputs;
} | {
    /**
     * 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;
    file: string | string[];
    rules?: IncludeRules;
    inputs?: Inputs;
} | {
    /**
     * Use a `.gitlab-ci.yml` template as a base, e.g. `Nodejs.gitlab-ci.yml`.
     */
    template: string;
    rules?: IncludeRules;
    inputs?: Inputs;
} | {
    /**
     * Local path to component directory or full path to external component directory.
     */
    component: string;
    rules?: IncludeRules;
    inputs?: Inputs;
} | {
    /**
     * URL to a `yaml`/`yml` template file using HTTP/HTTPS.
     */
    remote: string;
    rules?: IncludeRules;
    inputs?: Inputs;
};
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "includeRules".
 */
export type IncludeRules = ({
    if?: If;
    exists?: Exists;
    when?: ("never" | "always") | null;
} | string | string[])[] | null;
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "if".
 */
export type If = string;
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "exists".
 */
export type Exists = string[];
export type JobTemplate = {
    image?: Image;
    services?: Services;
    before_script?: BeforeScript;
    after_script?: AfterScript;
    hooks?: Hooks;
    rules?: Rules;
    variables?: JobVariables1;
    cache?: Cache;
    id_tokens?: IdTokens;
    secrets?: Secrets;
    script?: string | (string | string[])[];
    /**
     * Define what stage the job will run in.
     */
    stage?: string | string[];
    /**
     * Job will run *only* when these filtering options match.
     */
    only?: null | FilterRefs | {
        refs?: FilterRefs;
        /**
         * Filter job based on if Kubernetes integration is active.
         */
        kubernetes?: "active";
        variables?: string[];
        /**
         * Filter job creation based on files that were modified in a git push.
         */
        changes?: string[];
    };
    /**
     * The name of one or more jobs to inherit configuration from.
     */
    extends?: string | string[];
    /**
     * The list of jobs in previous stages whose sole completion is needed to start the current job.
     */
    needs?: (string | {
        job: string;
        artifacts?: boolean;
        optional?: boolean;
        parallel?: ParallelMatrix;
    } | {
        pipeline: string;
        job: string;
        artifacts?: boolean;
        parallel?: ParallelMatrix;
    } | {
        job: string;
        project: string;
        ref: string;
        artifacts?: boolean;
        parallel?: ParallelMatrix;
    })[];
    /**
     * Job will run *except* for when these filtering options match.
     */
    except?: null | FilterRefs | {
        refs?: FilterRefs;
        /**
         * Filter job based on if Kubernetes integration is active.
         */
        kubernetes?: "active";
        variables?: string[];
        /**
         * Filter job creation based on files that were modified in a git push.
         */
        changes?: string[];
    };
    tags?: Tags;
    allow_failure?: AllowFailure;
    timeout?: Timeout;
    when?: When;
    start_in?: StartIn;
    /**
     * 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[];
    artifacts?: Artifacts;
    /**
     * 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?: string | {
        /**
         * The name of the environment, e.g. 'qa', 'staging', 'production'.
         */
        name: 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;
        /**
         * The name of a job to execute when the environment is about to be stopped.
         */
        on_stop?: 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;
        /**
         * Used to configure the kubernetes deployment for this environment. This is currently not supported for kubernetes clusters that are managed by Gitlab.
         */
        kubernetes?: {
            /**
             * The kubernetes namespace where this environment should be deployed to.
             */
            namespace?: string;
            [k: string]: any | undefined;
        };
        /**
         * Explicitly specifies the tier of the deployment environment if non-standard environment name is used.
         */
        deployment_tier?: "production" | "staging" | "testing" | "development" | "other";
    };
    /**
     * Indicates that the job creates a Release.
     */
    release?: {
        /**
         * The tag_name must be specified. It can refer to an existing Git tag or can be specified by the user.
         */
        tag_name: string;
        /**
         * Message to use if creating a new annotated tag.
         */
        tag_message?: string;
        /**
         * Specifies the longer description of the Release.
         */
        description: 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 title of each milestone the release is associated with.
         */
        milestones?: 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;
        assets?: {
            /**
             * Include asset links in the release.
             *
             * @minItems 1
             */
            links: {
                /**
                 * The name of the link.
                 */
                name: string;
                /**
                 * The URL to download a file.
                 */
                url: string;
                /**
                 * The redirect link to the url.
                 */
                filepath?: string;
                /**
                 * The content kind of what users can download via url.
                 */
                link_type?: "runbook" | "package" | "image" | "other";
            }[];
        };
    };
    /**
     * Must be a regular expression, optionally but recommended to be quoted, and must be surrounded with '/'. Example: '/Code coverage: \d+\.\d+/'
     */
    coverage?: string;
    retry?: Retry;
    parallel?: Parallel;
    interruptible?: Interruptible;
    /**
     * Limit job concurrency. Can be used to ensure that the Runner will not run certain jobs simultaneously.
     */
    resource_group?: string;
    trigger?: {
        /**
         * Path to the project, e.g. `group/project`, or `group/sub-group/project`.
         */
        project: string;
        /**
         * The branch name that a downstream pipeline will use
         */
        branch?: string;
        /**
         * You can mirror the pipeline status from the triggered pipeline to the source bridge job by using strategy: depend
         */
        strategy?: "depend";
        /**
         * Specify what to forward to the downstream pipeline.
         */
        forward?: {
            /**
             * Variables defined in the trigger job are passed to downstream pipelines.
             */
            yaml_variables?: boolean;
            /**
             * Variables added for manual pipeline runs and scheduled pipelines are passed to downstream pipelines.
             */
            pipeline_variables?: boolean;
        };
    } | {
        include?: string | ({
            /**
             * Relative path from local repository root (`/`) to the local YAML file to define the pipeline configuration.
             */
            local?: string;
        } | {
            /**
             * Name of the template YAML file to use in the pipeline configuration.
             */
            template?: string;
        } | {
            /**
             * Relative path to the generated YAML file which is extracted from the artifacts and used as the configuration for triggering the child pipeline.
             */
            artifact: string;
            /**
             * Job name which generates the artifact
             */
            job: string;
        } | {
            /**
             * Path to another private project under the same GitLab instance, like `group/project` or `group/sub-group/project`.
             */
            project: string;
            /**
             * Branch/Tag/Commit hash for the target project.
             */
            ref?: string;
            /**
             * Relative path from repository root (`/`) to the pipeline configuration YAML file.
             */
            file: string;
        })[];
        /**
         * You can mirror the pipeline status from the triggered pipeline to the source bridge job by using strategy: depend
         */
        strategy?: "depend";
        /**
         * Specify what to forward to the downstream pipeline.
         */
        forward?: {
            /**
             * Variables defined in the trigger job are passed to downstream pipelines.
             */
            yaml_variables?: boolean;
            /**
             * Variables added for manual pipeline runs and scheduled pipelines are passed to downstream pipelines.
             */
            pipeline_variables?: boolean;
        };
    } | string;
    inherit?: {
        default?: boolean | ("after_script" | "artifacts" | "before_script" | "cache" | "image" | "interruptible" | "retry" | "services" | "tags" | "timeout")[];
        variables?: boolean | string[];
    };
    /**
     * A path to a directory that contains the files to be published with Pages
     */
    publish?: string;
} & JobTemplate1;
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "rules".
 */
export type Rules = ({
    if?: If;
    changes?: Changes;
    exists?: Exists;
    variables?: RulesVariables;
    when?: When;
    start_in?: StartIn;
    allow_failure?: AllowFailure;
    needs?: RulesNeeds;
} | string | string[])[] | null;
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "changes".
 */
export type Changes = {
    /**
     * List of file paths.
     */
    paths: string[];
    /**
     * Ref for comparing changes.
     */
    compare_to?: string;
} | string[];
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "when".
 */
export type When = "on_success" | "on_failure" | "always" | "never" | "manual" | "delayed";
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "start_in".
 */
export type StartIn = string;
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "allow_failure".
 */
export type AllowFailure = boolean | {
    exit_codes: number;
} | {
    /**
     * @minItems 1
     */
    exit_codes: number[];
};
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "rulesNeeds".
 */
export type RulesNeeds = (string | {
    /**
     * Name of a job that is defined in the pipeline.
     */
    job: string;
    /**
     * Download artifacts of the job in needs.
     */
    artifacts?: boolean;
    /**
     * Whether the job needs to be present in the pipeline to run ahead of the current job.
     */
    optional?: boolean;
})[];
/**
 * Filter job by different keywords that determine origin or state, or by supplying string/regex to check against branch/tag names.
 *
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "filter_refs".
 */
export type FilterRefs = (("branches" | "tags" | "api" | "external" | "pipelines" | "pushes" | "schedules" | "triggers" | "web") | string)[];
/**
 * Use the `needs:parallel:matrix` keyword to specify parallelized jobs needed to be completed for the job to run. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#needsparallelmatrix)
 *
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "parallel_matrix".
 */
export type ParallelMatrix = {
    /**
     * Defines different variables for jobs that are running in parallel.
     *
     * @maxItems 200
     */
    matrix: {
        [k: string]: (string | number | any[]) | undefined;
    }[];
};
/**
 * Splits up a single job into multiple that run in parallel. Provides `CI_NODE_INDEX` and `CI_NODE_TOTAL` environment variables to the jobs.
 *
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "parallel".
 */
export type Parallel = number | {
    /**
     * Defines different variables for jobs that are running in parallel.
     *
     * @maxItems 200
     */
    matrix: {
        [k: string]: (string | number | any[]) | undefined;
    }[];
};
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "job_template".
 */
export type JobTemplate1 = {
    when: "delayed";
    [k: string]: any | undefined;
} | {
    when?: {
        [k: string]: any | undefined;
    };
    [k: string]: any | undefined;
};
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "workflowName".
 */
export type WorkflowName = string;
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "string_file_list".
 */
export type StringFileList = string | string[];
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "filter".
 */
export type Filter = null | FilterRefs | {
    refs?: FilterRefs;
    /**
     * Filter job based on if Kubernetes integration is active.
     */
    kubernetes?: "active";
    variables?: string[];
    /**
     * Filter job creation based on files that were modified in a git push.
     */
    changes?: string[];
};
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "job".
 */
export type Job = JobTemplate1;
export interface JobVariables {
    [k: string]: any | undefined;
}
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "globalVariables".
 */
export interface GlobalVariables {
    [k: string]: any | undefined;
}
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "cache".
 */
export interface Cache {
    key?: string | {
        /**
         * @minItems 1
         * @maxItems 2
         */
        files?: string[];
        prefix?: string;
        [k: string]: any | undefined;
    };
    paths?: string[];
    policy?: string;
    unprotect?: boolean;
    untracked?: boolean;
    when?: "on_success" | "on_failure" | "always";
    /**
     * @maxItems 5
     */
    fallback_keys?: string[];
    [k: string]: any | undefined;
}
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "artifacts".
 */
export interface Artifacts {
    /**
     * @minItems 1
     */
    paths?: string[];
    /**
     * @minItems 1
     */
    exclude?: string[];
    expose_as?: string;
    name?: string;
    untracked?: boolean;
    when?: "on_success" | "on_failure" | "always";
    expire_in?: string;
    reports?: {
        /**
         * Path for file(s) that should be parsed as JUnit XML result
         */
        junit?: string | string[];
        /**
         * Path to a single file with browser performance metric report(s).
         */
        browser_performance?: string;
        /**
         * Used to collect coverage reports from the job.
         */
        coverage_report?: {
            /**
             * Code coverage format used by the test framework.
             */
            coverage_format?: "cobertura";
            /**
             * Path to the coverage report file that should be parsed.
             */
            path?: string;
            [k: string]: any | undefined;
        } | null;
        /**
         * Path to file or list of files with code quality report(s) (such as Code Climate).
         */
        codequality?: string | string[];
        /**
         * Path to file or list of files containing runtime-created variables for this job.
         */
        dotenv?: string | string[];
        /**
         * Path to file or list of files containing code intelligence (Language Server Index Format).
         */
        lsif?: string | string[];
        /**
         * Path to file or list of files with SAST vulnerabilities report(s).
         */
        sast?: string | string[];
        /**
         * Path to file or list of files with Dependency scanning vulnerabilities report(s).
         */
        dependency_scanning?: string | string[];
        /**
         * Path to file or list of files with Container scanning vulnerabilities report(s).
         */
        container_scanning?: string | string[];
        /**
         * Path to file or list of files with DAST vulnerabilities report(s).
         */
        dast?: string | string[];
        /**
         * Deprecated in 12.8: Path to file or list of files with license report(s).
         */
        license_management?: string | string[];
        /**
         * Path to file or list of files with license report(s).
         */
        license_scanning?: string | string[];
        /**
         * Path to file or list of files with requirements report(s).
         */
        requirements?: string | string[];
        /**
         * Path to file or list of files with secret detection report(s).
         */
        secret_detection?: string | string[];
        /**
         * Path to file or list of files with custom metrics report(s).
         */
        metrics?: string | string[];
        /**
         * Path to file or list of files with terraform plan(s).
         */
        terraform?: string | string[];
        cyclonedx?: string | string[];
        load_performance?: string | string[];
    };
}
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "hooks".
 */
export interface Hooks {
    pre_get_sources_script?: string | (string | string[])[];
}
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "inputs".
 */
export interface Inputs {
    [k: string]: any | undefined;
}
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "rulesVariables".
 */
export interface RulesVariables {
    [k: string]: any | undefined;
}
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "jobVariables".
 */
export interface JobVariables1 {
    [k: string]: any | undefined;
}
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "id_tokens".
 */
export interface IdTokens {
    /**
     * This interface was referenced by `IdTokens`'s JSON-Schema definition
     * via the `patternProperty` ".*".
     */
    [k: string]: {
        aud: string | string[];
    };
}
/**
 * This interface was referenced by `HttpsGitlabComGitlabCiYml`'s JSON-Schema
 * via the `definition` "secrets".
 */
export interface Secrets {
    /**
     * This interface was referenced by `Secrets`'s JSON-Schema definition
     * via the `patternProperty` ".*".
     */
    [k: string]: {
        [k: string]: any | undefined;
    };
}
