Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
Add copy task for build outputs (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuejing committed Mar 1, 2018
1 parent 3e4e415 commit 430cdcf
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
22 changes: 21 additions & 1 deletion build.gradle
Expand Up @@ -11,7 +11,6 @@ description "Blox: Open Source schedulers for Amazon ECS"

allprojects {
apply plugin: 'com.diffplug.gradle.spotless'

group 'com.amazonaws.blox'
version '0.1-SNAPSHOT'

Expand Down Expand Up @@ -228,3 +227,24 @@ task updateClient(type: Copy, dependsOn: downloadClient) {
file("${tmpDir}/generated-code").renameTo(file("frontend-service-client"))
}
}
task release

def projectsToRelease = ["frontend-service", "data-service", "scheduling-manager"].collect { project(it) }
configure(projectsToRelease) {
task release(dependsOn: assemble) {
group "build"
description "Build the project and copy the outputs required for the pipeline"
doLast {
copy {
from tasks.getByPath("packageLambda")
from tasks.getByPath("postprocessCloudformationTemplate")

into rootProject.file("build/blox-release/${project.name}")
}
}
}

rootProject.release.dependsOn(release)
}


Expand Up @@ -44,6 +44,7 @@ class DeploymentPlugin implements Plugin<Project> {
lambdaFunction it.name, project.files(it.zipFile)
}
}
project.assemble.dependsOn(postProcessTask)


def packageTask = project.task("packageCloudformationResources", type: Exec) {
Expand Down
2 changes: 2 additions & 0 deletions data-service/build.gradle
Expand Up @@ -81,6 +81,8 @@ task packageLambda(type: Zip, dependsOn: classes) {
}
}

assemble.dependsOn(packageLambda)

deployment {
aws {
profile stack.profile.toString()
Expand Down
1 change: 1 addition & 0 deletions frontend-service/build.gradle
Expand Up @@ -88,6 +88,7 @@ task packageLambda(type: Zip, dependsOn: classes) {
from configurations.runtime
}
}
assemble.dependsOn(packageLambda)

deployment {
aws {
Expand Down
1 change: 1 addition & 0 deletions scheduling-manager/build.gradle
Expand Up @@ -61,6 +61,7 @@ task packageLambda(type: Zip) {
from configurations.runtime
}
}
assemble.dependsOn(packageLambda)

deployment {
aws {
Expand Down

0 comments on commit 430cdcf

Please sign in to comment.