Skip to content

Commit

Permalink
chore(boot2): Upgrading front50 to Spring Boot 2 (#526)
Browse files Browse the repository at this point in the history
* chore(boot2): update deps, annotations, remove graphql
* chore(boot2): remove commented out deps
* chore(boot2): BOM
* chore(*): Apply codestyles
  • Loading branch information
robzienert authored May 17, 2019
1 parent 0540599 commit c88c7e3
Show file tree
Hide file tree
Showing 101 changed files with 2,348 additions and 2,485 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ You can view the list of all providers in `gradle.properties`.

### Working Locally

The tests are setup to only run if needed services are available.
The tests are setup to only run if needed services are available.

#### S3
S3 TCK only run if there is a s3 proxy available at 127.0.0.1:9999
Expand All @@ -43,9 +43,6 @@ docker run -d -p9999:80 \
--env JCLOUDS_IDENTITY="remote-identity" \
--env JCLOUDS_CREDENTIAL="remote-credential" \
andrewgaul/s3proxy
```
```

When running the S3 TCK via an IDE make sure to have env `AWS_ACCESS_KEY_ID` and `AWS_SECRET_KEY` set to `null` otherwise the tests will timeout, the gradle test task is already configured this way.



87 changes: 31 additions & 56 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,91 +15,66 @@
*/

buildscript {
ext {
korkVersion = "5.3.1"
fiatVersion = "1.0.4"
clouddriverVersion = "5.3.0"
}
repositories {
jcenter()
maven { url "https://dl.bintray.com/spinnaker/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.3.0"
if (Boolean.valueOf(enablePublishing)) {
classpath "com.netflix.spinnaker.gradle:spinnaker-gradle-project:6.3.0"
}
}
}

allprojects { project ->
apply plugin: 'spinnaker.base-project'
if (Boolean.valueOf(enablePublishing)) {
apply plugin: "spinnaker.project"
}
apply plugin: 'java-library'
apply plugin: 'groovy'

group = "com.netflix.spinnaker.front50"

ext {
spinnakerDependenciesVersion = '1.44.1'
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: 'org.mortbay.jetty', module: 'servlet-api'
exclude group: 'javax.servlet', module: 'servlet-api'

resolutionStrategy {
force 'com.google.guava:guava:15.0'
eachDependency {
if (it.requested.group == "asm" || it.requested.group == "org.ow2.asm") {
it.useTarget group: "org.ow2.asm", name: "asm-all", version: "5.0.4"
}
if (it.requested.group == "cglib" || it.requested.name == "cglib") {
it.useTarget group: "cglib", name: "cglib", version: "3.1"
}
if (it.requested.group == "org.apache.xbean") {
it.useVersion "4.4"
}
}
}
}

tasks.withType(JavaExec) {
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8180'
}
}

dependencies {
compile spinnaker.dependency("groovy")
spinnaker.group("test")
}
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")

implementation "org.codehaus.groovy:groovy-all"
implementation "net.logstash.logback:logstash-logback-encoder"

compileOnly "org.projectlombok:lombok"
annotationProcessor "org.projectlombok:lombok"
testAnnotationProcessor "org.projectlombok:lombok"

//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
testImplementation "org.spockframework:spock-core"
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"
}
}

Expand Down
18 changes: 11 additions & 7 deletions front50-azure/front50-azure.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ repositories {
}

dependencies {
compile project(":front50-core")
compile 'com.microsoft.azure:azure:1.0.0-beta3'
compile 'com.microsoft.azure:azure-storage:4.4.0'
compile 'com.microsoft.azure:azure-mgmt-storage:1.0.0-beta3'
implementation project(":front50-core")
implementation 'com.microsoft.azure:azure:1.0.0-beta3'
implementation 'com.microsoft.azure:azure-storage:4.4.0'
implementation 'com.microsoft.azure:azure-mgmt-storage:1.0.0-beta3'

compile spinnaker.dependency("korkSecurity")
testCompile project(":front50-test")
}
implementation "org.springframework.boot:spring-boot-starter-web"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "com.netflix.spinnaker.kork:kork-security"
implementation "com.netflix.spinnaker.kork:kork-hystrix"

testImplementation project(":front50-test")
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public RestTemplate restTemplate() {

@Bean
public AzureStorageService azureStorageService(AzureStorageProperties azureStorageProperties) {
return new AzureStorageService(azureStorageProperties.getStorageConnectionString(), azureStorageProperties.getStorageContainerName());
return new AzureStorageService(
azureStorageProperties.getStorageConnectionString(),
azureStorageProperties.getStorageContainerName());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,34 @@ public class AzureStorageProperties {

public String getStorageConnectionString() {
return "DefaultEndpointsProtocol=https;"
+ "AccountName=" + this.storageAccountName + ";"
+ "AccountKey=" + this.storageAccountKey;
+ "AccountName="
+ this.storageAccountName
+ ";"
+ "AccountKey="
+ this.storageAccountKey;
}

public String getStorageAccountKey() { return this.storageAccountKey; }
public void setStorageAccountKey(String storageAccountKey) { this.storageAccountKey = storageAccountKey; }
public String getStorageAccountKey() {
return this.storageAccountKey;
}

public String getStorageAccountName() { return this.storageAccountName; }
public void setStorageAccountName(String storageAccountName) { this.storageAccountName = storageAccountName; }
public void setStorageAccountKey(String storageAccountKey) {
this.storageAccountKey = storageAccountKey;
}

public String getStorageContainerName() { return this.storageContainerName; }
public void setStorageContainerName(String storageContainerName) { this.storageContainerName = storageContainerName; }
public String getStorageAccountName() {
return this.storageAccountName;
}

public void setStorageAccountName(String storageAccountName) {
this.storageAccountName = storageAccountName;
}

public String getStorageContainerName() {
return this.storageContainerName;
}

public void setStorageContainerName(String storageContainerName) {
this.storageContainerName = storageContainerName;
}
}
Loading

0 comments on commit c88c7e3

Please sign in to comment.