Skip to content
Closed
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
25 changes: 14 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ version: 2.1
executors:
gradle_docker:
docker:
- image: cimg/openjdk:11.0
# This image isn't used to build Java project, rather to invoke Docker with Gradle.
# The version of Docker on cimg/openjdk tends to be slightly behind cimg/base.
- image: cimg/openjdk:14.0.2

commands:
gradle:
Expand All @@ -18,29 +20,30 @@ commands:
steps:
- run:
name: << parameters.args >>
command: ./gradlew << parameters.args >> --info --max-workers=2 -Dorg.gradle.jvmargs=-Xmx2g -Dorg.gradle.console=plain --continue
command: ./gradlew << parameters.args >> --info --max-workers=2 -Dorg.gradle.jvmargs=-Xmx2g -Dorg.gradle.console=plain
when: << parameters.when >>
setup_build_environment:
description: 'Checkout, restore the cache, and setup docker'
steps:
- checkout
- run:
name: Generate cache key
command: find . -type f -name "*.gradle*" -o -name "gradle-wrapper*" -exec shasum {} + | sort > /tmp/checksum.txt && cat /tmp/checksum.txt
- restore_cache:
keys:
- v1-dependencies-{{ checksum "/tmp/checksum.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- setup_remote_docker
keys: # Use gradle version for cache, so it doesn't download every time
- v1-dependencies-{{ checksum "./gradle/wrapper/gradle-wrapper.properties" }}
# The remote docker version is independent from what's installed in the gradle_docker image and defaults to Docker 17.
# Use the latest value from https://circleci.com/docs/2.0/building-docker-images/#docker-version
- setup_remote_docker:
version: 19.03.12
save_populated_cache:
description: "Save the gradle binary to the cache so it doesn't have to redownload"
steps:
- save_cache:
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "/tmp/checksum.txt" }}
key: v1-dependencies-{{ checksum "./gradle/wrapper/gradle-wrapper.properties" }}

# NOTE: Tags are based on JAVA_VERSION build args and different for each major Java version.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above this note is same as all our other images, except no helm

# This means unlike other repositories, there is no "trigger tag" used here. New images will
# push on any change to 'main', even a README update.
jobs:
build:
executor: gradle_docker
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id("org.hypertrace.docker-publish-plugin") version "0.3.3" apply false
id("org.hypertrace.docker-publish-plugin") version "0.7.1" apply false
}