diff --git a/build.gradle b/build.gradle index f4fed8575..8b210a9c2 100644 --- a/build.gradle +++ b/build.gradle @@ -15,48 +15,34 @@ */ buildscript { + ext { + korkVersion = "5.0.0" + fiatVersion = "1.0.0" + } repositories { jcenter() maven { url 'https://spinnaker.bintray.com/gradle/' } maven { url "https://plugins.gradle.org/m2/" } } dependencies { - classpath "com.netflix.spinnaker.gradle:spinnaker-dev-plugin:5.2.2" + classpath "com.netflix.spinnaker.gradle:spinnaker-dev-plugin:6.0.0" + if (Boolean.valueOf(enablePublishing)) { + classpath "com.netflix.spinnaker.gradle:spinnaker-gradle-project:6.0.0" + } } } allprojects { + group = "com.netflix.spinnaker.echo" apply plugin: "spinnaker.base-project" + if (Boolean.valueOf(enablePublishing)) { + apply plugin: "spinnaker.project" + } + apply plugin: "java-library" apply plugin: "groovy" apply plugin: 'jacoco' - group = "com.netflix.spinnaker.echo" - - 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 - } + group = "com.netflix.spinnaker.echo" test { testLogging { @@ -64,41 +50,43 @@ allprojects { } } - configurations.all { - exclude group: 'org.mortbay.jetty', module: 'servlet-api' - exclude group: 'javax.servlet', module: 'servlet-api' - exclude group: 'org.slf4j', module: 'slf4j-log4j12' - exclude group: 'org.slf4j', module: 'slf4j-simple' - resolutionStrategy { - force 'com.google.guava:guava:20.0' - } - } - tasks.withType(JavaExec) { if (System.getProperty('DEBUG', 'false') == 'true') { jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8189' } } + } subprojects { jacoco { - toolVersion = '0.8.1' + toolVersion = '0.8.3' } dependencies { - compile spinnaker.dependency('groovy') - compile spinnaker.dependency('guava') - compile spinnaker.dependency('slf4j') - testCompile spinnaker.dependency('spock') - testRuntime spinnaker.dependency('slf4jSimple') - testRuntime "org.slf4j:jcl-over-slf4j:${spinnaker.version('slf4j')}" - } + 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") + compileOnly "org.projectlombok:lombok" + annotationProcessor "org.projectlombok:lombok" + testAnnotationProcessor "org.projectlombok:lombok" + + implementation "org.codehaus.groovy:groovy-all" + implementation "com.github.ben-manes.caffeine:guava" + implementation "com.netflix.spectator:spectator-api" + implementation "org.slf4j:slf4j-api" + implementation "net.logstash.logback:logstash-logback-encoder" + implementation "org.springframework.boot:spring-boot-properties-migrator" + + testImplementation "org.spockframework:spock-core" - project.plugins.withType(JavaBasePlugin) { - JavaPluginConvention convention = project.convention.getPlugin(JavaPluginConvention) - convention.sourceCompatibility = JavaVersion.VERSION_1_8 - convention.targetCompatibility = JavaVersion.VERSION_1_8 + testImplementation "org.springframework.boot:spring-boot-starter-test" + testImplementation "org.spockframework:spock-core" + testImplementation "org.spockframework:spock-spring" + testImplementation "org.springframework:spring-test" + testImplementation "org.hamcrest:hamcrest-core" + testRuntimeOnly "cglib:cglib-nodep" + testRuntimeOnly "org.objenesis:objenesis" } } diff --git a/echo-artifacts/echo-artifacts.gradle b/echo-artifacts/echo-artifacts.gradle index b37b05d72..2bb970ebc 100644 --- a/echo-artifacts/echo-artifacts.gradle +++ b/echo-artifacts/echo-artifacts.gradle @@ -15,7 +15,12 @@ */ dependencies { - compile project(':echo-core') - - spinnaker.group("bootWeb") + implementation project(':echo-core') + implementation project(':echo-model') + implementation "com.squareup.retrofit:retrofit" + implementation "com.squareup.retrofit:converter-jackson" + implementation "com.jakewharton.retrofit:retrofit1-okhttp3-client:1.1.0" + implementation "com.netflix.spinnaker.kork:kork-web" + implementation "com.netflix.spinnaker.kork:kork-artifacts" + implementation "org.springframework.boot:spring-boot-starter-web" } diff --git a/echo-artifacts/src/main/java/com/netflix/spinnaker/echo/config/KeelConfig.java b/echo-artifacts/src/main/java/com/netflix/spinnaker/echo/config/KeelConfig.java index fbd9f9146..239721af0 100644 --- a/echo-artifacts/src/main/java/com/netflix/spinnaker/echo/config/KeelConfig.java +++ b/echo-artifacts/src/main/java/com/netflix/spinnaker/echo/config/KeelConfig.java @@ -19,12 +19,12 @@ @ConditionalOnExpression("${keel.enabled:false}") public class KeelConfig { @Bean - public LogLevel retrofitLogLevel(@Value("${retrofit.logLevel:BASIC}") String retrofitLogLevel) { + public LogLevel retrofitLogLevel(@Value("${retrofit.log-level:BASIC}") String retrofitLogLevel) { return LogLevel.valueOf(retrofitLogLevel); } @Bean - public Endpoint keelEndpoint(@Value("${keel.baseUrl}") String keelBaseUrl) { + public Endpoint keelEndpoint(@Value("${keel.base-url}") String keelBaseUrl) { return Endpoints.newFixedEndpoint(keelBaseUrl); } diff --git a/echo-core/echo-core.gradle b/echo-core/echo-core.gradle index 05ab01139..8b89473c1 100644 --- a/echo-core/echo-core.gradle +++ b/echo-core/echo-core.gradle @@ -15,29 +15,31 @@ */ dependencies { - annotationProcessor spinnaker.dependency('lombok') + implementation project(":echo-model") - spinnaker.group("retrofitDefault") + implementation "com.squareup.retrofit:retrofit" + implementation "com.squareup.retrofit:converter-jackson" + implementation "com.jakewharton.retrofit:retrofit1-okhttp3-client:1.1.0" + implementation "com.netflix.spinnaker.kork:kork-web" + implementation "com.netflix.spinnaker.kork:kork-artifacts" + implementation "com.squareup.okhttp:okhttp" + implementation "com.squareup.okhttp:okhttp-urlconnection" + implementation "com.squareup.okhttp:okhttp-apache" - compile project(":echo-model") + implementation "com.netflix.spinnaker.kork:kork-core" + implementation "com.netflix.spinnaker.kork:kork-exceptions" + implementation "com.netflix.spinnaker.kork:kork-security" - compile spinnaker.dependency('kork') - compile spinnaker.dependency('korkArtifacts') - compile spinnaker.dependency('korkExceptions') - compile spinnaker.dependency('korkSecurity') - compile spinnaker.dependency('korkWeb') + implementation "org.springframework.boot:spring-boot-starter-web" + implementation "org.apache.commons:commons-lang3" + implementation "com.netflix.eureka:eureka-client" - compile spinnaker.dependency('bootWeb') - compile spinnaker.dependency('commonsLang') - compile spinnaker.dependency('eurekaClient') - compile spinnaker.dependency('jinjava') - compile spinnaker.dependency('lombok') - compile spinnaker.dependency('retrofit1okHttp3Client') - compile spinnaker.dependency('rxJava') - compile spinnaker.dependency('springContext') + implementation "com.hubspot.jinjava:jinjava" + implementation "io.reactivex:rxjava" + implementation "org.springframework:spring-context" - compile 'commons-io:commons-io:2.5' + implementation 'commons-io:commons-io' - testCompile spinnaker.dependency('spockSpring') - testCompile spinnaker.dependency('springTest') + testImplementation "org.spockframework:spock-spring" + testImplementation "org.springframework:spring-test" } diff --git a/echo-model/echo-model.gradle b/echo-model/echo-model.gradle index ffab556fe..92eaf0676 100644 --- a/echo-model/echo-model.gradle +++ b/echo-model/echo-model.gradle @@ -15,8 +15,7 @@ */ dependencies { - spinnaker.group("lombok") - - compile spinnaker.dependency("kork") - compile spinnaker.dependency("korkArtifacts") + implementation "com.netflix.spinnaker.kork:kork-core" + implementation "com.netflix.spinnaker.kork:kork-artifacts" + implementation "org.springframework:spring-web" } diff --git a/echo-notifications/echo-notifications.gradle b/echo-notifications/echo-notifications.gradle index b8f7a7ec1..13cce45fb 100644 --- a/echo-notifications/echo-notifications.gradle +++ b/echo-notifications/echo-notifications.gradle @@ -15,19 +15,23 @@ */ dependencies { - compile project(':echo-core') - compile project(":echo-pipelinetriggers") - spinnaker.group("test") - spinnaker.group("bootWeb") - spinnaker.group("retrofitDefault") - compile spinnaker.dependency("groovy") - compile spinnaker.dependency("logstashEncoder") - compile spinnaker.dependency("kork") - compile spinnaker.dependency('korkWeb') - compile "javax.mail:mail:1.4.1" - compile "org.springframework.boot:spring-boot-starter-mail:${spinnaker.version('springBoot')}" - compile "org.springframework.boot:spring-boot-starter-freemarker:${spinnaker.version('springBoot')}" - compile "org.jsoup:jsoup:1.8.2" - compile "com.atlassian.commonmark:commonmark:0.9.0" - testCompile "com.icegreen:greenmail:1.4.0" + implementation project(':echo-core') + implementation project(':echo-model') + implementation project(":echo-pipelinetriggers") + implementation "org.springframework.boot:spring-boot-starter-web" + implementation "com.squareup.retrofit:retrofit" + implementation "com.squareup.retrofit:converter-jackson" + implementation "com.squareup.okhttp:okhttp" + implementation "com.squareup.okhttp:okhttp-urlconnection" + implementation "com.squareup.okhttp:okhttp-apache" + implementation "com.netflix.spinnaker.kork:kork-core" + implementation "com.netflix.spinnaker.kork:kork-artifacts" + implementation "com.netflix.spinnaker.kork:kork-web" + implementation "io.reactivex:rxjava" + implementation "javax.mail:mail:1.4.1" + implementation "org.springframework.boot:spring-boot-starter-mail" + implementation "org.springframework.boot:spring-boot-starter-freemarker" + implementation "org.jsoup:jsoup:1.8.2" + implementation "com.atlassian.commonmark:commonmark:0.9.0" + testImplementation "com.icegreen:greenmail:1.4.0" } diff --git a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/GithubConfig.java b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/GithubConfig.java index 0b8acb4c3..422ee46ae 100644 --- a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/GithubConfig.java +++ b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/GithubConfig.java @@ -30,11 +30,11 @@ import retrofit.converter.JacksonConverter; @Configuration -@ConditionalOnProperty("githubStatus.enabled") +@ConditionalOnProperty("github-status.enabled") @Slf4j public class GithubConfig { @Bean - public Endpoint githubEndpoint(@Value("${githubStatus.endpoint}") String endpoint) { + public Endpoint githubEndpoint(@Value("${github-status.endpoint}") String endpoint) { return Endpoints.newFixedEndpoint(endpoint); } diff --git a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/HipchatConfig.groovy b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/HipchatConfig.groovy index fdab75991..6f4bfaa01 100644 --- a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/HipchatConfig.groovy +++ b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/HipchatConfig.groovy @@ -41,7 +41,7 @@ import retrofit.client.Client class HipchatConfig { @Bean - Endpoint hipchatEndpoint(@Value('${hipchat.baseUrl}') String hipchatBaseUrl) { + Endpoint hipchatEndpoint(@Value('${hipchat.base-url}') String hipchatBaseUrl) { newFixedEndpoint(hipchatBaseUrl) } diff --git a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/PagerDutyConfig.java b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/PagerDutyConfig.java index c5591e916..49f1a1d25 100644 --- a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/PagerDutyConfig.java +++ b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/PagerDutyConfig.java @@ -31,7 +31,7 @@ import static retrofit.Endpoints.newFixedEndpoint; @Configuration -@ConditionalOnProperty("pagerDuty.enabled") +@ConditionalOnProperty("pager-duty.enabled") public class PagerDutyConfig { private static final Logger log = LoggerFactory.getLogger(PagerDutyConfig.class); diff --git a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/SlackConfig.groovy b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/SlackConfig.groovy index ac088d0d7..bab2ecd8a 100644 --- a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/SlackConfig.groovy +++ b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/SlackConfig.groovy @@ -72,7 +72,7 @@ class SlackConfig { } @Bean(name="useIncomingWebHook") - boolean useIncomingWebHook(@Value('${slack.token}') String token) { + boolean useIncomingWebHook(@Value('${slack.token:}') String token) { return StringUtils.isNotBlank(token) && token.count("/") >= 2 } diff --git a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/TwilioConfig.groovy b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/TwilioConfig.groovy index 1a1a74727..cf20ac9c9 100644 --- a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/TwilioConfig.groovy +++ b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/TwilioConfig.groovy @@ -42,14 +42,14 @@ import retrofit.converter.JacksonConverter class TwilioConfig { @Bean - Endpoint twilioEndpoint(@Value('${twilio.baseUrl}') String twilioBaseUrl) { + Endpoint twilioEndpoint(@Value('twilio.base-url') String twilioBaseUrl) { newFixedEndpoint(twilioBaseUrl) } @Bean TwilioService twilioService( - @Value('${twilio.account}') String username, - @Value('${twilio.token}') String password, + @Value('twilio.account') String username, + @Value('twilio.token') String password, Endpoint twilioEndpoint, Client retrofitClient, RestAdapter.LogLevel retrofitLogLevel) { diff --git a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/AbstractEventNotificationAgent.groovy b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/AbstractEventNotificationAgent.groovy index a7f580530..a47784d97 100644 --- a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/AbstractEventNotificationAgent.groovy +++ b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/AbstractEventNotificationAgent.groovy @@ -33,7 +33,7 @@ abstract class AbstractEventNotificationAgent implements EchoEventListener { @Autowired(required = false) protected ObjectMapper mapper - @Value('${spinnaker.baseUrl}') + @Value('${spinnaker.base-url}') String spinnakerUrl static Map CONFIG = [ diff --git a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/GithubNotificationAgent.java b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/GithubNotificationAgent.java index 806929923..276ec3d08 100644 --- a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/GithubNotificationAgent.java +++ b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/GithubNotificationAgent.java @@ -38,7 +38,7 @@ import java.util.regex.Pattern; @Slf4j -@ConditionalOnProperty("githubStatus.enabled") +@ConditionalOnProperty("github-status.enabled") @Service public class GithubNotificationAgent extends AbstractEventNotificationAgent { private ImmutableMap STATUSES = ImmutableMap.of( @@ -160,6 +160,6 @@ public void setToken(String token) { @Autowired private GithubService githubService; - @Value("${githubStatus.token}") + @Value("${github-status.token}") private String token; } diff --git a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/NotificationTemplateEngine.groovy b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/NotificationTemplateEngine.groovy index d065a8062..d5262f7ca 100644 --- a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/NotificationTemplateEngine.groovy +++ b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/NotificationTemplateEngine.groovy @@ -40,7 +40,7 @@ class NotificationTemplateEngine { @Autowired Configuration configuration - @Value('${spinnaker.baseUrl}') + @Value('${spinnaker.base-url}') String spinnakerUrl String build(Notification notification, Type type) { diff --git a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/SlackNotificationAgent.groovy b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/SlackNotificationAgent.groovy index 5c4e6cd25..b17fbc213 100644 --- a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/SlackNotificationAgent.groovy +++ b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/notification/SlackNotificationAgent.groovy @@ -38,10 +38,10 @@ class SlackNotificationAgent extends AbstractEventNotificationAgent { @Autowired SlackService slackService - @Value('${slack.token}') + @Value('${slack.token:}') String token - @Value('${slack.sendCompactMessages:false}') + @Value('${slack.send-compact-messages:false}') Boolean sendCompactMessages @Override diff --git a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/pagerduty/PagerDutyNotificationService.groovy b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/pagerduty/PagerDutyNotificationService.groovy index a2a6c26cb..898eefb4d 100644 --- a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/pagerduty/PagerDutyNotificationService.groovy +++ b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/pagerduty/PagerDutyNotificationService.groovy @@ -38,7 +38,7 @@ import static net.logstash.logback.argument.StructuredArguments.kv @Slf4j @Component -@ConditionalOnProperty('pagerDuty.enabled') +@ConditionalOnProperty('pager-duty.enabled') class PagerDutyNotificationService implements NotificationService { private static Notification.Type TYPE = Notification.Type.PAGER_DUTY @@ -48,7 +48,7 @@ class PagerDutyNotificationService implements NotificationService { @Autowired PagerDutyService pagerDuty - @Value('${pagerDuty.token}') + @Value('${pager-duty.token:}') String token @Autowired diff --git a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/slack/SlackNotificationService.groovy b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/slack/SlackNotificationService.groovy index 4683d05c3..4a46fb837 100644 --- a/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/slack/SlackNotificationService.groovy +++ b/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/slack/SlackNotificationService.groovy @@ -33,10 +33,10 @@ class SlackNotificationService implements NotificationService { @Autowired SlackService slack - @Value('${slack.token}') + @Value('${slack.token:}') String token - @Value('${slack.sendCompactMessages:false}') + @Value('${slack.send-compact-messages:false}') Boolean sendCompactMessages @Autowired diff --git a/echo-notifications/src/test/groovy/com/netflix/spinnaker/echo/notification/ManualJudgmentTemplateTest.groovy b/echo-notifications/src/test/groovy/com/netflix/spinnaker/echo/notification/ManualJudgmentTemplateTest.groovy index d3d6b23ef..bb2aa944f 100644 --- a/echo-notifications/src/test/groovy/com/netflix/spinnaker/echo/notification/ManualJudgmentTemplateTest.groovy +++ b/echo-notifications/src/test/groovy/com/netflix/spinnaker/echo/notification/ManualJudgmentTemplateTest.groovy @@ -17,7 +17,7 @@ package com.netflix.spinnaker.echo.notification import com.netflix.spinnaker.echo.api.Notification -import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration +import org.springframework.boot.autoconfigure.freemarker.FreeMarkerNonWebConfiguration import org.springframework.boot.autoconfigure.freemarker.FreeMarkerProperties import spock.lang.Shared import spock.lang.Specification @@ -28,8 +28,8 @@ class ManualJudgmentTemplateTest extends Specification { def notificationTemplateEngine void setup() { - def autoconfig = new FreeMarkerAutoConfiguration.FreeMarkerNonWebConfiguration() - autoconfig.properties = new FreeMarkerProperties(preferFileSystemAccess: false) + def properties = new FreeMarkerProperties(preferFileSystemAccess: false) + def autoconfig = new FreeMarkerNonWebConfiguration(properties) def config = autoconfig.freeMarkerConfiguration() config.afterPropertiesSet() notificationTemplateEngine = new NotificationTemplateEngine( diff --git a/echo-notifications/src/test/groovy/com/netflix/spinnaker/echo/notification/NotificationServiceSpec.groovy b/echo-notifications/src/test/groovy/com/netflix/spinnaker/echo/notification/NotificationServiceSpec.groovy index 6ce03d98e..fee47e080 100644 --- a/echo-notifications/src/test/groovy/com/netflix/spinnaker/echo/notification/NotificationServiceSpec.groovy +++ b/echo-notifications/src/test/groovy/com/netflix/spinnaker/echo/notification/NotificationServiceSpec.groovy @@ -22,7 +22,7 @@ import com.netflix.spinnaker.echo.hipchat.HipchatNotificationService import com.netflix.spinnaker.echo.hipchat.HipchatService import com.netflix.spinnaker.echo.twilio.TwilioNotificationService import com.netflix.spinnaker.echo.twilio.TwilioService -import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration +import org.springframework.boot.autoconfigure.freemarker.FreeMarkerNonWebConfiguration import org.springframework.boot.autoconfigure.freemarker.FreeMarkerProperties import spock.lang.Shared import spock.lang.Specification @@ -32,8 +32,8 @@ class NotificationServiceSpec extends Specification { def notificationTemplateEngine void setup() { - def autoconfig = new FreeMarkerAutoConfiguration.FreeMarkerNonWebConfiguration() - autoconfig.properties = new FreeMarkerProperties() + def properties = new FreeMarkerProperties() + def autoconfig = new FreeMarkerNonWebConfiguration(properties) def config = autoconfig.freeMarkerConfiguration() config.afterPropertiesSet() notificationTemplateEngine = new NotificationTemplateEngine( diff --git a/echo-pipelinetriggers/echo-pipelinetriggers.gradle b/echo-pipelinetriggers/echo-pipelinetriggers.gradle index 77679b405..e6c5eb29b 100644 --- a/echo-pipelinetriggers/echo-pipelinetriggers.gradle +++ b/echo-pipelinetriggers/echo-pipelinetriggers.gradle @@ -21,33 +21,37 @@ test { } dependencies { - spinnaker.group('fiat') - spinnaker.group('lombok') - spinnaker.group('retrofitDefault') + implementation project(':echo-model') + implementation "com.netflix.spinnaker.kork:kork-artifacts" + implementation "com.netflix.spinnaker.fiat:fiat-api:$fiatVersion" + implementation "com.netflix.spinnaker.fiat:fiat-core:$fiatVersion" + implementation "com.squareup.retrofit:retrofit" + implementation "com.squareup.retrofit:converter-jackson" + implementation "com.jakewharton.retrofit:retrofit1-okhttp3-client:1.1.0" + implementation "com.netflix.spinnaker.kork:kork-web" + implementation "com.squareup.okhttp:okhttp" + implementation "com.squareup.okhttp:okhttp-urlconnection" + implementation "com.squareup.okhttp:okhttp-apache" - compile project(':echo-core') - compile project(':echo-model') - compile spinnaker.dependency('kork') - compile spinnaker.dependency('korkArtifacts') - compile spinnaker.dependency('korkSecurity') - compile spinnaker.dependency('korkWeb') - compile spinnaker.dependency('korkExpressions') + implementation project(':echo-core') + implementation "com.netflix.spinnaker.kork:kork-core" + implementation "com.netflix.spinnaker.kork:kork-security" + implementation "com.netflix.spinnaker.kork:kork-web" + implementation "com.netflix.spinnaker.kork:kork-expressions" - compile spinnaker.dependency('bootWeb') - compile spinnaker.dependency('bootActuator') - compile spinnaker.dependency('jacksonDatabind') - compile spinnaker.dependency('rxJava') - compile spinnaker.dependency('springContext') - compile spinnaker.dependency('spectatorApi') - compile group: 'commons-codec', name: 'commons-codec', version: '1.10' - compile group: 'org.apache.commons', name:'commons-lang3', version: '3.4' + implementation "org.springframework.boot:spring-boot-starter-web" + implementation "com.fasterxml.jackson.core:jackson-databind" + implementation "io.reactivex:rxjava" + implementation "org.springframework:spring-context" + implementation "com.netflix.spectator:spectator-api" + implementation "org.apache.commons:commons-lang3" + implementation "commons-codec:commons-codec" - testCompile project(':echo-test') - testCompile spinnaker.dependency('bootTest') - testCompile spinnaker.dependency('cglib') - testCompile spinnaker.dependency('junitJupiterApi') - testCompile spinnaker.dependency('assertj') + testImplementation project(':echo-test') + testImplementation "org.springframework.boot:spring-boot-starter-test" + testImplementation "org.junit.jupiter:junit-jupiter-api" + testImplementation "org.assertj:assertj-core" - testRuntimeOnly spinnaker.dependency("junitJupiterEngine") - testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${spinnaker.version('jupiter')}" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine" } diff --git a/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/config/IgorConfig.java b/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/config/IgorConfig.java index 767f9cec2..1415de512 100644 --- a/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/config/IgorConfig.java +++ b/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/config/IgorConfig.java @@ -36,7 +36,7 @@ @Slf4j public class IgorConfig { @Bean - public Endpoint igorEndpoint(@Value("${igor.baseUrl}") String igorBaseUrl) { + public Endpoint igorEndpoint(@Value("${igor.base-url}") String igorBaseUrl) { return Endpoints.newFixedEndpoint(igorBaseUrl); } diff --git a/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/config/PipelineTriggerConfiguration.java b/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/config/PipelineTriggerConfiguration.java index d2f499fb7..f3bfe1fec 100644 --- a/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/config/PipelineTriggerConfiguration.java +++ b/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/config/PipelineTriggerConfiguration.java @@ -44,7 +44,7 @@ public void setRetrofitClient(OkHttpClient okHttpClient) { } @Bean - public OrcaService orca(@Value("${orca.baseUrl}") final String endpoint) { + public OrcaService orca(@Value("${orca.base-url}") final String endpoint) { return bindRetrofitService(OrcaService.class, endpoint); } @@ -67,7 +67,7 @@ PubsubEventHandler pubsubEventHandler(Registry registry, ObjectMapper objectMapp } @Bean - @ConfigurationProperties(prefix = "quietPeriod") + @ConfigurationProperties(prefix = "quiet-period") public QuietPeriodIndicatorConfigurationProperties quietPeriodIndicatorConfigurationProperties() { return new QuietPeriodIndicatorConfigurationProperties(); } diff --git a/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/pipelinetriggers/PipelineCache.java b/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/pipelinetriggers/PipelineCache.java index 66b89dc3e..5c5544133 100644 --- a/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/pipelinetriggers/PipelineCache.java +++ b/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/pipelinetriggers/PipelineCache.java @@ -66,8 +66,8 @@ public class PipelineCache implements MonitoredPoller { private volatile Map> triggersByType; @Autowired - public PipelineCache(@Value("${front50.pollingIntervalMs:10000}") int pollingIntervalMs, - @Value("${front50.pollingSleepMs:100}") int pollingSleepMs, + public PipelineCache(@Value("${front50.polling-interval-ms:10000}") int pollingIntervalMs, + @Value("${front50.polling-sleep-ms:100}") int pollingSleepMs, ObjectMapper objectMapper, @NonNull Front50Service front50, @NonNull OrcaService orca, diff --git a/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/pipelinetriggers/orca/PipelineInitiator.java b/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/pipelinetriggers/orca/PipelineInitiator.java index a0027b6b6..1d8a1bd9e 100644 --- a/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/pipelinetriggers/orca/PipelineInitiator.java +++ b/echo-pipelinetriggers/src/main/java/com/netflix/spinnaker/echo/pipelinetriggers/orca/PipelineInitiator.java @@ -74,8 +74,8 @@ public PipelineInitiator(@NonNull Registry registry, ObjectMapper objectMapper, @NonNull QuietPeriodIndicator quietPeriodIndicator, @Value("${orca.enabled:true}") boolean enabled, - @Value("${orca.pipelineInitiatorRetryCount:5}") int retryCount, - @Value("${orca.pipelineInitiatorRetryDelayMillis:5000}") long retryDelayMillis) { + @Value("${orca.pipeline-initiator-retry-count:5}") int retryCount, + @Value("${orca.pipeline-initiator-retry-delay-millis:5000}") long retryDelayMillis) { this.registry = registry; this.orca = orca; this.fiatPermissionEvaluator = fiatPermissionEvaluator.orElse(null); diff --git a/echo-pubsub-aws/echo-pubsub-aws.gradle b/echo-pubsub-aws/echo-pubsub-aws.gradle index b65dfbc10..ef9952f80 100644 --- a/echo-pubsub-aws/echo-pubsub-aws.gradle +++ b/echo-pubsub-aws/echo-pubsub-aws.gradle @@ -15,10 +15,13 @@ */ dependencies { - compile project(':echo-pubsub-core') - compile spinnaker.dependency("objenesis") - compile spinnaker.dependency("cglib") - compile spinnaker.dependency("aws") - compile spinnaker.dependency("korkAws") - compile spinnaker.dependency("spectatorApi") + implementation project(':echo-artifacts') + implementation project(':echo-core') + implementation project(':echo-model') + implementation project(':echo-pubsub-core') + implementation "com.amazonaws:aws-java-sdk" //eeesh + implementation "com.netflix.spinnaker.kork:kork-core" + implementation "com.netflix.spinnaker.kork:kork-aws" + implementation "com.netflix.spectator:spectator-api" + implementation "javax.validation:validation-api" } diff --git a/echo-pubsub-aws/src/main/java/com/netflix/spinnaker/echo/config/AmazonPubsubProperties.java b/echo-pubsub-aws/src/main/java/com/netflix/spinnaker/echo/config/AmazonPubsubProperties.java index 541fa300a..9bf31da3d 100644 --- a/echo-pubsub-aws/src/main/java/com/netflix/spinnaker/echo/config/AmazonPubsubProperties.java +++ b/echo-pubsub-aws/src/main/java/com/netflix/spinnaker/echo/config/AmazonPubsubProperties.java @@ -18,12 +18,12 @@ import lombok.Data; import org.apache.commons.lang3.StringUtils; -import org.hibernate.validator.constraints.NotEmpty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.context.properties.ConfigurationProperties; import javax.validation.Valid; +import javax.validation.constraints.NotEmpty; import java.io.*; import java.util.List; diff --git a/echo-pubsub-core/echo-pubsub-core.gradle b/echo-pubsub-core/echo-pubsub-core.gradle index 6d71ccdc6..55bc5b961 100644 --- a/echo-pubsub-core/echo-pubsub-core.gradle +++ b/echo-pubsub-core/echo-pubsub-core.gradle @@ -15,18 +15,18 @@ */ dependencies { - compile project(':echo-core') - compile project(':echo-model') - compile project(':echo-pipelinetriggers') + implementation project(':echo-core') + implementation project(':echo-model') + implementation project(':echo-pipelinetriggers') - spinnaker.group("bootWeb") - spinnaker.group("spockBase") + implementation "org.springframework.boot:spring-boot-starter-web" - compile spinnaker.dependency("groovy") - compile spinnaker.dependency("guava") - compile spinnaker.dependency("jedis") - compile spinnaker.dependency('kork') - compile spinnaker.dependency("korkJedis") - compile spinnaker.dependency("korkJedisTest") - compile spinnaker.dependency("korkDynomite") + implementation "redis.clients:jedis" + implementation "io.reactivex:rxjava" + implementation "com.hubspot.jinjava:jinjava" + implementation "com.netflix.spinnaker.kork:kork-core" + implementation "com.netflix.spinnaker.kork:kork-jedis" + implementation "com.netflix.spinnaker.kork:kork-dynomite" + implementation "com.netflix.spinnaker.kork:kork-artifacts" + testImplementation "com.netflix.spinnaker.kork:kork-jedis-test" } diff --git a/echo-pubsub-google/echo-pubsub-google.gradle b/echo-pubsub-google/echo-pubsub-google.gradle index b4907cd22..c6e5190cd 100644 --- a/echo-pubsub-google/echo-pubsub-google.gradle +++ b/echo-pubsub-google/echo-pubsub-google.gradle @@ -15,7 +15,13 @@ */ dependencies { - compile project(':echo-pubsub-core') - compile project(':echo-notifications') - compile 'com.google.cloud:google-cloud-pubsub:1.59.0' + implementation project(':echo-artifacts') + implementation project(':echo-core') + implementation project(':echo-model') + implementation project(':echo-pubsub-core') + implementation project(':echo-notifications') + implementation 'com.google.cloud:google-cloud-pubsub:1.59.0' + implementation 'org.apache.commons:commons-lang3' + implementation 'org.springframework.boot:spring-boot-autoconfigure' + implementation "javax.validation:validation-api" } diff --git a/echo-pubsub-google/src/main/java/com/netflix/spinnaker/echo/config/GooglePubsubProperties.java b/echo-pubsub-google/src/main/java/com/netflix/spinnaker/echo/config/GooglePubsubProperties.java index 5320d0572..629da3ab0 100644 --- a/echo-pubsub-google/src/main/java/com/netflix/spinnaker/echo/config/GooglePubsubProperties.java +++ b/echo-pubsub-google/src/main/java/com/netflix/spinnaker/echo/config/GooglePubsubProperties.java @@ -24,6 +24,7 @@ import java.util.List; import javax.validation.Valid; import javax.validation.constraints.Min; +import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import lombok.AllArgsConstructor; @@ -31,7 +32,6 @@ import lombok.Data; import lombok.NoArgsConstructor; import org.apache.commons.lang3.StringUtils; -import org.hibernate.validator.constraints.NotEmpty; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.validation.annotation.Validated; diff --git a/echo-rest/echo-rest.gradle b/echo-rest/echo-rest.gradle index 4dc937ca8..81bd5b266 100644 --- a/echo-rest/echo-rest.gradle +++ b/echo-rest/echo-rest.gradle @@ -15,10 +15,17 @@ */ dependencies { - spinnaker.group('retrofitDefault') - compile project(':echo-model') - compile spinnaker.dependency('korkWeb') - compile spinnaker.dependency('jacksonDatabind') - testCompile spinnaker.dependency('spockSpring') - testCompile spinnaker.dependency('springTest') + implementation "com.squareup.retrofit:retrofit" + implementation "com.squareup.retrofit:converter-jackson" + implementation "com.squareup.okhttp:okhttp" + implementation "com.squareup.okhttp:okhttp-urlconnection" + implementation "com.squareup.okhttp:okhttp-apache" + implementation project(':echo-model') + + implementation "commons-codec:commons-codec" + + implementation "com.netflix.spinnaker.kork:kork-web" + implementation "com.fasterxml.jackson.core:jackson-databind" + testImplementation "org.spockframework:spock-spring" + testImplementation "org.springframework.boot:spring-boot-starter-test" } diff --git a/echo-rest/src/main/groovy/com/netflix/spinnaker/echo/config/RestConfig.groovy b/echo-rest/src/main/groovy/com/netflix/spinnaker/echo/config/RestConfig.groovy index a709aec34..37b85426e 100644 --- a/echo-rest/src/main/groovy/com/netflix/spinnaker/echo/config/RestConfig.groovy +++ b/echo-rest/src/main/groovy/com/netflix/spinnaker/echo/config/RestConfig.groovy @@ -48,7 +48,7 @@ import static retrofit.Endpoints.newFixedEndpoint class RestConfig { @Bean - LogLevel retrofitLogLevel(@Value('${retrofit.logLevel:BASIC}') String retrofitLogLevel) { + LogLevel retrofitLogLevel(@Value('${retrofit.log-level:BASIC}') String retrofitLogLevel) { return LogLevel.valueOf(retrofitLogLevel) } diff --git a/echo-rest/src/main/groovy/com/netflix/spinnaker/echo/events/RestEventListener.groovy b/echo-rest/src/main/groovy/com/netflix/spinnaker/echo/events/RestEventListener.groovy index 0e0665f7a..139e77746 100644 --- a/echo-rest/src/main/groovy/com/netflix/spinnaker/echo/events/RestEventListener.groovy +++ b/echo-rest/src/main/groovy/com/netflix/spinnaker/echo/events/RestEventListener.groovy @@ -43,10 +43,10 @@ class RestEventListener implements EchoEventListener { Registry registry - @Value('${rest.defaultEventName:spinnaker_events}') + @Value('${rest.default-event-name:spinnaker_events}') String eventName - @Value('${rest.defaultFieldName:payload}') + @Value('${rest.default-field-name:payload}') String fieldName @Autowired diff --git a/echo-scheduler/echo-scheduler.gradle b/echo-scheduler/echo-scheduler.gradle index db0e09bc9..2d66bc5c4 100644 --- a/echo-scheduler/echo-scheduler.gradle +++ b/echo-scheduler/echo-scheduler.gradle @@ -15,20 +15,23 @@ */ dependencies { - compile project(':echo-pipelinetriggers') - - spinnaker.group('spockBase') - spinnaker.group("retrofitDefault") - compile spinnaker.dependency('groovy') - compile spinnaker.dependency('slf4jApi') - compile spinnaker.dependency('eurekaClient') - compile spinnaker.dependency('logstashEncoder') - compile spinnaker.dependency('spectatorApi') - compile spinnaker.dependency('korkSql') // NOTE: Quartz 2.3.0 had a breaking change that doesn't recognize certain CRON expression (which pipelines use today) // If you upgrade it to 2.3.0 you will probably have to write a Front50 migrator - compile ('org.quartz-scheduler:quartz:2.2.1') - compile ("org.springframework:spring-context-support:${spinnaker.version('spring')}") + implementation "org.quartz-scheduler:quartz:2.2.1" + implementation project(':echo-core') + implementation project(':echo-model') + implementation project(':echo-pipelinetriggers') + + implementation "com.squareup.retrofit:retrofit" + implementation "com.squareup.retrofit:converter-jackson" + implementation "com.squareup.okhttp:okhttp" + implementation "com.squareup.okhttp:okhttp-urlconnection" + implementation "com.squareup.okhttp:okhttp-apache" + + 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-sql" - testRuntime spinnaker.dependency('slf4jSimple') + implementation "org.springframework:spring-context-support" } diff --git a/echo-scheduler/src/main/groovy/com/netflix/spinnaker/echo/config/SchedulerConfiguration.groovy b/echo-scheduler/src/main/groovy/com/netflix/spinnaker/echo/config/SchedulerConfiguration.groovy index daaefb29c..c4be6e8cc 100644 --- a/echo-scheduler/src/main/groovy/com/netflix/spinnaker/echo/config/SchedulerConfiguration.groovy +++ b/echo-scheduler/src/main/groovy/com/netflix/spinnaker/echo/config/SchedulerConfiguration.groovy @@ -44,6 +44,9 @@ import java.util.concurrent.TimeUnit @ConditionalOnExpression('${scheduler.enabled:false}') @Import(DefaultSqlConfiguration) class SchedulerConfiguration { + @Value('${scheduler.pipeline-configs-poller.polling-interval-ms:30000}') + long syncInterval + @Bean SchedulerFactoryBean schedulerFactoryBean( Optional dataSourceOptional, @@ -99,9 +102,9 @@ class SchedulerConfiguration { * Trigger for the job to sync pipeline triggers */ @Bean - @ConditionalOnExpression('${scheduler.pipelineConfigsPoller.enabled:true}') + @ConditionalOnExpression('${scheduler.pipeline-configs-poller.enabled:true}') SimpleTriggerFactoryBean syncJobTriggerBean( - @Value('${scheduler.pipelineConfigsPoller.pollingIntervalMs:30000}') long intervalMs, + @Value('${scheduler.pipeline-configs-poller.polling-interval-ms:30000}') long intervalMs, JobDetail pipelineSyncJobBean ) { SimpleTriggerFactoryBean triggerBean = new SimpleTriggerFactoryBean() @@ -129,8 +132,8 @@ class SchedulerConfiguration { } @Bean - Client retrofitClient(@Value('${retrofit.connectTimeoutMillis:10000}') long connectTimeoutMillis, - @Value('${retrofit.readTimeoutMillis:15000}') long readTimeoutMillis) { + Client retrofitClient(@Value('${retrofit.connect-timeout-millis:10000}') long connectTimeoutMillis, + @Value('${retrofit.read-timeout-millis:15000}') long readTimeoutMillis) { OkHttpClient okHttpClient = new OkHttpClient() okHttpClient.setConnectTimeout(connectTimeoutMillis, TimeUnit.MILLISECONDS) okHttpClient.setReadTimeout(readTimeoutMillis, TimeUnit.MILLISECONDS) diff --git a/echo-scheduler/src/main/groovy/com/netflix/spinnaker/echo/scheduler/actions/pipeline/MissedPipelineTriggerCompensationJob.groovy b/echo-scheduler/src/main/groovy/com/netflix/spinnaker/echo/scheduler/actions/pipeline/MissedPipelineTriggerCompensationJob.groovy index 68482a6c0..f63476519 100644 --- a/echo-scheduler/src/main/groovy/com/netflix/spinnaker/echo/scheduler/actions/pipeline/MissedPipelineTriggerCompensationJob.groovy +++ b/echo-scheduler/src/main/groovy/com/netflix/spinnaker/echo/scheduler/actions/pipeline/MissedPipelineTriggerCompensationJob.groovy @@ -57,7 +57,7 @@ import static net.logstash.logback.argument.StructuredArguments.kv * has been performed, a recurring job will be started at a less aggressive poll cycle to ensure lost triggers are * re-scheduled. */ -@ConditionalOnExpression('${scheduler.enabled:false} && ${scheduler.compensationJob.enabled:false}') +@ConditionalOnExpression('${scheduler.enabled:false} && ${scheduler.compensation-job.enabled:false}') @Component @Slf4j class MissedPipelineTriggerCompensationJob implements ApplicationListener { @@ -79,12 +79,12 @@ class MissedPipelineTriggerCompensationJob implements ApplicationListener buildDefaults() { } public static void main(String... args) { + System.setProperty("spring.main.allow-bean-definition-overriding", "true"); new SpringApplicationBuilder().properties(DEFAULT_PROPS).sources(Application.class).run(args); } diff --git a/echo-web/src/main/java/com/netflix/spinnaker/echo/config/ComponentConfig.java b/echo-web/src/main/java/com/netflix/spinnaker/echo/config/ComponentConfig.java index 524ce42cb..766acacc9 100644 --- a/echo-web/src/main/java/com/netflix/spinnaker/echo/config/ComponentConfig.java +++ b/echo-web/src/main/java/com/netflix/spinnaker/echo/config/ComponentConfig.java @@ -31,7 +31,7 @@ import org.springframework.context.annotation.FilterType; import org.springframework.core.Ordered; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * Finds spring beans (@Component, @Resource, @Controller, etc.) on your classpath. @@ -46,7 +46,7 @@ }, excludeFilters = @Filter(value = Configuration.class, type = FilterType.ANNOTATION) ) -public class ComponentConfig extends WebMvcConfigurerAdapter { +public class ComponentConfig implements WebMvcConfigurer { private Registry registry; public ComponentConfig(Registry registry) { diff --git a/echo-web/src/main/java/com/netflix/spinnaker/echo/config/Front50Config.java b/echo-web/src/main/java/com/netflix/spinnaker/echo/config/Front50Config.java index c0cf0ebdc..a5cc85e46 100644 --- a/echo-web/src/main/java/com/netflix/spinnaker/echo/config/Front50Config.java +++ b/echo-web/src/main/java/com/netflix/spinnaker/echo/config/Front50Config.java @@ -35,13 +35,13 @@ @Configuration @Slf4j public class Front50Config { - @Value("${okHttpClient.connectionPool.maxIdleConnections:5}") + @Value("${ok-http-client.connection-pool.max-idle-connections:5}") private int maxIdleConnections; - @Value("${okHttpClient.connectionPool.keepAliveDurationMs:300000}") + @Value("${ok-http-client.connection-pool.keep-alive-duration-ms:300000}") private int keepAliveDurationMs; - @Value("${okHttpClient.retryOnConnectionFailure:true}") + @Value("${ok-http-client.retry-on-connection-failure:true}") private boolean retryOnConnectionFailure; @Bean @@ -58,7 +58,7 @@ public LogLevel retrofitLogLevel() { } @Bean - public Endpoint front50Endpoint(@Value("${front50.baseUrl}") String front50BaseUrl) { + public Endpoint front50Endpoint(@Value("${front50.base-url}") String front50BaseUrl) { return Endpoints.newFixedEndpoint(front50BaseUrl); } diff --git a/echo-web/src/main/java/com/netflix/spinnaker/echo/scheduler/TriggerDescription.java b/echo-web/src/main/java/com/netflix/spinnaker/echo/scheduler/TriggerDescription.java index f11039304..fbe6ccf60 100644 --- a/echo-web/src/main/java/com/netflix/spinnaker/echo/scheduler/TriggerDescription.java +++ b/echo-web/src/main/java/com/netflix/spinnaker/echo/scheduler/TriggerDescription.java @@ -1,7 +1,8 @@ package com.netflix.spinnaker.echo.scheduler; import lombok.Data; -import org.hibernate.validator.constraints.NotBlank; + +import javax.validation.constraints.NotBlank; @Data public class TriggerDescription { diff --git a/echo-web/src/test/java/com/netflix/spinnaker/echo/ApplicationSpec.java b/echo-web/src/test/java/com/netflix/spinnaker/echo/ApplicationSpec.java index 29363edec..6ee410684 100644 --- a/echo-web/src/test/java/com/netflix/spinnaker/echo/ApplicationSpec.java +++ b/echo-web/src/test/java/com/netflix/spinnaker/echo/ApplicationSpec.java @@ -18,14 +18,14 @@ import com.netflix.spinnaker.echo.pipelinetriggers.orca.OrcaService; import com.netflix.spinnaker.echo.services.Front50Service; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @SpringBootTest(classes = {Application.class}) @TestPropertySource(properties = { "spring.config.location=classpath:echo-test.yml" }) public class ApplicationSpec { diff --git a/echo-webhooks/echo-webhooks.gradle b/echo-webhooks/echo-webhooks.gradle index 5b359991b..2842cb6ce 100644 --- a/echo-webhooks/echo-webhooks.gradle +++ b/echo-webhooks/echo-webhooks.gradle @@ -15,9 +15,8 @@ */ dependencies { - compile project(':echo-core') - compile project(':echo-model') - spinnaker.group("bootWeb") - compile spinnaker.dependency("groovy") - spinnaker.group("spockBase") + implementation project(':echo-core') + implementation project(':echo-model') + implementation "org.springframework.boot:spring-boot-starter-web" + implementation "com.netflix.spinnaker.kork:kork-artifacts" } diff --git a/echo-webhooks/src/main/groovy/com/netflix/spinnaker/echo/config/WebhookProperties.java b/echo-webhooks/src/main/groovy/com/netflix/spinnaker/echo/config/WebhookProperties.java index e17c68446..b9441731c 100644 --- a/echo-webhooks/src/main/groovy/com/netflix/spinnaker/echo/config/WebhookProperties.java +++ b/echo-webhooks/src/main/groovy/com/netflix/spinnaker/echo/config/WebhookProperties.java @@ -18,10 +18,10 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.hibernate.validator.constraints.NotEmpty; import org.springframework.boot.context.properties.ConfigurationProperties; import javax.validation.Valid; +import javax.validation.constraints.NotEmpty; import java.util.ArrayList; import java.util.List; diff --git a/gradle.properties b/gradle.properties index 4bf3c7148..40f6370be 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,2 @@ org.gradle.parallel=true - -jackson.version=2.9.2 +enablePublishing=false diff --git a/gradle/buildViaTravis.sh b/gradle/buildViaTravis.sh index caca72ab1..ba4581ec7 100755 --- a/gradle/buildViaTravis.sh +++ b/gradle/buildViaTravis.sh @@ -5,7 +5,7 @@ GRADLE="./gradlew -I gradle/init-publish.gradle" if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" - $GRADLE -Prelease.useLastTag=true build + $GRADLE build elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' $GRADLE -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" build snapshot --stacktrace @@ -23,5 +23,5 @@ elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then esac else echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' - $GRADLE -Prelease.useLastTag=true build + $GRADLE build fi diff --git a/gradle/installViaTravis.sh b/gradle/installViaTravis.sh index 2b827a0e2..de696583d 100755 --- a/gradle/installViaTravis.sh +++ b/gradle/installViaTravis.sh @@ -11,7 +11,7 @@ elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then $GRADLE -Prelease.travisci=true assemble elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' - $GRADLE -Prelease.travisci=true -Prelease.useLastTag=true assemble + $GRADLE -Prelease.travisci=true assemble else echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' $GRADLE assemble diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 91ca28c8b..5c2d1cf01 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 fb9d6b995..5f1b1201a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Wed Oct 24 15:31:17 EDT 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip diff --git a/gradlew b/gradlew index cccdd3d51..b0d6d0ab5 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 e95643d6a..15e1ee37a 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