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

Add copy task for build outputs #380

Merged
merged 1 commit into from
Mar 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
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)
}


Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ task packageLambda(type: Zip) {
from configurations.runtime
}
}
assemble.dependsOn(packageLambda)

deployment {
aws {
Expand Down