gradle-josm-plugin / org.openstreetmap.josm.gradle.plugin.gitlab / GitlabRepositorySettings / Builder

Builder

data class Builder

A builder to create a GitlabRepositorySettings object. In GitLab CI, the values are automatically set via environment variables. Otherwise you can set the following environment variables:

Constructors

<init>

Builder(projectId: Int? = System.getenv("GITLAB_PROJECT_ID")?.toIntOrNull() ?: System.getenv("CI_PROJECT_ID")?.toIntOrNull(), gitlabUrl: String = System.getenv("GITLAB_URL") ?: System.getenv("CI_SERVER_HOST")?.let { "https://$it" } ?: DEFAULT_GITLAB_URL, gitlabApiUrl: String = System.getenv("GITLAB_API_URL") ?: System.getenv("CI_API_V4_URL") ?: "$gitlabUrl/api/v4", ciJobToken: String? = System.getenv("CI_JOB_TOKEN"), personalAccessToken: String? = System.getenv("GITLAB_PERSONAL_ACCESS_TOKEN"))

A builder to create a GitlabRepositorySettings object. In GitLab CI, the values are automatically set via environment variables. Otherwise you can set the following environment variables:

Properties

ciJobToken

var ciJobToken: String?

the token of the CI job

gitlabApiUrl

var gitlabApiUrl: String

the base URL of the GitLab API (e.g. https://gitlab.com/api/v4)

gitlabUrl

var gitlabUrl: String

the base URL (e.g. https://gitlab.com) of the GitLab instance

personalAccessToken

var personalAccessToken: String?

a token of a GitLab user that will be

projectId

var projectId: Int?

the ID of the project on the GitLab server

Functions

build

fun build(): GitlabRepositorySettings