Skip to content

Commit

Permalink
chore(build): build docker image via gradle
Browse files Browse the repository at this point in the history
To reduce friction on developers wanting to build the plugin, this PR adds docker plugin to gradle and define it as a dependency for e2e tests.
  • Loading branch information
jeqo committed Mar 14, 2024
1 parent c848484 commit af6c74d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/main_push_and_pull_request_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ jobs:
with:
fetch-depth: 0

- name: Build Docker image
run: make docker_image

- name: Run E2E tests
timeout-minutes: 30
env:
JAVA_OPTS: -Xmx1G
run: make E2E_TEST=${{ matrix.test }} e2e_test

# TODO: publish docker image
20 changes: 20 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ plugins {
id 'info.solidsoft.pitest' version '1.15.0' apply false
id "java-library"
id "distribution"
id "com.palantir.docker" version "0.36.0"
}

apply plugin: 'info.solidsoft.pitest.aggregator'
Expand Down Expand Up @@ -285,6 +286,25 @@ tasks.register('validateDependencies') {
}
}

dockerPrepare.dependsOn(
tasks.distTar,
project("core").tasks.distTar,
project("storage:s3").tasks.distTar,
project("storage:gcs").tasks.distTar,
project("storage:azure").tasks.distTar,
)

docker {
name 'aivenoy/kafka-with-ts-plugin'
dockerfile file('docker/Dockerfile')
copySpec.from(".").into(".")
buildArgs([_VERSION: project.version.toString()])
}

project("e2e").tasks.named("test") {
dependsOn(rootProject.tasks.named("docker"))
}

// TODO fix GCP dependency issues
//tasks.named("check") {
// dependsOn(tasks.named("validateDependencies"))
Expand Down

0 comments on commit af6c74d

Please sign in to comment.