diff --git a/build.gradle b/build.gradle index 1bf34a602d..67cbf5139b 100644 --- a/build.gradle +++ b/build.gradle @@ -15,6 +15,10 @@ */ buildscript { + ext { + korkVersion = "4.0.2" + keikoVersion = "2.10.0" + } repositories { jcenter() maven { url "https://spinnaker.bintray.com/gradle" } @@ -22,84 +26,37 @@ buildscript { } dependencies { classpath "com.netflix.spinnaker.gradle:spinnaker-dev-plugin:5.2.2" - classpath "com.netflix.nebula:nebula-kotlin-plugin:$kotlinVersion" - classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion" + classpath "com.netflix.nebula:nebula-kotlin-plugin:1.3.30" + classpath "org.jetbrains.kotlin:kotlin-allopen:1.3.30" } } allprojects { apply plugin: "spinnaker.base-project" - apply plugin: "java" + apply plugin: "java-library" group = "com.netflix.spinnaker.orca" - ext { - spinnakerDependenciesVersion = '1.41.0' - if (project.hasProperty('spinnakerDependenciesVersion')) { - spinnakerDependenciesVersion = project.property('spinnakerDependenciesVersion') - } - } - - def checkLocalVersions = [spinnakerDependenciesVersion: spinnakerDependenciesVersion] - if (ext.has('versions')) { - def extVers = ext.get('versions') - if (extVers instanceof Map) { - checkLocalVersions.putAll(extVers) - } - } - - def localVersions = checkLocalVersions.findAll { it.value.endsWith('-SNAPSHOT') } - if (localVersions) { - logger.info("Enabling mavenLocal repo for $localVersions") - repositories { - mavenLocal() - } - } - - spinnaker { - dependenciesVersion = spinnakerDependenciesVersion - } - test { testLogging { exceptionFormat = 'full' } } - - configurations.all { - exclude group: "javax.servlet", module: "servlet-api" - exclude group: "org.slf4j", module: "slf4j-log4j12" - exclude group: "org.slf4j", module: "slf4j-simple" - resolutionStrategy { - force "org.antlr:antlr-runtime:3.5.2" - eachDependency { - if (it.requested.group.startsWith("com.fasterxml.jackson")) { - it.useVersion spinnaker.version('jackson') - } - if (it.requested.group == "com.netflix.rxjava" && it.requested.name == "rxjava-core") { - it.useTarget group: "io.reactivex", name: "rxjava", version: spinnaker.version("rxJava") - } - if (it.requested.group == "asm" || it.requested.group == "org.ow2.asm") { - it.useTarget group: "org.ow2.asm", name: "asm-all", version: "5.0.3" - } - if (it.requested.group == "cglib" || it.requested.name == "cglib") { - it.useTarget group: "cglib", name: "cglib", version: "3.1" - } - if (it.requested.group == "antlr") { - it.useTarget group: "org.antlr", name: it.requested.name, version: "3.5.2" - } - if (it.requested.group == "org.apache.xbean") { - it.useVersion "4.1" - } - } + + def useLocalMaven = korkVersion.endsWith('-SNAPSHOT') + if (useLocalMaven) { + logger.info("Enabling mavenLocal") + repositories { + mavenLocal() } } - + tasks.withType(JavaExec) { if (System.getProperty('DEBUG', 'false') == 'true') { jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8183' } } } + subprojects { def licenseExtension = project.extensions.findByName('license') if (licenseExtension != null) { @@ -112,13 +69,19 @@ subprojects { } } - project.afterEvaluate { - //c&p this because NetflixOss reverts it to 1.7 and ends up getting applied last.. - project.plugins.withType(JavaBasePlugin) { - JavaPluginConvention convention = project.convention.getPlugin(JavaPluginConvention) - convention.sourceCompatibility = JavaVersion.VERSION_1_8 - convention.targetCompatibility = JavaVersion.VERSION_1_8 - } + //c&p this because NetflixOss reverts it to 1.7 and ends up getting applied last.. + project.plugins.withType(JavaPlugin) { + JavaPluginConvention convention = project.convention.getPlugin(JavaPluginConvention) + convention.sourceCompatibility = JavaVersion.VERSION_1_8 + convention.targetCompatibility = JavaVersion.VERSION_1_8 + } + repositories { + jcenter() + } + dependencies { + implementation platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion") + annotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion") + testAnnotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion") } } diff --git a/gradle.properties b/gradle.properties index ca8da1b576..979005d019 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,10 +14,3 @@ # limitations under the License. # org.gradle.parallel=true - -kotlinVersion=1.2.41 -junitVersion=1.2.0 -jupiterVersion=5.0.2 -junitLegacyVersion=4.12.0 -spekVersion=1.1.5 -keikoVersion=2.9.8 diff --git a/gradle/groovy.gradle b/gradle/groovy.gradle index 6109b3f0b9..842dd0cd00 100644 --- a/gradle/groovy.gradle +++ b/gradle/groovy.gradle @@ -21,7 +21,10 @@ apply plugin: "groovy" dependencies { - compile spinnaker.dependency("groovy") - spinnaker.group("spockBase") - testCompile spinnaker.dependency("groovy") + implementation "org.codehaus.groovy:groovy-all" + + testImplementation "org.spockframework:spock-core" + testImplementation "cglib:cglib-nodep" + testImplementation "org.objenesis:objenesis" + testImplementation "org.codehaus.groovy:groovy-all" } diff --git a/gradle/init-publish.gradle b/gradle/init-publish.gradle index 4f32b81f48..ede7e54611 100644 --- a/gradle/init-publish.gradle +++ b/gradle/init-publish.gradle @@ -1,13 +1,12 @@ initscript { - repositories { - mavenLocal() - jcenter() - maven { url 'https://dl.bintray.com/spinnaker/gradle/' } - maven { url "https://plugins.gradle.org/m2/" } - } - dependencies { - classpath 'com.netflix.spinnaker.gradle:spinnaker-gradle-project:5.2.1' - } + repositories { + jcenter() + maven { url 'https://dl.bintray.com/spinnaker/gradle/' } + maven { url "https://plugins.gradle.org/m2/" } + } + dependencies { + classpath 'com.netflix.spinnaker.gradle:spinnaker-gradle-project:5.2.1' + } } // Can't use the plugin ID (spinnaker.project) on init scripts for some reason. diff --git a/gradle/kotlin.gradle b/gradle/kotlin.gradle index 65f6c16d63..9c202e6f08 100644 --- a/gradle/kotlin.gradle +++ b/gradle/kotlin.gradle @@ -17,23 +17,9 @@ apply plugin: "nebula.kotlin" apply plugin: "kotlin-spring" -configurations.all { - resolutionStrategy { - eachDependency { details -> - if (details.requested.group == "org.jetbrains.kotlin") { - details.useVersion kotlinVersion - } - } - } -} - compileKotlin { kotlinOptions { - languageVersion = "1.2" + languageVersion = "1.3" jvmTarget = "1.8" } } - -kapt { - mapDiagnosticLocations = true -} diff --git a/gradle/spek.gradle b/gradle/spek.gradle index fdbf517d23..629066703f 100644 --- a/gradle/spek.gradle +++ b/gradle/spek.gradle @@ -19,18 +19,18 @@ repositories { } dependencies { - testCompile "org.junit.platform:junit-platform-runner:$junitVersion" - testCompile "org.jetbrains.spek:spek-api:$spekVersion" - testCompile "org.jetbrains.spek:spek-subject-extension:$spekVersion" - testCompile "com.nhaarman:mockito-kotlin:1.5.0" - testCompile "org.assertj:assertj-core:3.9.0" - testCompile "org.junit.jupiter:junit-jupiter-api:$jupiterVersion" + testImplementation "org.junit.platform:junit-platform-runner" + testImplementation "org.jetbrains.spek:spek-api" + testImplementation "org.jetbrains.spek:spek-subject-extension" + testImplementation "com.nhaarman:mockito-kotlin" + testImplementation "org.assertj:assertj-core" + testImplementation "org.junit.jupiter:junit-jupiter-api" - testRuntime "org.junit.platform:junit-platform-launcher:$junitVersion" - testRuntime "org.junit.jupiter:junit-jupiter-engine:$jupiterVersion" - testRuntime "org.junit.vintage:junit-vintage-engine:$junitLegacyVersion" - testRuntime "org.jetbrains.spek:spek-junit-platform-engine:$spekVersion" - testCompile "io.strikt:strikt-core:0.11.5" + testRuntime "org.junit.platform:junit-platform-launcher" + testRuntime "org.junit.jupiter:junit-jupiter-engine" + testRuntime "org.junit.vintage:junit-vintage-engine" + testRuntime "org.jetbrains.spek:spek-junit-platform-engine" + testImplementation "io.strikt:strikt-core" } test { diff --git a/gradle/spock.gradle b/gradle/spock.gradle index 3d2363bdff..9665c132b9 100644 --- a/gradle/spock.gradle +++ b/gradle/spock.gradle @@ -21,8 +21,10 @@ apply plugin: "groovy" dependencies { - spinnaker.group("spockBase") - testCompile spinnaker.dependency("groovy") + testImplementation "org.spockframework:spock-core" + testImplementation "cglib:cglib-nodep" + testImplementation "org.objenesis:objenesis" + testImplementation "org.codehaus.groovy:groovy-all" } tasks.compileGroovy.enabled = false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 29953ea141..5c2d1cf016 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ea13fdfd19..5f1b1201a7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index cccdd3d517..b0d6d0ab5d 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" diff --git a/gradlew.bat b/gradlew.bat index e95643d6a2..15e1ee37a7 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome diff --git a/orca-applications/orca-applications.gradle b/orca-applications/orca-applications.gradle index acb49e51b3..70ab2981b9 100644 --- a/orca-applications/orca-applications.gradle +++ b/orca-applications/orca-applications.gradle @@ -17,10 +17,16 @@ apply from: "$rootDir/gradle/groovy.gradle" dependencies { - compile project(":orca-clouddriver") - compile project(":orca-front50") - compile project(":orca-retrofit") - compileOnly spinnaker.dependency('lombok') - annotationProcessor spinnaker.dependency('lombok') - testCompile project(":orca-test-groovy") + implementation project(":orca-core") + implementation project(":orca-clouddriver") + implementation project(":orca-front50") + implementation project(":orca-retrofit") + + implementation "com.netflix.spinnaker.kork:kork-core" + + compileOnly "org.projectlombok:lombok" + annotationProcessor "org.projectlombok:lombok" + testAnnotationProcessor "org.projectlombok:lombok" + + testImplementation project(":orca-test-groovy") } diff --git a/orca-bakery/orca-bakery.gradle b/orca-bakery/orca-bakery.gradle index 2741f5b6a7..6a4bec29df 100644 --- a/orca-bakery/orca-bakery.gradle +++ b/orca-bakery/orca-bakery.gradle @@ -17,12 +17,19 @@ apply from: "$rootDir/gradle/groovy.gradle" dependencies { - compile project(":orca-retrofit") - compile project(":orca-front50") - spinnaker.group('jackson') - compile spinnaker.dependency('jacksonGuava') - compileOnly spinnaker.dependency('lombok') - annotationProcessor spinnaker.dependency("lombok") - testCompile project(":orca-test-groovy") - testCompile "com.github.tomakehurst:wiremock:2.15.0" + implementation project(":orca-core") + implementation project(":orca-retrofit") + implementation project(":orca-front50") + + implementation "org.springframework:spring-beans" + + implementation "com.netflix.spinnaker.kork:kork-exceptions" + implementation "com.netflix.spinnaker.kork:kork-artifacts" + + compileOnly "org.projectlombok:lombok" + annotationProcessor "org.projectlombok:lombok" + testAnnotationProcessor "org.projectlombok:lombok" + + testImplementation project(":orca-test-groovy") + testImplementation "com.github.tomakehurst:wiremock:2.15.0" } diff --git a/orca-clouddriver/orca-clouddriver.gradle b/orca-clouddriver/orca-clouddriver.gradle index e2a2e25b5d..b1b2ac1c63 100644 --- a/orca-clouddriver/orca-clouddriver.gradle +++ b/orca-clouddriver/orca-clouddriver.gradle @@ -23,25 +23,33 @@ test { } dependencies { - compile spinnaker.dependency('frigga') - compileOnly spinnaker.dependency('lombok') - annotationProcessor spinnaker.dependency("lombok") - compile project(":orca-retrofit") - compile project(":orca-front50") - compile project(":orca-bakery") - compile project(":orca-core") - compile 'com.netflix.spinnaker.moniker:moniker:0.2.0' - compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${spinnaker.version('jackson')}" - compile 'io.kubernetes:client-java:1.0.0-beta1' + implementation project(":orca-retrofit") + implementation project(":orca-front50") + implementation project(":orca-bakery") + implementation project(":orca-core") - testCompile project(":orca-test") - testCompile project(":orca-test-groovy") - testCompile "com.github.tomakehurst:wiremock:2.15.0" - testCompile spinnaker.dependency('springTest') - testCompile spinnaker.dependency("junitJupiterApi") - testCompile spinnaker.dependency("assertj") - testCompile "org.mockito:mockito-core:2.25.0" + implementation "com.netflix.frigga:frigga" + implementation "com.netflix.spinnaker.moniker:moniker:0.2.0" + implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml" + implementation "io.kubernetes:client-java:1.0.0-beta1" + implementation "com.netflix.spinnaker.kork:kork-core" + implementation "com.netflix.spinnaker.kork:kork-exceptions" + implementation "com.netflix.spinnaker.kork:kork-security" + implementation "com.netflix.spinnaker.kork:kork-artifacts" + implementation "javax.validation:validation-api" - testRuntime spinnaker.dependency("junitJupiterEngine") - testRuntime "org.junit.vintage:junit-vintage-engine:${spinnaker.version('jupiter')}" + compileOnly "org.projectlombok:lombok" + annotationProcessor "org.projectlombok:lombok" + testAnnotationProcessor "org.projectlombok:lombok" + + testImplementation project(":orca-test") + testImplementation project(":orca-test-groovy") + testImplementation "com.github.tomakehurst:wiremock:2.15.0" + testImplementation "org.springframework:spring-test" + testImplementation "org.junit.jupiter:junit-jupiter-api" + testImplementation "org.assertj:assertj-core" + testImplementation "org.mockito:mockito-core" + + testRuntime "org.junit.jupiter:junit-jupiter-engine" + testRuntime "org.junit.vintage:junit-vintage-engine" } diff --git a/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/config/SelectableService.java b/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/config/SelectableService.java index 25ca6474b7..ed7fb6a2c3 100644 --- a/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/config/SelectableService.java +++ b/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/config/SelectableService.java @@ -28,7 +28,7 @@ public SelectableService(List serviceSelectors) { } public Object getService(Criteria criteria) { - Assert.notNull(criteria); + Assert.notNull(criteria, "criteria can't be empty"); return serviceSelectors .stream() diff --git a/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/cluster/FindImageFromClusterTask.groovy b/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/cluster/FindImageFromClusterTask.groovy index 01b029010b..fecfa50bb3 100644 --- a/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/cluster/FindImageFromClusterTask.groovy +++ b/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/cluster/FindImageFromClusterTask.groovy @@ -160,13 +160,13 @@ class FindImageFromClusterTask extends AbstractCloudProviderAwareTask implements return [(location): summaries] } catch (RetrofitError e) { if (e.response?.status == 404) { - final Map reason + Map reason try { reason = objectMapper.readValue(e.response.body.in(), new TypeReference>() {}) } catch (Exception ignored) { throw new IllegalStateException("Unexpected response from API") } - if (reason.error?.contains("target.fail.strategy")){ + if (reason?.error?.contains("target.fail.strategy")){ throw new IllegalStateException("Multiple possible server groups present in ${location.value}") } if (config.resolveMissingLocations) { diff --git a/orca-core-tck/orca-core-tck.gradle b/orca-core-tck/orca-core-tck.gradle index 938f02a6cc..21af4c2de5 100644 --- a/orca-core-tck/orca-core-tck.gradle +++ b/orca-core-tck/orca-core-tck.gradle @@ -1,10 +1,14 @@ apply from: "$rootDir/gradle/groovy.gradle" dependencies { - compile project(":orca-core") - compile spinnaker.dependency("junit") - compile spinnaker.dependency("spock") + api("org.spockframework:spock-core") - compile project(":orca-test") - compile project(":orca-test-groovy") + api(project(":orca-core")) + api(project(":orca-test-groovy")) + api(project(":orca-test")) + + implementation("com.netflix.eureka:eureka-client") + implementation("com.netflix.spinnaker.kork:kork-core") + implementation("com.netflix.spinnaker.kork:kork-exceptions") + implementation("junit:junit") } diff --git a/orca-core/orca-core.gradle b/orca-core/orca-core.gradle index 0aa6ed0efc..47fef72ffd 100644 --- a/orca-core/orca-core.gradle +++ b/orca-core/orca-core.gradle @@ -24,40 +24,44 @@ test { } dependencies { - compile project(":orca-extensionpoint") - compile spinnaker.dependency('guava') - compile spinnaker.dependency('slf4jApi') - testRuntime spinnaker.dependency('slf4jSimple') - - spinnaker.group('jackson') - - compile spinnaker.dependency('eurekaClient') - compile spinnaker.dependency('cglib') - compile spinnaker.dependency('jacksonGuava') - compile spinnaker.dependency('rxJava') - compile spinnaker.dependency('korkSecurity') - compile spinnaker.dependency('spectatorApi') - compile spinnaker.dependency('kork') - compile spinnaker.dependency('korkExceptions') - compile spinnaker.dependency('korkArtifacts') - compile spinnaker.dependency("logstashEncoder") - compile spinnaker.dependency("springSecurityWeb") - compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${spinnaker.version('jackson')}" - compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${spinnaker.version('jackson')}" - compile "com.fasterxml.jackson.module:jackson-module-kotlin:${spinnaker.version('jackson')}" - compile "org.apache.commons:commons-lang3:3.7" - compile "de.huxhorn.sulky:de.huxhorn.sulky.ulid:8.1.1" - compile "javax.servlet:javax.servlet-api:4.0.1" - compile('com.jayway.jsonpath:json-path:2.2.0') - - compileOnly spinnaker.dependency("lombok") - annotationProcessor spinnaker.dependency("lombok") - - testCompile project(":orca-test") - testCompile project(":orca-test-groovy") - testCompile spinnaker.dependency("junitJupiterApi") - testCompile spinnaker.dependency("assertj") - - testRuntime spinnaker.dependency("junitJupiterEngine") - testRuntime "org.junit.vintage:junit-vintage-engine:${spinnaker.version('jupiter')}" + api("com.fasterxml.jackson.core:jackson-annotations") + api("com.fasterxml.jackson.core:jackson-core") + api("com.fasterxml.jackson.core:jackson-databind") + api("com.fasterxml.jackson.datatype:jackson-datatype-guava") + api("com.fasterxml.jackson.datatype:jackson-datatype-jdk8") + api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") + api("com.fasterxml.jackson.module:jackson-module-kotlin") + api("com.google.code.findbugs:annotations:3.0.1") + api("de.huxhorn.sulky:de.huxhorn.sulky.ulid") + api("io.reactivex:rxjava") + api("org.springframework.boot:spring-boot-autoconfigure") + api("org.springframework.security:spring-security-web") + api("org.slf4j:slf4j-api") + + implementation(project(":orca-extensionpoint")) + + implementation("cglib:cglib-nodep") + implementation("com.google.guava:guava:20.0") + implementation("com.jayway.jsonpath:json-path:2.2.0") + implementation("com.netflix.eureka:eureka-client") + implementation("com.netflix.spectator:spectator-api") + implementation("com.netflix.spinnaker.kork:kork-artifacts") + implementation("com.netflix.spinnaker.kork:kork-core") + implementation("com.netflix.spinnaker.kork:kork-exceptions") + implementation("com.netflix.spinnaker.kork:kork-security") + implementation("org.springframework.boot:spring-boot-starter-web") + implementation("net.logstash.logback:logstash-logback-encoder") + implementation("org.apache.commons:commons-lang3") + + compileOnly("org.projectlombok:lombok") + annotationProcessor("org.projectlombok:lombok") + testAnnotationProcessor("org.projectlombok:lombok") + + testImplementation(project(":orca-test")) + testImplementation(project(":orca-test-groovy")) + testImplementation("org.junit.jupiter:junit-jupiter-api") + testImplementation("org.assertj:assertj-core") + + testRuntime("org.junit.jupiter:junit-jupiter-engine") + testRuntime("org.junit.vintage:junit-vintage-engine") } diff --git a/orca-dry-run/orca-dry-run.gradle b/orca-dry-run/orca-dry-run.gradle index e0b8908395..a3d6068c9c 100644 --- a/orca-dry-run/orca-dry-run.gradle +++ b/orca-dry-run/orca-dry-run.gradle @@ -17,14 +17,16 @@ apply from: "$rootDir/gradle/kotlin.gradle" apply from: "$rootDir/gradle/spek.gradle" -repositories { - jcenter() -} - dependencies { - compile project(":orca-core") - compile project(":orca-kotlin") + implementation(project(":orca-core")) + implementation(project(":orca-kotlin")) + + implementation("com.netflix.spinnaker.kork:kork-exceptions") + implementation("org.springframework.boot:spring-boot-autoconfigure") + implementation("org.springframework.boot:spring-boot-test") - testCompile "org.springframework.boot:spring-boot-test:${spinnaker.version('springBoot')}" - testCompile project(":orca-queue-tck") + testImplementation(project(":orca-queue-tck")) + testImplementation(project(":orca-queue")) + testImplementation(project(":orca-test-kotlin")) + testImplementation("com.netflix.spinnaker.kork:kork-exceptions") } diff --git a/orca-echo/orca-echo.gradle b/orca-echo/orca-echo.gradle index f4e2e4a569..5625230ce2 100644 --- a/orca-echo/orca-echo.gradle +++ b/orca-echo/orca-echo.gradle @@ -17,15 +17,21 @@ apply from: "$rootDir/gradle/groovy.gradle" dependencies { - compile project(":orca-core") - compile project(":orca-queue") - compile project(":orca-retrofit") - compile project(":orca-igor") - compile project(":orca-front50") - compile project(":orca-dry-run") - compile spinnaker.dependency('kork') - compile spinnaker.dependency('bootAutoConfigure') - testCompile "com.squareup.retrofit:retrofit-mock:${spinnaker.version('retrofit')}" + implementation(project(":orca-core")) + implementation(project(":orca-dry-run")) + implementation(project(":orca-front50")) + implementation(project(":orca-igor")) + implementation(project(":orca-queue")) + implementation(project(":orca-retrofit")) + + implementation("com.netflix.spinnaker.kork:kork-artifacts") + implementation("com.netflix.spinnaker.kork:kork-core") + implementation("com.netflix.spinnaker.kork:kork-exceptions") + implementation("com.netflix.spinnaker.kork:kork-security") + implementation("javax.validation:validation-api") + implementation("org.springframework.boot:spring-boot-autoconfigure") + + testImplementation("com.squareup.retrofit:retrofit-mock") } tasks.withType(Javadoc) { diff --git a/orca-eureka/orca-eureka.gradle b/orca-eureka/orca-eureka.gradle index fcb46eb50f..439d41cbc5 100644 --- a/orca-eureka/orca-eureka.gradle +++ b/orca-eureka/orca-eureka.gradle @@ -17,6 +17,10 @@ apply from: "$rootDir/gradle/spock.gradle" dependencies { - compile project(":orca-core") - compile project(":orca-retrofit") + implementation(project(":orca-core")) + implementation(project(":orca-retrofit")) + + implementation("com.netflix.eureka:eureka-client") + implementation("com.netflix.spinnaker.kork:kork-core") } + diff --git a/orca-flex/orca-flex.gradle b/orca-flex/orca-flex.gradle index 831b3ae9eb..9b1f8c1f1d 100644 --- a/orca-flex/orca-flex.gradle +++ b/orca-flex/orca-flex.gradle @@ -17,7 +17,10 @@ apply from: "$rootDir/gradle/groovy.gradle" dependencies { - compile spinnaker.dependency('frigga') - compile 'com.netflix.spinnaker.moniker:moniker:0.2.0' - compile project(":orca-retrofit") + implementation(project(":orca-core")) + implementation(project(":orca-retrofit")) + + implementation("com.netflix.frigga:frigga") + implementation("com.netflix.spinnaker.kork:kork-core") + implementation("com.netflix.spinnaker.moniker:moniker") } diff --git a/orca-front50/orca-front50.gradle b/orca-front50/orca-front50.gradle index 83f58bf558..23f1ac321c 100644 --- a/orca-front50/orca-front50.gradle +++ b/orca-front50/orca-front50.gradle @@ -17,11 +17,24 @@ apply from: "$rootDir/gradle/groovy.gradle" dependencies { - compile project(":orca-retrofit") - compile "com.netflix.servo:servo-core:0.12.21" - compileOnly spinnaker.dependency("lombok") - annotationProcessor spinnaker.dependency("lombok") - spinnaker.group("fiat") + api("com.netflix.spinnaker.fiat:fiat-api:0.62.0") + + implementation(project(":orca-core")) + implementation(project(":orca-extensionpoint")) + implementation(project(":orca-retrofit")) - testCompile project(":orca-test-groovy") + implementation("com.netflix.spectator:spectator-api") + implementation("com.netflix.spinnaker.kork:kork-artifacts") + implementation("com.netflix.spinnaker.kork:kork-exceptions") + implementation("com.netflix.spinnaker.kork:kork-security") + implementation("org.springframework.boot:spring-boot-autoconfigure") + implementation("org.springframework.security:spring-security-config") + implementation("org.springframework.security:spring-security-core") + implementation("org.springframework.security:spring-security-web") + + compileOnly("org.projectlombok:lombok") + annotationProcessor("org.projectlombok:lombok") + testAnnotationProcessor("org.projectlombok:lombok") + + testImplementation(project(":orca-test-groovy")) } diff --git a/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/pipeline/PipelineExpressionFunctionProvider.java b/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/pipeline/PipelineExpressionFunctionProvider.java index 70e061688b..e0b96d9c48 100644 --- a/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/pipeline/PipelineExpressionFunctionProvider.java +++ b/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/pipeline/PipelineExpressionFunctionProvider.java @@ -16,7 +16,7 @@ package com.netflix.spinnaker.orca.front50.pipeline; -import com.netflix.servo.util.Strings; +import com.google.common.base.Strings; import com.netflix.spinnaker.kork.core.RetrySupport; import com.netflix.spinnaker.orca.front50.Front50Service; import com.netflix.spinnaker.orca.pipeline.expressions.ExpressionFunctionProvider; diff --git a/orca-igor/orca-igor.gradle b/orca-igor/orca-igor.gradle index a9f2d555fd..85b30c1815 100644 --- a/orca-igor/orca-igor.gradle +++ b/orca-igor/orca-igor.gradle @@ -17,13 +17,21 @@ apply from: "$rootDir/gradle/groovy.gradle" dependencies { - compile project(":orca-retrofit") - compile project(":orca-clouddriver") - compile project(":orca-front50") - compile spinnaker.dependency('kork') - compile spinnaker.dependency('bootAutoConfigure') - compileOnly spinnaker.dependency("lombok") - annotationProcessor spinnaker.dependency("lombok") - testCompile project(":orca-test-groovy") - testCompile spinnaker.dependency("springTest") + implementation(project(":orca-clouddriver")) + implementation(project(":orca-core")) + implementation(project(":orca-front50")) + implementation(project(":orca-retrofit")) + + implementation("com.google.apis:google-api-services-cloudbuild:v1-rev836-1.25.0") + implementation("com.netflix.spinnaker.kork:kork-artifacts") + implementation("com.netflix.spinnaker.kork:kork-core") + implementation("com.netflix.spinnaker.kork:kork-exceptions") + implementation("org.springframework.boot:spring-boot-autoconfigure") + + compileOnly("org.projectlombok:lombok") + annotationProcessor("org.projectlombok:lombok") + testAnnotationProcessor("org.projectlombok:lombok") + + testImplementation(project(":orca-test-groovy")) + testImplementation("org.springframework:spring-test") } diff --git a/orca-integrations-gremlin/orca-integrations-gremlin.gradle b/orca-integrations-gremlin/orca-integrations-gremlin.gradle index 06be5ee4a9..9aee51e42e 100644 --- a/orca-integrations-gremlin/orca-integrations-gremlin.gradle +++ b/orca-integrations-gremlin/orca-integrations-gremlin.gradle @@ -1,9 +1,10 @@ apply from: "$rootDir/gradle/kotlin.gradle" dependencies { - compile project(":orca-core") - compile project(":orca-kotlin") - compile project(":orca-retrofit") + implementation(project(":orca-core")) + implementation(project(":orca-kotlin")) + implementation(project(":orca-retrofit")) + implementation "org.codehaus.groovy:groovy-all" - testCompile project(":orca-core-tck") + testImplementation(project(":orca-core-tck")) } diff --git a/orca-kayenta/orca-kayenta.gradle b/orca-kayenta/orca-kayenta.gradle index cdf0955f2c..ef620bbce1 100644 --- a/orca-kayenta/orca-kayenta.gradle +++ b/orca-kayenta/orca-kayenta.gradle @@ -18,10 +18,14 @@ apply from: "$rootDir/gradle/kotlin.gradle" apply from: "$rootDir/gradle/spek.gradle" dependencies { - compile project(":orca-kotlin") - compile project(":orca-retrofit") - compile project(":orca-clouddriver") + implementation(project(":orca-clouddriver")) + implementation(project(":orca-kotlin")) + implementation(project(":orca-retrofit")) - testCompile project(":orca-test-kotlin") - testCompile "com.github.tomakehurst:wiremock:2.15.0" + implementation('com.netflix.spinnaker.moniker:moniker:0.2.0') + implementation("com.netflix.frigga:frigga") + implementation("org.codehaus.groovy:groovy-all") + + testImplementation(project(":orca-test-kotlin")) + testImplementation("com.github.tomakehurst:wiremock:2.15.0") } diff --git a/orca-keel/orca-keel.gradle b/orca-keel/orca-keel.gradle index 88d75c7116..fd404530ce 100644 --- a/orca-keel/orca-keel.gradle +++ b/orca-keel/orca-keel.gradle @@ -17,6 +17,6 @@ apply from: "$rootDir/gradle/kotlin.gradle" dependencies { - compile "com.fasterxml.jackson.module:jackson-module-kotlin:${spinnaker.version("jackson")}" - compile project(":orca-retrofit") + implementation(project(":orca-core")) + implementation(project(":orca-retrofit")) } diff --git a/orca-kotlin/orca-kotlin.gradle b/orca-kotlin/orca-kotlin.gradle index 53cfdfa8ce..09148bf6b7 100644 --- a/orca-kotlin/orca-kotlin.gradle +++ b/orca-kotlin/orca-kotlin.gradle @@ -17,5 +17,5 @@ apply from: "$rootDir/gradle/kotlin.gradle" dependencies { - compile project(":orca-core") + api(project(":orca-core")) } diff --git a/orca-migration/orca-migration.gradle b/orca-migration/orca-migration.gradle index dbc8f8b87c..918bf2ffa2 100644 --- a/orca-migration/orca-migration.gradle +++ b/orca-migration/orca-migration.gradle @@ -18,5 +18,7 @@ apply from: "$rootDir/gradle/kotlin.gradle" apply from: "$rootDir/gradle/spek.gradle" dependencies { - compile project(":orca-front50") + implementation(project(":orca-core")) + implementation(project(":orca-front50")) + implementation "org.codehaus.groovy:groovy-all" } diff --git a/orca-mine/orca-mine.gradle b/orca-mine/orca-mine.gradle index 2c4541661e..38fb98e806 100644 --- a/orca-mine/orca-mine.gradle +++ b/orca-mine/orca-mine.gradle @@ -17,7 +17,14 @@ apply from: "$rootDir/gradle/groovy.gradle" dependencies { - compile project(':orca-retrofit') - compile project(':orca-clouddriver') - testCompile project(":orca-test-groovy") + implementation(project(":orca-clouddriver")) + implementation(project(":orca-core")) + implementation(project(":orca-retrofit")) + + implementation("com.netflix.frigga:frigga") + implementation("com.netflix.spinnaker.kork:kork-core") + implementation("com.netflix.spinnaker.kork:kork-exceptions") + implementation("com.netflix.spinnaker.moniker:moniker:0.2.0") + + testImplementation(project(":orca-test-groovy")) } diff --git a/orca-pipelinetemplate/orca-pipelinetemplate.gradle b/orca-pipelinetemplate/orca-pipelinetemplate.gradle index f07245743e..82dc428e44 100644 --- a/orca-pipelinetemplate/orca-pipelinetemplate.gradle +++ b/orca-pipelinetemplate/orca-pipelinetemplate.gradle @@ -2,32 +2,31 @@ apply from: "$rootDir/gradle/spock.gradle" apply from: "$rootDir/gradle/kotlin.gradle" dependencies { - compile project(":orca-extensionpoint") - compile project(":orca-core") - compile project(":orca-front50") - compile project(":orca-clouddriver") + implementation(project(":orca-clouddriver")) + implementation(project(":orca-core")) + implementation(project(":orca-extensionpoint")) + implementation(project(":orca-front50")) + implementation(project(":orca-retrofit")) - compile('com.hubspot.jinjava:jinjava:2.2.3') { + implementation("com.hubspot.jinjava:jinjava:2.2.3") { force = true } + implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml") + implementation("com.jayway.jsonpath:json-path:2.2.0") + implementation("com.netflix.frigga:frigga") + implementation("com.netflix.spectator:spectator-api") + implementation("com.netflix.spinnaker.kork:kork-artifacts") + implementation("com.netflix.spinnaker.kork:kork-exceptions") + implementation("com.squareup.okhttp3:okhttp") + implementation("javax.validation:validation-api:1.1.0.Final") + implementation("org.slf4j:slf4j-api") + implementation("org.springframework:spring-context") + implementation("org.springframework.boot:spring-boot-autoconfigure") - compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${spinnaker.version('jackson')}" - compile "com.fasterxml.jackson.module:jackson-module-kotlin:${spinnaker.version("jackson")}" - compile('com.jayway.jsonpath:json-path:2.2.0') + compileOnly("org.projectlombok:lombok") + annotationProcessor("org.projectlombok:lombok") - compile spinnaker.dependency("slf4jApi") - compile spinnaker.dependency("bootAutoConfigure") - compile spinnaker.dependency("springContext") - compile spinnaker.dependency("jacksonDatabind") - compile spinnaker.dependency("spectatorApi") - compile spinnaker.dependency("frigga") - compile spinnaker.dependency('korkExceptions') - compile spinnaker.dependency("okHttp3") - - compileOnly spinnaker.dependency("lombok") - annotationProcessor spinnaker.dependency("lombok") - - testCompile spinnaker.dependency("slf4jSimple") - testCompile 'org.spockframework:spock-unitils:1.1-groovy-2.4-rc-2' - testCompile 'org.codehaus.groovy:groovy-json:2.4.11' + testImplementation("org.codehaus.groovy:groovy-json") + testImplementation("org.slf4j:slf4j-simple") + testImplementation("org.spockframework:spock-unitils") } diff --git a/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/tasks/SavePipelineTemplateTask.java b/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/tasks/SavePipelineTemplateTask.java index 355cc68a6e..ebc6532ee2 100644 --- a/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/tasks/SavePipelineTemplateTask.java +++ b/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/tasks/SavePipelineTemplateTask.java @@ -15,10 +15,9 @@ */ package com.netflix.spinnaker.orca.pipelinetemplate.tasks; -import com.netflix.servo.util.Strings; import com.netflix.spinnaker.orca.pipelinetemplate.v1schema.model.PipelineTemplate; - import com.netflix.spinnaker.orca.pipelinetemplate.v1schema.model.PipelineTemplate.Variable; + import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -42,7 +41,7 @@ default void validate(PipelineTemplate template) { } if (!missingFields.isEmpty()) { - throw new IllegalArgumentException("Missing required fields: " + Strings.join(",", missingFields.iterator())); + throw new IllegalArgumentException("Missing required fields: " + String.join(",", missingFields)); } if (template.getVariables() != null) { @@ -54,7 +53,7 @@ default void validate(PipelineTemplate template) { if (!invalidVariableNames.isEmpty()) { throw new IllegalArgumentException("Variable names cannot include dashes (-)." - + " Invalid variable names: " + Strings.join(", ", invalidVariableNames.iterator())); + + " Invalid variable names: " + String.join(", ", invalidVariableNames)); } } } diff --git a/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/tasks/v2/DeleteV2PipelineTemplateTask.java b/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/tasks/v2/DeleteV2PipelineTemplateTask.java index 4064ccd79a..1850c9caad 100644 --- a/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/tasks/v2/DeleteV2PipelineTemplateTask.java +++ b/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/tasks/v2/DeleteV2PipelineTemplateTask.java @@ -22,7 +22,6 @@ import com.netflix.spinnaker.orca.front50.Front50Service; import com.netflix.spinnaker.orca.pipeline.model.Stage; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; import org.springframework.stereotype.Component; import retrofit.client.Response; @@ -50,7 +49,7 @@ public TaskResult execute(Stage stage) { String tag = (String) stage.getContext().get("tag"); String digest = (String) stage.getContext().get("digest"); - Response _ = front50Service.deleteV2PipelineTemplate(templateId, tag, digest); + Response notUsed = front50Service.deleteV2PipelineTemplate(templateId, tag, digest); Map outputs = new HashMap<>(); outputs.put("notification.type", "deletepipelinetemplate"); diff --git a/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/tasks/v2/SaveV2PipelineTemplateTask.java b/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/tasks/v2/SaveV2PipelineTemplateTask.java index 79ca10a228..212e9242a2 100644 --- a/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/tasks/v2/SaveV2PipelineTemplateTask.java +++ b/orca-pipelinetemplate/src/main/java/com/netflix/spinnaker/orca/pipelinetemplate/tasks/v2/SaveV2PipelineTemplateTask.java @@ -16,7 +16,7 @@ package com.netflix.spinnaker.orca.pipelinetemplate.tasks.v2; -import com.netflix.servo.util.Strings; +import com.google.common.base.Strings; import com.netflix.spinnaker.orca.pipelinetemplate.v2schema.model.V2PipelineTemplate; import java.util.ArrayList; @@ -49,7 +49,7 @@ default void validate(V2PipelineTemplate template) { } if (!missingFields.isEmpty()) { - throw new IllegalArgumentException("Missing required fields: " + Strings.join(",", missingFields.iterator())); + throw new IllegalArgumentException("Missing required fields: " + String.join(",", missingFields)); } if (!template.getSchema().equals(V2PipelineTemplate.V2_SCHEMA_VERSION)) { @@ -72,7 +72,7 @@ default void validate(V2PipelineTemplate template) { if (!invalidVariableNames.isEmpty()) { throw new IllegalArgumentException( String.format("Illegal variable names: %s. Variable names must match the regex: %s", - Strings.join(", ", invalidVariableNames.iterator()), + String.join(", ", invalidVariableNames), TEMPLATE_VALID_VARIABLE_NAME_REGEX)); } } diff --git a/orca-qos/orca-qos.gradle b/orca-qos/orca-qos.gradle index 31a62bd1e1..f093fe6d98 100644 --- a/orca-qos/orca-qos.gradle +++ b/orca-qos/orca-qos.gradle @@ -18,9 +18,12 @@ apply from: "$rootDir/gradle/kotlin.gradle" apply from: "$rootDir/gradle/spek.gradle" dependencies { - compile project(":orca-core") - compile project(":orca-front50") - compile project(":orca-queue") + implementation(project(":orca-core")) + implementation(project(":orca-front50")) + implementation(project(":orca-queue")) - testCompile project(":orca-test-kotlin") + implementation("com.netflix.spinnaker.kork:kork-core") + implementation("net.logstash.logback:logstash-logback-encoder") + + testImplementation(project(":orca-test-kotlin")) } diff --git a/orca-queue-redis/orca-queue-redis.gradle b/orca-queue-redis/orca-queue-redis.gradle index 6e2b1753d1..0575ee0424 100644 --- a/orca-queue-redis/orca-queue-redis.gradle +++ b/orca-queue-redis/orca-queue-redis.gradle @@ -17,16 +17,19 @@ apply from: "$rootDir/gradle/kotlin.gradle" apply from: "$rootDir/gradle/spek.gradle" -repositories { - jcenter() -} - dependencies { - compile project(":orca-redis") - compile project(":orca-queue") - compile "com.netflix.spinnaker.keiko:keiko-redis-spring:$keikoVersion" - compile "com.fasterxml.jackson.module:jackson-module-kotlin:${spinnaker.version("jackson")}" + implementation(project(":orca-core")) + implementation(project(":orca-queue")) + implementation(project(":orca-redis")) + + implementation("com.netflix.spinnaker.keiko:keiko-redis-spring:$keikoVersion") + implementation("com.netflix.spinnaker.kork:kork-jedis") + implementation("org.springframework.boot:spring-boot-test") - testCompile project(":orca-test-redis") - testCompile project(":orca-queue-tck") + testImplementation(project(":orca-queue-tck")) + testImplementation(project(":orca-test-kotlin")) + testImplementation(project(":orca-test-redis")) + testImplementation("org.springframework:spring-test") + testImplementation("org.springframework.boot:spring-boot-test") + testRuntime "com.fasterxml.jackson.module:jackson-module-kotlin" } diff --git a/orca-queue-redis/src/test/kotlin/com/netflix/spinnaker/orca/q/redis/RedisQueueIntegrationTest.kt b/orca-queue-redis/src/test/kotlin/com/netflix/spinnaker/orca/q/redis/RedisQueueIntegrationTest.kt index 32bc5a7628..29f46c9d91 100644 --- a/orca-queue-redis/src/test/kotlin/com/netflix/spinnaker/orca/q/redis/RedisQueueIntegrationTest.kt +++ b/orca-queue-redis/src/test/kotlin/com/netflix/spinnaker/orca/q/redis/RedisQueueIntegrationTest.kt @@ -18,17 +18,21 @@ package com.netflix.spinnaker.orca.q.redis import com.fasterxml.jackson.databind.ObjectMapper import com.netflix.spinnaker.config.RedisOrcaQueueConfiguration +import com.netflix.spinnaker.kork.dynamicconfig.DynamicConfigService import com.netflix.spinnaker.kork.jedis.RedisClientDelegate import com.netflix.spinnaker.kork.jedis.RedisClientSelector import com.netflix.spinnaker.orca.config.JedisConfiguration +import com.netflix.spinnaker.orca.config.RedisConfiguration import com.netflix.spinnaker.orca.q.QueueIntegrationTest import com.netflix.spinnaker.orca.q.TestConfig import com.netflix.spinnaker.orca.q.redis.pending.RedisPendingExecutionService import com.netflix.spinnaker.orca.test.redis.EmbeddedRedisConfiguration +import org.junit.jupiter.api.Test import org.junit.runner.RunWith import org.springframework.boot.test.context.SpringBootTest import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration +import org.springframework.test.annotation.DirtiesContext import org.springframework.test.context.junit4.SpringRunner import redis.clients.jedis.Jedis import redis.clients.util.Pool @@ -45,6 +49,9 @@ class RedisTestConfig { @Bean fun pendingExecutionService(jedisPool: Pool, mapper: ObjectMapper) = RedisPendingExecutionService(jedisPool, mapper) + + @Bean + fun dynamicConfigService(): DynamicConfigService = DynamicConfigService.NOOP } /** @@ -57,7 +64,8 @@ class RedisTestConfig { JedisConfiguration::class, TestConfig::class, RedisTestConfig::class, - RedisOrcaQueueConfiguration::class + RedisOrcaQueueConfiguration::class, + RedisConfiguration::class ], properties = [ "queue.retry.delay.ms=10", @@ -65,4 +73,5 @@ class RedisTestConfig { "logging.level.org.springframework.test=ERROR", "logging.level.com.netflix.spinnaker=FATAL" ]) +@DirtiesContext class RedisQueueIntegrationTest : QueueIntegrationTest() diff --git a/orca-queue-tck/orca-queue-tck.gradle b/orca-queue-tck/orca-queue-tck.gradle index c74b5b36bf..c5ac34cd08 100644 --- a/orca-queue-tck/orca-queue-tck.gradle +++ b/orca-queue-tck/orca-queue-tck.gradle @@ -17,14 +17,20 @@ apply from: "$rootDir/gradle/kotlin.gradle" dependencies { - compile "com.nhaarman:mockito-kotlin:1.5.0" - compile "org.assertj:assertj-core:3.9.0" + implementation(project(":orca-core")) + implementation(project(":orca-kotlin")) + implementation(project(":orca-queue")) + implementation(project(":orca-test-kotlin")) + implementation(project(":orca-test")) - compile "org.springframework.boot:spring-boot-test:${spinnaker.version('springBoot')}" - compile "com.netflix.spinnaker.keiko:keiko-mem:$keikoVersion" - compile project(":orca-queue") - compile project(":orca-test") - compile project(":orca-test-kotlin") - compile spinnaker.dependency("junit") - compile spinnaker.dependency("springTest") + implementation("com.netflix.eureka:eureka-client") + implementation("com.netflix.spinnaker.keiko:keiko-mem:$keikoVersion") + implementation("com.netflix.spinnaker.keiko:keiko-spring:$keikoVersion") + implementation("com.netflix.spinnaker.kork:kork-core") + implementation("com.nhaarman:mockito-kotlin") + implementation("junit:junit") + implementation("org.assertj:assertj-core") + implementation("org.springframework:spring-test") + implementation("org.springframework.boot:spring-boot-test") + implementation("com.fasterxml.jackson.module:jackson-module-kotlin") } diff --git a/orca-queue-tck/src/main/kotlin/com/netflix/spinnaker/orca/q/ExecutionLatch.kt b/orca-queue-tck/src/main/kotlin/com/netflix/spinnaker/orca/q/ExecutionLatch.kt index 9f36af2784..a7991239f6 100644 --- a/orca-queue-tck/src/main/kotlin/com/netflix/spinnaker/orca/q/ExecutionLatch.kt +++ b/orca-queue-tck/src/main/kotlin/com/netflix/spinnaker/orca/q/ExecutionLatch.kt @@ -43,7 +43,7 @@ class ExecutionLatch(private val predicate: Predicate) } } - fun await() = latch.await(1, TimeUnit.SECONDS) + fun await() = latch.await(2, TimeUnit.SECONDS) } fun ConfigurableApplicationContext.runToCompletion(execution: Execution, launcher: (Execution) -> Unit, repository: ExecutionRepository) { diff --git a/orca-queue-tck/src/main/kotlin/com/netflix/spinnaker/orca/q/QueueIntegrationTest.kt b/orca-queue-tck/src/main/kotlin/com/netflix/spinnaker/orca/q/QueueIntegrationTest.kt index 52183cbcc6..086db03ba0 100644 --- a/orca-queue-tck/src/main/kotlin/com/netflix/spinnaker/orca/q/QueueIntegrationTest.kt +++ b/orca-queue-tck/src/main/kotlin/com/netflix/spinnaker/orca/q/QueueIntegrationTest.kt @@ -68,6 +68,7 @@ import org.springframework.context.annotation.Import import org.springframework.context.event.ApplicationEventMulticaster import org.springframework.context.event.SimpleApplicationEventMulticaster import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor +import org.springframework.test.annotation.DirtiesContext import org.springframework.test.context.junit4.SpringRunner import java.time.Clock import java.time.Duration @@ -80,6 +81,7 @@ import java.time.temporal.ChronoUnit.HOURS properties = ["queue.retry.delay.ms=10"] ) @RunWith(SpringRunner::class) +@DirtiesContext class QueueIntegrationTest { @Autowired diff --git a/orca-queue/orca-queue.gradle b/orca-queue/orca-queue.gradle index 01ed334c10..3f348438f4 100644 --- a/orca-queue/orca-queue.gradle +++ b/orca-queue/orca-queue.gradle @@ -18,16 +18,18 @@ apply from: "$rootDir/gradle/kotlin.gradle" apply from: "$rootDir/gradle/spek.gradle" dependencies { - compile project(":orca-core") - compile project(":orca-kotlin") - compile "com.netflix.spinnaker.keiko:keiko-spring:$keikoVersion" - compile "org.threeten:threeten-extra:1.0" - compile "org.funktionale:funktionale-partials:1.2" - compile spinnaker.dependency("logstashEncoder") - compile "com.netflix.spinnaker.keiko:keiko-spring:$keikoVersion" - compile "javax.ws.rs:jsr311-api:1.1.1" + implementation(project(":orca-core")) + implementation(project(":orca-kotlin")) - testCompile project(":orca-test-kotlin") - testCompile project(":orca-queue-tck") - testCompile "org.assertj:assertj-core:3.9.0" + implementation("com.netflix.spinnaker.keiko:keiko-spring:$keikoVersion") + implementation("com.netflix.spinnaker.kork:kork-exceptions") + implementation("com.netflix.spinnaker.kork:kork-security") + implementation("javax.ws.rs:jsr311-api:1.1.1") + implementation("net.logstash.logback:logstash-logback-encoder") + implementation("org.funktionale:funktionale-partials") + implementation("org.threeten:threeten-extra") + + testImplementation(project(":orca-queue-tck")) + testImplementation(project(":orca-test-kotlin")) + testImplementation("org.assertj:assertj-core") } diff --git a/orca-redis/orca-redis.gradle b/orca-redis/orca-redis.gradle index 99e256e77e..486f5cee9e 100644 --- a/orca-redis/orca-redis.gradle +++ b/orca-redis/orca-redis.gradle @@ -2,13 +2,15 @@ apply from: "$rootDir/gradle/kotlin.gradle" apply from: "$rootDir/gradle/spock.gradle" dependencies { - compile project(":orca-core") - compile project(":orca-front50") + implementation(project(":orca-core")) + implementation(project(":orca-front50")) - compile spinnaker.dependency('rxJava') - compile spinnaker.dependency('jedis') - compile spinnaker.dependency('korkJedis') + implementation("com.netflix.spinnaker.kork:kork-exceptions") + implementation("com.netflix.spinnaker.kork:kork-jedis") + implementation("io.reactivex:rxjava") + implementation("net.logstash.logback:logstash-logback-encoder") + implementation("redis.clients:jedis") - testCompile project(":orca-core-tck") - testCompile project(":orca-test-redis") + testImplementation(project(":orca-core-tck")) + testImplementation(project(":orca-test-redis")) } diff --git a/orca-redis/src/main/java/com/netflix/spinnaker/orca/config/JedisConfiguration.java b/orca-redis/src/main/java/com/netflix/spinnaker/orca/config/JedisConfiguration.java index d3f514f1d6..12f1149fd2 100644 --- a/orca-redis/src/main/java/com/netflix/spinnaker/orca/config/JedisConfiguration.java +++ b/orca-redis/src/main/java/com/netflix/spinnaker/orca/config/JedisConfiguration.java @@ -15,10 +15,8 @@ */ package com.netflix.spinnaker.orca.config; -import org.apache.commons.pool2.impl.GenericObjectPoolConfig; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; diff --git a/orca-redis/src/main/java/com/netflix/spinnaker/orca/config/RedisConfiguration.java b/orca-redis/src/main/java/com/netflix/spinnaker/orca/config/RedisConfiguration.java index cea48caf6c..23f38b5fd1 100644 --- a/orca-redis/src/main/java/com/netflix/spinnaker/orca/config/RedisConfiguration.java +++ b/orca-redis/src/main/java/com/netflix/spinnaker/orca/config/RedisConfiguration.java @@ -18,39 +18,19 @@ import com.netflix.spectator.api.Registry; import com.netflix.spinnaker.kork.jedis.JedisClientConfiguration; -import com.netflix.spinnaker.kork.jedis.JedisClientDelegate; -import com.netflix.spinnaker.kork.jedis.RedisClientDelegate; import com.netflix.spinnaker.kork.jedis.RedisClientSelector; import com.netflix.spinnaker.orca.notifications.NotificationClusterLock; import com.netflix.spinnaker.orca.notifications.RedisNotificationClusterLock; import com.netflix.spinnaker.orca.pipeline.persistence.ExecutionRepository; import com.netflix.spinnaker.orca.pipeline.persistence.jedis.RedisExecutionRepository; import com.netflix.spinnaker.orca.telemetry.RedisInstrumentedExecutionRepository; -import org.apache.commons.pool2.impl.GenericObjectPool; import org.apache.commons.pool2.impl.GenericObjectPoolConfig; -import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.actuate.health.Health; -import org.springframework.boot.actuate.health.HealthIndicator; -import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; -import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.*; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; -import redis.clients.jedis.Jedis; -import redis.clients.jedis.JedisPool; -import redis.clients.jedis.Protocol; -import redis.clients.util.Pool; import rx.Scheduler; -import rx.schedulers.Schedulers; - -import java.lang.reflect.Field; -import java.net.URI; - -import static org.apache.commons.lang3.StringUtils.isNotEmpty; -import static redis.clients.jedis.Protocol.DEFAULT_DATABASE; @Configuration @Import({JedisClientConfiguration.class, JedisConfiguration.class}) diff --git a/orca-retrofit/orca-retrofit.gradle b/orca-retrofit/orca-retrofit.gradle index 7d411e80bd..ffc75aac5c 100644 --- a/orca-retrofit/orca-retrofit.gradle +++ b/orca-retrofit/orca-retrofit.gradle @@ -17,9 +17,17 @@ apply from: "$rootDir/gradle/groovy.gradle" dependencies { - compile project(":orca-core") - spinnaker.group('retrofitDefault') - compile spinnaker.dependency('korkWeb') - compile spinnaker.dependency('rxJava') - compile spinnaker.dependency('retrofit1okHttp3Client') + api("com.jakewharton.retrofit:retrofit1-okhttp3-client:1.1.0") + api("com.squareup.okhttp:okhttp-apache") + api("com.squareup.okhttp:okhttp-urlconnection") + api("com.squareup.okhttp:okhttp") + api("com.squareup.retrofit:converter-jackson") + api("com.squareup.retrofit:retrofit") + + implementation(project(":orca-core")) + + implementation("com.netflix.spinnaker.kork:kork-web") + implementation("io.reactivex:rxjava") + + testImplementation("com.squareup.retrofit:retrofit-mock") } diff --git a/orca-sql-mysql/orca-sql-mysql.gradle b/orca-sql-mysql/orca-sql-mysql.gradle index 5a8625c93a..c61015e1a0 100644 --- a/orca-sql-mysql/orca-sql-mysql.gradle +++ b/orca-sql-mysql/orca-sql-mysql.gradle @@ -1,4 +1,4 @@ dependencies { - compile project(":orca-sql") - compile "mysql:mysql-connector-java:8.0.12" + implementation(project(":orca-sql")) + implementation("mysql:mysql-connector-java") } diff --git a/orca-sql/orca-sql.gradle b/orca-sql/orca-sql.gradle index ce72a4f5b3..d06b33ed43 100644 --- a/orca-sql/orca-sql.gradle +++ b/orca-sql/orca-sql.gradle @@ -18,30 +18,31 @@ apply from: "$rootDir/gradle/kotlin.gradle" apply from: "$rootDir/gradle/spock.gradle" dependencies { - compile project(":orca-core") - - // TODO rz - Prefer definitely not having this - compile project(":orca-queue-redis") - - compile "org.springframework:spring-jdbc:${spinnaker.version("spring")}" - compile "org.springframework:spring-tx:${spinnaker.version("spring")}" - compile "org.jooq:jooq:3.9.6" - compile "org.liquibase:liquibase-core:3.6.1" - compile 'com.zaxxer:HikariCP:2.5.1' - - testCompile "com.h2database:h2:1.4.197" - testCompile project(":orca-core-tck") - testCompile project(":orca-test-groovy") - - testCompile "io.strikt:strikt-core:0.11.5" - testCompile "org.assertj:assertj-core:3.9.0" - testCompile "org.junit.jupiter:junit-jupiter-api:$jupiterVersion" - testCompile "dev.minutest:minutest:0.45.0" - testCompile "com.nhaarman:mockito-kotlin:1.5.0" - - testRuntime "org.junit.jupiter:junit-jupiter-engine:$jupiterVersion" - testRuntime "org.junit.platform:junit-platform-launcher:$junitVersion" - testRuntime "org.junit.vintage:junit-vintage-engine:$junitLegacyVersion" + implementation(project(":orca-core")) + + implementation('com.zaxxer:HikariCP') + implementation("com.netflix.spectator:spectator-api") + implementation("com.netflix.spinnaker.keiko:keiko-spring:$keikoVersion") + implementation("com.netflix.spinnaker.kork:kork-exceptions") + implementation("com.netflix.spinnaker.kork:kork-security") + implementation("org.jooq:jooq") + implementation("org.liquibase:liquibase-core") + implementation("org.springframework:spring-jdbc") + implementation("org.springframework:spring-tx") + implementation("org.springframework.boot:spring-boot-starter-actuator") + + testImplementation(project(":orca-core-tck")) + testImplementation(project(":orca-test-groovy")) + testImplementation("com.h2database:h2") + testImplementation("com.nhaarman:mockito-kotlin") + testImplementation("dev.minutest:minutest") + testImplementation("io.strikt:strikt-core") + testImplementation("org.assertj:assertj-core") + testImplementation("org.junit.jupiter:junit-jupiter-api") + + testRuntime "org.junit.jupiter:junit-jupiter-engine" + testRuntime "org.junit.platform:junit-platform-launcher" + testRuntime "org.junit.vintage:junit-vintage-engine" } test { diff --git a/orca-sql/src/main/kotlin/de/huxhorn/sulky/ulid/SpinULID.kt b/orca-sql/src/main/kotlin/de/huxhorn/sulky/ulid/SpinULID.kt index 8d667da46d..83e2727802 100644 --- a/orca-sql/src/main/kotlin/de/huxhorn/sulky/ulid/SpinULID.kt +++ b/orca-sql/src/main/kotlin/de/huxhorn/sulky/ulid/SpinULID.kt @@ -5,7 +5,7 @@ import java.util.* class SpinULID(random: Random): ULID(random) { val _random: Random? = random - fun nextULID(timestamp: Long): String { - return internalUIDString(timestamp, _random); + override fun nextULID(timestamp: Long): String { + return internalUIDString(timestamp, _random) } } diff --git a/orca-sql/src/test/kotlin/com/netflix/spinnaker/orca/sql/SqlHealthcheckQueueActivatorTest.kt b/orca-sql/src/test/kotlin/com/netflix/spinnaker/orca/sql/SqlHealthcheckQueueActivatorTest.kt index 65b3a14b13..6a0d2a68fd 100644 --- a/orca-sql/src/test/kotlin/com/netflix/spinnaker/orca/sql/SqlHealthcheckQueueActivatorTest.kt +++ b/orca-sql/src/test/kotlin/com/netflix/spinnaker/orca/sql/SqlHealthcheckQueueActivatorTest.kt @@ -27,12 +27,12 @@ import dev.minutest.rootContext import org.jooq.DSLContext import org.jooq.DeleteWhereStep import org.jooq.Table -import strikt.api.expect +import strikt.api.expectThat import strikt.assertions.isEqualTo class SqlHealthcheckQueueActivatorTest : JUnit5Minutests { - override val tests = rootContext { + fun tests() = rootContext { val dslContext = mock() val query = mock>() @@ -52,7 +52,7 @@ class SqlHealthcheckQueueActivatorTest : JUnit5Minutests { subject.performWrite() subject.performWrite() - expect(subject.enabled).isEqualTo(false) + expectThat(subject.enabled).isEqualTo(false) } } @@ -67,7 +67,7 @@ class SqlHealthcheckQueueActivatorTest : JUnit5Minutests { subject.performWrite() subject.performWrite() - expect(subject.enabled).isEqualTo(true) + expectThat(subject.enabled).isEqualTo(true) } } } diff --git a/orca-sql/src/test/kotlin/com/netflix/spinnaker/orca/sql/pipeline/persistence/PagedIteratorTest.kt b/orca-sql/src/test/kotlin/com/netflix/spinnaker/orca/sql/pipeline/persistence/PagedIteratorTest.kt index e463294fb5..c8d4ef399d 100644 --- a/orca-sql/src/test/kotlin/com/netflix/spinnaker/orca/sql/pipeline/persistence/PagedIteratorTest.kt +++ b/orca-sql/src/test/kotlin/com/netflix/spinnaker/orca/sql/pipeline/persistence/PagedIteratorTest.kt @@ -24,7 +24,7 @@ import org.assertj.core.api.Assertions.assertThat class PagedIteratorTest : JUnit5Minutests { - override val tests = rootContext> { + fun tests() = rootContext> { val pageSize = 3 val nextPage = mock<(Int, String?) -> Iterable>() diff --git a/orca-test-groovy/orca-test-groovy.gradle b/orca-test-groovy/orca-test-groovy.gradle index a9e7a8e1da..6eeb23e33a 100644 --- a/orca-test-groovy/orca-test-groovy.gradle +++ b/orca-test-groovy/orca-test-groovy.gradle @@ -17,5 +17,7 @@ apply from: "$rootDir/gradle/groovy.gradle" dependencies { - compile project(":orca-core") + implementation(project(":orca-core")) + + implementation("com.netflix.spinnaker.kork:kork-artifacts") } diff --git a/orca-test-kotlin/orca-test-kotlin.gradle b/orca-test-kotlin/orca-test-kotlin.gradle index ec135def42..695ae770d5 100644 --- a/orca-test-kotlin/orca-test-kotlin.gradle +++ b/orca-test-kotlin/orca-test-kotlin.gradle @@ -17,8 +17,9 @@ apply from: "$rootDir/gradle/kotlin.gradle" dependencies { - compile project(":orca-core") - compile "org.funktionale:funktionale-partials:1.2" - compile "org.jetbrains.spek:spek-api:$spekVersion" - compile "org.assertj:assertj-core:3.9.0" + implementation(project(":orca-core")) + + implementation("org.funktionale:funktionale-partials") + implementation("org.jetbrains.spek:spek-api") + implementation("org.assertj:assertj-core") } diff --git a/orca-test-kotlin/src/main/kotlin/com/netflix/spinnaker/time/Time.kt b/orca-test-kotlin/src/main/kotlin/com/netflix/spinnaker/time/TimeUtils.kt similarity index 100% rename from orca-test-kotlin/src/main/kotlin/com/netflix/spinnaker/time/Time.kt rename to orca-test-kotlin/src/main/kotlin/com/netflix/spinnaker/time/TimeUtils.kt diff --git a/orca-test-redis/orca-test-redis.gradle b/orca-test-redis/orca-test-redis.gradle index 7b016203f0..bbcb01037e 100644 --- a/orca-test-redis/orca-test-redis.gradle +++ b/orca-test-redis/orca-test-redis.gradle @@ -1,6 +1,7 @@ dependencies { - compile spinnaker.dependency('jedis') - compile spinnaker.dependency('korkJedis') - compile project(":orca-test") - compile spinnaker.dependency("korkJedisTest") + api("redis.clients:jedis") + api("com.netflix.spinnaker.kork:kork-jedis") + api("com.netflix.spinnaker.kork:kork-jedis-test") + + implementation(project(":orca-test")) } diff --git a/orca-test/orca-test.gradle b/orca-test/orca-test.gradle index d74206a762..8c2023c784 100644 --- a/orca-test/orca-test.gradle +++ b/orca-test/orca-test.gradle @@ -15,6 +15,8 @@ */ dependencies { - compile project(":orca-core") - compile spinnaker.dependency("spectatorApi") + implementation(project(":orca-core")) + + implementation("com.netflix.spectator:spectator-api") + implementation("org.springframework.security:spring-security-web") } diff --git a/orca-validation/orca-validation.gradle b/orca-validation/orca-validation.gradle index 1183fab7bc..6112ffb7f7 100644 --- a/orca-validation/orca-validation.gradle +++ b/orca-validation/orca-validation.gradle @@ -1,9 +1,7 @@ apply from: "$rootDir/gradle/spock.gradle" dependencies { - compile(group: "com.github.fge", name: "json-schema-validator", version: "2.2.6") - - compile project(":orca-core") - - spinnaker.group('jackson') + implementation(project(":orca-core")) + + implementation("com.github.fge:json-schema-validator:2.2.6") } diff --git a/orca-web/orca-web.gradle b/orca-web/orca-web.gradle index e5dd73574b..aa17f2df33 100644 --- a/orca-web/orca-web.gradle +++ b/orca-web/orca-web.gradle @@ -15,64 +15,68 @@ */ apply from: "$rootDir/gradle/groovy.gradle" -apply plugin: 'spinnaker.application' +apply plugin: "spinnaker.application" ext { - springConfigLocation = System.getProperty('spring.config.location', "${System.getProperty('user.home')}/.spinnaker/") + springConfigLocation = System.getProperty("spring.config.location", "${System.getProperty("user.home")}/.spinnaker/") } run { - systemProperty('spring.config.location', project.springConfigLocation) + systemProperty("spring.config.location", project.springConfigLocation) } -mainClassName = 'com.netflix.spinnaker.orca.Main' +mainClassName = "com.netflix.spinnaker.orca.Main" dependencies { - spinnaker.group("bootWeb") + implementation(project(":orca-applications")) + implementation(project(":orca-bakery")) + implementation(project(":orca-clouddriver")) + implementation(project(":orca-core")) + implementation(project(":orca-dry-run")) + implementation(project(":orca-echo")) + implementation(project(":orca-eureka")) + implementation(project(":orca-extensionpoint")) + implementation(project(":orca-flex")) + implementation(project(":orca-front50")) + implementation(project(":orca-igor")) + implementation(project(":orca-integrations-gremlin")) + implementation(project(":orca-kayenta")) + implementation(project(":orca-keel")) + implementation(project(":orca-migration")) + implementation(project(":orca-mine")) + implementation(project(":orca-pipelinetemplate")) + implementation(project(":orca-qos")) + implementation(project(":orca-queue-redis")) + implementation(project(":orca-redis")) + implementation(project(":orca-sql-mysql")) + implementation(project(":orca-sql")) + implementation(project(":orca-webhook")) - compile project(":orca-redis") - compile project(":orca-bakery") - compile project(":orca-clouddriver") - compile project(":orca-front50") - compile project(":orca-applications") - compile project(":orca-flex") - compile project(":orca-dry-run") - compile project(":orca-echo") - compile project(":orca-kayenta") - compile project(":orca-mine") - compile project(":orca-igor") - compile project(":orca-webhook") - compile project(":orca-eureka") - compile project(":orca-queue-redis") - compile project(":orca-pipelinetemplate") - compile project(":orca-keel") - compile project(":orca-qos") - compile project(":orca-migration") - compile project(":orca-sql") - compile project(":orca-sql-mysql") - compile project(":orca-integrations-gremlin") + implementation("com.netflix.spinnaker.kork:kork-artifacts") + implementation("com.netflix.spinnaker.kork:kork-core") + implementation("com.netflix.spinnaker.kork:kork-exceptions") + implementation("com.netflix.spinnaker.kork:kork-stackdriver") + implementation("com.netflix.spinnaker.kork:kork-web") + implementation("net.logstash.logback:logstash-logback-encoder") + implementation("net.logstash.logback:logstash-logback-encoder") + implementation("org.springframework.boot:spring-boot-starter-actuator") + implementation("org.springframework.boot:spring-boot-starter-web") - runtime spinnaker.dependency("kork") - compile spinnaker.dependency('korkExceptions') - compile spinnaker.dependency("korkStackdriver") - compile spinnaker.dependency("korkWeb") - compile spinnaker.dependency("logstashEncoder") + compileOnly("org.projectlombok:lombok") + annotationProcessor("org.projectlombok:lombok") - spinnaker.group('test') - testCompile project(":orca-test-groovy") - testCompile "com.netflix.spinnaker.keiko:keiko-mem:$keikoVersion" - - //this brings in the jetty GzipFilter which boot will autoconfigure - runtime 'org.eclipse.jetty:jetty-servlets:9.2.11.v20150529' + testImplementation(project(":orca-test-groovy")) + testImplementation("cglib:cglib-nodep") + testImplementation("com.netflix.spinnaker.keiko:keiko-mem:$keikoVersion") + testImplementation("junit:junit") + testImplementation("org.hamcrest:hamcrest-core:1.3") + testImplementation("org.objenesis:objenesis") + testImplementation("org.spockframework:spock-core") + testImplementation("org.spockframework:spock-spring") + testImplementation("org.springframework:spring-test") + testImplementation("org.springframework.boot:spring-boot-starter-test") } -// SHOULDN'T HAVE TO SPECIFY THIS HERE BUT SOMETHING FORCES IT LOWER configurations.all { - resolutionStrategy { - eachDependency { - if (it.requested.group.startsWith("com.fasterxml.jackson")) { - it.useVersion spinnaker.version('jackson') - } - } - } + exclude group: 'javax.servlet', module: 'servlet-api' } diff --git a/orca-webhook/orca-webhook.gradle b/orca-webhook/orca-webhook.gradle index ea3472f003..cf2781bee2 100644 --- a/orca-webhook/orca-webhook.gradle +++ b/orca-webhook/orca-webhook.gradle @@ -18,17 +18,23 @@ apply from: "$rootDir/gradle/groovy.gradle" dependencies { - compile project(':orca-core') - compile spinnaker.dependency('kork') - compile spinnaker.dependency('korkWeb') - compile spinnaker.dependency('bootAutoConfigure') - compile spinnaker.dependency('lombok') - annotationProcessor spinnaker.dependency("lombok") - compile('com.jayway.jsonpath:json-path:2.2.0') - compile spinnaker.dependency("okHttp3") - compile spinnaker.dependency('retrofit1okHttp3Client') -// testCompile project(':orca-test') - testCompile spinnaker.dependency("springTest") + implementation(project(':orca-core')) - spinnaker.group("fiat") + implementation("com.jakewharton.retrofit:retrofit1-okhttp3-client:1.1.0") + implementation("com.jayway.jsonpath:json-path:2.2.0") + implementation("com.netflix.spinnaker.fiat:fiat-api:0.62.0") + implementation("com.netflix.spinnaker.kork:kork-core") + implementation("com.netflix.spinnaker.kork:kork-web") + implementation("com.squareup.okhttp3:okhttp") + implementation("org.apache.httpcomponents:httpcore") + implementation("org.springframework.boot:spring-boot-autoconfigure") + implementation("org.springframework.security:spring-security-config") + implementation("org.springframework.security:spring-security-core") + implementation("org.springframework.security:spring-security-web") + + compileOnly("org.projectlombok:lombok") + annotationProcessor("org.projectlombok:lombok") + testAnnotationProcessor("org.projectlombok:lombok") + + testImplementation("org.springframework:spring-test") }