This commit is contained in:
26
gradle/publishing-gitlab.gradle
Normal file
26
gradle/publishing-gitlab.gradle
Normal file
@@ -0,0 +1,26 @@
|
||||
// SPDX-FileCopyrightText: The openTCS Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
if (Boolean.valueOf(project.findProperty('DO_DEPLOY_PRIVATE'))
|
||||
&& System.getenv('CI_API_V4_URL') != null
|
||||
&& System.getenv('CI_PROJECT_ID') != null
|
||||
&& System.getenv('CI_JOB_TOKEN') != null) {
|
||||
|
||||
maven {
|
||||
name = 'deploy-repo-gitlab'
|
||||
url = "${System.env.CI_API_V4_URL}/projects/${System.env.CI_PROJECT_ID}/packages/maven"
|
||||
|
||||
credentials(HttpHeaderCredentials) {
|
||||
name = 'Job-Token'
|
||||
value = "${System.env.CI_JOB_TOKEN}"
|
||||
}
|
||||
authentication {
|
||||
header(HttpHeaderAuthentication)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user