mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-15 12:02:11 +01:00
111 lines
2.4 KiB
Groovy
111 lines
2.4 KiB
Groovy
/*
|
|
* Copyright (c) 2020 - present Cloudogu GmbH
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify it under
|
|
* the terms of the GNU Affero General Public License as published by the Free
|
|
* Software Foundation, version 3.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
* details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see https://www.gnu.org/licenses/.
|
|
*/
|
|
|
|
plugins {
|
|
id 'org.unbroken-dome.helm' version '1.5.0'
|
|
id 'org.unbroken-dome.helm-publish' version '1.5.0'
|
|
id 'org.scm-manager.packaging'
|
|
id 'org.scm-manager.license'
|
|
}
|
|
|
|
configurations {
|
|
packageYaml {
|
|
canBeConsumed = true
|
|
}
|
|
}
|
|
|
|
helm {
|
|
downloadClient {
|
|
enabled = true
|
|
version = '3.4.2'
|
|
}
|
|
charts {
|
|
scmServer {
|
|
chartName = "scm-manager"
|
|
chartVersion = dockerTag
|
|
version = dockerTag
|
|
|
|
sourceDir = file('src/main/chart')
|
|
filtering {
|
|
enabled = true
|
|
values = [
|
|
dockerRepository: dockerRepository,
|
|
dockerTag: dockerTag,
|
|
documentationUrl: documentationUrl
|
|
]
|
|
}
|
|
}
|
|
}
|
|
publishing {
|
|
repositories {
|
|
nexus {
|
|
url = uri('https://packages.scm-manager.org')
|
|
if (isSnapshot) {
|
|
repository = 'helm-v2-snapshots'
|
|
} else {
|
|
repository = 'helm-v2-releases'
|
|
}
|
|
if (project.hasProperty("packagesScmManagerUsername") && project.hasProperty("packagesScmManagerPassword")) {
|
|
credentials {
|
|
username = project.property("packagesScmManagerUsername")
|
|
password = project.property("packagesScmManagerPassword")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
helmPackageScmServerChart {
|
|
appVersion = expandedVersion
|
|
}
|
|
|
|
task distribution(type: PackageYaml) {
|
|
type = 'k8s'
|
|
dependsOn helmPackageScmServerChart
|
|
}
|
|
|
|
artifacts {
|
|
packageYaml(file('build/libs/package.yml')) {
|
|
builtBy distribution
|
|
}
|
|
}
|
|
|
|
task publish {
|
|
dependsOn 'helmPublishScmServerChart'
|
|
}
|
|
|
|
license {
|
|
header rootProject.file("LICENSE-HEADER.txt")
|
|
lineEnding = "\n"
|
|
|
|
exclude '**/Chart.yaml'
|
|
exclude '**/*.txt'
|
|
|
|
tasks {
|
|
build {
|
|
files.from("build.gradle")
|
|
}
|
|
main {
|
|
files.from("src")
|
|
}
|
|
}
|
|
}
|
|
|
|
task check {
|
|
dependsOn checkLicenses
|
|
}
|