
ru.tinkoff.plugins.buildmetrics.gitlab.labels.GitlabCILabelsFactory.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of build-metrics-gitlab Show documentation
Show all versions of build-metrics-gitlab Show documentation
Extension for tinkoff build metrics gradle plugin.
package ru.tinkoff.plugins.buildmetrics.gitlab.labels
import ru.tinkoff.plugins.buildmetrics.api.factories.Factory
import ru.tinkoff.plugins.buildmetrics.api.labels.Label
import ru.tinkoff.plugins.buildmetrics.utils.system.SystemEnv
import ru.tinkoff.plugins.buildmetrics.utils.system.SystemEnvImpl
/**
* Labels:
* - ci_commit_ref_name
* - ci_job_id
* - ci_job_name
* - ci_job_stage
* - ci_job_started_at
* - ci_pipeline_created_at
* - ci_pipeline_id
* - ci_pipeline_source
* - ci_project_name
* - ci_project_url
* - ci_runner_description
* - ci_runner_version
* - ci_merge_request_target_branch_name - if environment variable "CI_MERGE_REQUEST_ID" is defined
*
* @throws IllegalStateException if required environment variable is undefined
*/
// Can't use Gradle Providers API here because they are not Serializable
class GitlabCILabelsFactory(
private val systemEnv: SystemEnv = SystemEnvImpl()
) : Factory.Labels {
override fun create(): List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy