Skip to content

Instantly share code, notes, and snippets.

@x97mdr
Last active December 20, 2018 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x97mdr/ef08ab105176cb76896cbbba1683c08e to your computer and use it in GitHub Desktop.
Save x97mdr/ef08ab105176cb76896cbbba1683c08e to your computer and use it in GitHub Desktop.
spring-cloud-config-git-problem
spring.cloud.config.server.git.uri=ssh://git@my.server.com:7999/~jcameron/my-repo.git
spring.cloud.config.server.git.delete-untracked-branches=true
spring.cloud.config.server.git.clone-on-start=true
plugins {
id "org.jetbrains.kotlin.jvm" version '1.3.0' apply false
id "org.jetbrains.kotlin.plugin.spring" version '1.3.0' apply false
id "org.jetbrains.kotlin.plugin.noarg" version '1.3.0' apply false
id "org.jetbrains.kotlin.plugin.jpa" version '1.3.0' apply false
id 'org.springframework.boot' version '2.0.7.RELEASE' apply false
id 'com.jfrog.artifactory' version '4.8.1' apply false
id "org.sonarqube" version "2.6.2"
id "io.gitlab.arturbosch.detekt" version "1.0.0.RC6-4"
}
subprojects {
repositories {
mavenLocal()
maven {
url "http://build.pdt/artifactory/repo"
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: "kotlin-noarg"
apply plugin: "kotlin-jpa"
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.springframework.boot'
apply plugin: 'maven-publish'
ext {
springCloudVersion = 'Finchley.SR2'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
if (!it.name.endsWith('-cli') && !it.name.endsWith('-config-server')) {
jar {
enabled = true
}
bootJar {
enabled = false
}
} else {
apply plugin: 'com.jfrog.artifactory'
bootJar {
exclude("**/*.atlassian-plugin")
}
publishing {
publications {
bootJava(MavenPublication) {
artifact bootJar
}
}
}
artifactory {
contextUrl = repoRootContext
publish {
contextUrl = repoRootContext
repository {
repoKey = repoKey
username = repoUsername
password = repoPassword
}
defaults {
publications('bootJava')
}
}
clientConfig.info.setBuildName(System.getenv("JOB_NAME") != null ? System.getenv("JOB_NAME").replaceAll("/", " :: ") : null)
clientConfig.info.setBuildNumber(System.getenv("BUILD_NUMBER"))
clientConfig.info.setBuildUrl(System.getenv("BUILD_URL"))
}
dependencies {
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-task'
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-config'
}
}
group = 'com.my.project'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions.jvmTarget = sourceCompatibility
}
compileTestKotlin {
kotlinOptions.jvmTarget = sourceCompatibility
}
dependencies {
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8'
compile group: 'net.logstash.logback', name: 'logstash-logback-encoder', version: '5.2'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
runtime group: 'org.springframework.boot', name: 'spring-boot-devtools'
runtime group: 'org.postgresql', name: 'postgresql', version: '42.2.5'
}
detekt {
version = "1.0.0.RC6-4"
defaultProfile {
filters = ".*/resources/.*,.*/build/.*"
}
}
}
jar {
baseName = 'shiny-peasant-config-server'
}
dependencies {
compile project(':shiny-peasant-docker-secrets')
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-security'
compile group: 'org.springframework.cloud', name: 'spring-cloud-config-server'
compile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect'
}
@x97mdr
Copy link
Author

x97mdr commented Dec 20, 2018

Note: Server names changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment