Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #115 from Nike-Inc/highlander
Browse files Browse the repository at this point in the history
Merging the Highlander branch with the major infrastructure overhaul.
  • Loading branch information
fieldju authored Jan 23, 2018
2 parents d47d1f9 + 69b78ac commit d84a934
Show file tree
Hide file tree
Showing 266 changed files with 11,161 additions and 14,803 deletions.
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ gradle-app.setting

# Python cache
**/__pycache__/

# Ignore generated CF templates
src/main/resources/cloudformation/**
!src/main/resources/cloudformation/.gitkeep
/smaas-cf/.idea/
/certs/
build/certs/
*.pem
*.key
*.crt
*.csr
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ language: java
dist: trusty
jdk:
- oraclejdk8
before_install:
- sudo apt-get -y install python3-pip python-dev
- python3 -V
- pip3 -V
deploy:
skip_cleanup: true
provider: releases
Expand Down
57 changes: 1 addition & 56 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ apply from: file('gradle/integration.gradle')

mainClassName = 'com.nike.cerberus.cli.CerberusRunner'

task wrapper (type: Wrapper) {
task wrapper(type: Wrapper) {
gradleVersion = '3.4'
}

Expand All @@ -35,32 +35,6 @@ task wrapper (type: Wrapper) {
* limitations under the License.
*/

/**
* Executes the python code that uses Troposphere to generate the cloud formation needed to
*/
task createCloudFormation() {
try {
def requirementsPath = "${getProject().getRootDir()}${File.separator}smaas-cf${File.separator}requirements.txt"
executeOnShell "pip3 install -r ${requirementsPath}"

[
'consul-cluster.py',
'vault-cluster.py',
'vpc-and-base.py',
'gateway-cluster.py',
'cms-cluster.py',
'cloudfront-elb-security-group-updater-lambda.py'
].each { String script ->
executeOnShell " PYTHONPATH=${getProject().getRootDir()}${File.separator}smaas-cf python3 ${script}", new File("${getProject().getRootDir()}${File.separator}smaas-cf${File.separator}smaas${File.separator}"), true
}
} catch (Throwable t) {
logger.lifecycle t.getMessage()
}
}

tasks.shadowJar.dependsOn createCloudFormation
tasks.assemble.dependsOn createCloudFormation

shadowJar {
def releaseVersion = version
doFirst {
Expand All @@ -72,32 +46,3 @@ shadowJar {
}

tasks.assemble.finalizedBy shadowJar

/**
* Runs a command on the command line, streaming the output to STDOUT
*/
def executeOnShell(String command, File workingDir = new File("./"), boolean print = false) {
logger.debug "Executing command: ${command}"
def commandArray = new String[3]
commandArray[0] = "sh"
commandArray[1] = "-c"
commandArray[2] = command
def process = new ProcessBuilder(commandArray)
.directory(workingDir)
.redirectErrorStream(true)
.start()
def stdout = []
process.inputStream.eachLine { line ->
stdout.add line
if (print) {
logger.lifecycle line
}
}
process.waitFor();
if (process.exitValue()) {
def msg = "Failed to execute command exiting"
logger.lifecycle msg
throw new GradleException(msg)
}
return stdout
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

group=com.nike
artifactId=cerberus-lifecycle-cli
version=3.3.1
version=4.0.0
4 changes: 2 additions & 2 deletions gradle/check.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ apply plugin: 'com.github.kt3k.coveralls'
findbugs {
ignoreFailures = false
excludeFilter = rootProject.file('codequality/findbugs-suppressions.xml')
sourceSets = [ project.sourceSets.main ]
sourceSets = [project.sourceSets.main]
}

pmd {
sourceSets = [ project.sourceSets.main ]
sourceSets = [project.sourceSets.main]
}

tasks.withType(FindBugs) {
Expand Down
40 changes: 36 additions & 4 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ allprojects {
jcenter()
}

def awsSDKVersion = '1.11.155'
def awsSDKVersion = '1.11.229'

//noinspection GroovyAssignabilityCheck
dependencies {
Expand All @@ -33,21 +33,33 @@ allprojects {
compile group: 'com.amazonaws', name: 'aws-java-sdk-sts', version: awsSDKVersion
compile group: 'com.amazonaws', name: 'aws-java-sdk-sns', version: awsSDKVersion
compile group: 'com.amazonaws', name: 'aws-java-sdk-lambda', version: awsSDKVersion
compile group: 'com.amazonaws', name: 'aws-java-sdk-route53', version: awsSDKVersion
compile group: 'com.amazonaws', name: 'aws-java-sdk-elasticloadbalancingv2', version: awsSDKVersion
compile group: 'com.amazonaws', name: 'aws-java-sdk-rds', version: awsSDKVersion

// https://mvnrepository.com/artifact/com.amazonaws/aws-encryption-sdk-java
compile group: 'com.amazonaws', name: 'aws-encryption-sdk-java', version: '1.3.1'

compile 'com.nike:vault-client:1.4.1'
compile 'com.squareup.okhttp3:okhttp:3.3.1'
compile 'com.beust:jcommander:1.55'
compile 'com.beust:jcommander:1.55' // newer version up to at least 1.71 have broken variableArity, which breaks create cms cmk command

compile 'com.fasterxml.jackson.core:jackson-core:2.7.+'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.+'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.+'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.7+'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.5'
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-joda', version: '2.4.3'
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: '2.9.2'


compile 'org.slf4j:slf4j-api:1.7.+'
compile 'ch.qos.logback:logback-classic:1.1.+'
compile 'commons-cli:commons-cli:1.3.1'
compile 'com.google.inject:guice:4.0'
compile 'com.google.inject:guice:4.1.0'
compile group: 'com.google.inject.extensions', name: 'guice-multibindings', version: '4.1.0'
compile group: 'com.google.guava', name: 'guava', version: '23.5-jre'

compile 'com.google.code.findbugs:jsr305:3.0.+'
compile 'com.github.tomas-langer:chalk:1.0.2'
compile 'commons-net:commons-net:3.4'
Expand All @@ -57,9 +69,29 @@ allprojects {
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.6'
compile group: 'com.google.code.findbugs', name: 'annotations', version: '3.0.0'

// Cert Generation
compile group: 'dnsjava', name: 'dnsjava', version: '2.1.8'
compile group: 'org.shredzone.acme4j', name: 'acme4j-client', version: '0.13'
compile group: 'org.shredzone.acme4j', name: 'acme4j-utils', version: '0.13'

testCompile "junit:junit:4.12"
testCompile ("org.mockito:mockito-core:1.10.19") {
testCompile("org.mockito:mockito-core:1.10.19") {
exclude group: 'org.hamcrest'
}
testCompile 'com.fieldju:commons:1.2.0'
testCompile group: 'io.netty', name: 'netty-handler', version: '4.1.16.Final'

}

configurations.all {
// check for updates every build
resolutionStrategy {
cacheChangingModulesFor 0, 'seconds'

// aws-encryption-sdk-java brings in a slightly older version with some constants missing
def bouncyVersion = 1.58
force "org.bouncycastle:bcpkix-jdk15on:$bouncyVersion", "org.bouncycastle:bcprov-ext-jdk15on:$bouncyVersion"
}
}

}
6 changes: 6 additions & 0 deletions gradle/integration.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@ configurations {
task integrationTest(type: Test) {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
}

integrationTest {
testLogging {
showStandardStreams = true
}
}
2 changes: 0 additions & 2 deletions smaas-cf/requirements.txt

This file was deleted.

1 change: 0 additions & 1 deletion smaas-cf/smaas/__init__.py

This file was deleted.

148 changes: 0 additions & 148 deletions smaas-cf/smaas/cloudfront-elb-security-group-updater-lambda.py

This file was deleted.

Loading

0 comments on commit d84a934

Please sign in to comment.