Skip to content

Commit

Permalink
Ensure that prepareCompose does not depend on all of the base registr…
Browse files Browse the repository at this point in the history
…y tasks. (#2047)

Related to #1596
  • Loading branch information
devinrsmith authored Feb 28, 2022
1 parent 0e46b48 commit 87ef91a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
uses: burrunan/gradle-cache-action@v1
with:
job-id: build-server
arguments: --scan outputVersion createCraneTagScript docker-server-slim:prepareDocker docker-server:prepareDocker
arguments: --scan outputVersion createCraneTagScript docker-server-slim:prepareDocker docker-server:prepareDockerAll
gradle-version: wrapper

- name: Get Deephaven Version
Expand Down
16 changes: 9 additions & 7 deletions docker/server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ def dockerLicenses = License.createFrom(project).syncDockerLicense().get()
def context= project.layout.buildDirectory.dir('context')

def prepareDocker = project.tasks.register('prepareDocker', Sync) {
// TODO(deephaven-core#1596): Remove extra dependencies for build-ci.yml
// Currently, GH build-ci.yml calls dockerCreateDockerfile, and relies on buildx; so we need to
// make sure that dockerCreateDockerfile has the proper dependencies.
// If we change how our build works in the future (so that gradle is responsible for pushing the
// image), we can remove this extra dependency.
dependsOn baseMap.keySet().collect { base -> Docker.registryTask(project, base) }

// deephaven-jpy.whl
def deephavenJpyWheel = project(':deephaven-jpy').tasks.getByName('buildWheel')

Expand Down Expand Up @@ -86,6 +79,15 @@ def prepareDocker = project.tasks.register('prepareDocker', Sync) {
into context
}

// TODO(deephaven-core#1596): Remove extra dependencies for build-ci.yml
// Currently, GH build-ci.yml calls prepareDockerAll, and relies on buildx; so we need to
// make sure that dockerCreateDockerfile has the proper dependencies.
// If we change how our build works in the future (so that gradle is responsible for pushing the
// image), we can remove this extra dependency.
project.tasks.register('prepareDockerAll') {
dependsOn prepareDocker, baseMap.keySet().collect { base -> Docker.registryTask(project, base) }
}

def buildDockerClosure = { String base, String server ->
Docker.registerDockerTwoPhaseImage(project, server, 'install') {
dependsOn prepareDocker
Expand Down

0 comments on commit 87ef91a

Please sign in to comment.