Skip to content

Commit

Permalink
chroe: add earthly
Browse files Browse the repository at this point in the history
  • Loading branch information
pipinet committed Jul 24, 2024
1 parent 9b2dd70 commit 508773b
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 39 deletions.
12 changes: 12 additions & 0 deletions .earthlyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.idea
.gradle
.gocd
.jenkins
**/build
**/target
*.hprof
README.md
.editorconfig
.gitattributes
.gitmodules
.sdkmanrc
2 changes: 1 addition & 1 deletion .sdkmanrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=17.0.12-graal
gradle=8.9
gradle=8.8
11 changes: 5 additions & 6 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8
ARG --global BASE_IMAGE=earthly/dind:alpine
ARG --global GRADLE_IMAGE=bitnami/gradle:8.9.0
ARG --global BUILD_IMAGE=bitnami/gradle:8.7.0

FROM ${BASE_IMAGE}
WORKDIR /app
Expand All @@ -10,16 +10,15 @@ ARG --global APP_BASE_VERSION=$(cat .version)
ARG --global APP_VERSION=${APP_BASE_VERSION}.${PIPELINE_ID}

build-base:
FROM ${GRADLE_IMAGE}
FROM ${BUILD_IMAGE}
WORKDIR /app
CACHE --sharing shared /home/gradle/.gradle
CACHE --sharing shared /root/.m2
COPY . .
RUN ./gradlew clean

check:
FROM +build-base
RUN ./gradlew clean test
# RUN ./gradlew :basic-tree:test --no-parallel --no-daemon
RUN ./gradlew prepush --no-parallel --no-daemon

Check failure on line 21 in Earthfile

View workflow job for this annotation

GitHub Actions / commit-workflow

Error

The command RUN ./gradlew prepush --no-parallel --no-daemon did not complete successfully. Exit code 1

publish:
FROM +build-base
Expand All @@ -28,7 +27,7 @@ publish:
RUN --secret GPG_PASSPHRASE export ORG_GRADLE_PROJECT_signingPassword="$GPG_PASSPHRASE"
RUN --secret OSSRH_TOKEN_USERNAME export OSSRH_TOKEN_USERNAME="$OSSRH_TOKEN_USERNAME"
RUN --secret OSSRH_TOKEN_PASSWORD export OSSRH_TOKEN_PASSWORD="$OSSRH_TOKEN_PASSWORD"
RUN ./gradlew clean publish
RUN ./gradlew publish --no-parallel --no-daemon

ci-check:
BUILD +check
Expand Down
2 changes: 1 addition & 1 deletion basic-tree/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apply from: "${rootProject.rootDir}/gradle/jmh.gradle"
//apply from: "${rootProject.rootDir}/gradle/jmh.gradle"

dependencies {
api project(":lang")
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ subprojects {
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
testImplementation("org.mockito:mockito-junit-jupiter:${mockitoVersion}")
testImplementation("org.hamcrest:hamcrest-all:${hamcrestVersion}")
testImplementation("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testImplementation("org.openjdk.jmh:jmh-core:${jmhVersion}")
testImplementation("org.openjdk.jmh:jmh-generator-annprocess:${jmhVersion}")
}
Expand Down
40 changes: 20 additions & 20 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,42 @@ group=com.qwlabs.doraemon
signing.gnupg.executable=gpg
signing.gnupg.useLegacyGpg=false

checkstyleToolVersion=10.12.6
checkstyleToolVersion=10.17.0

jandexPluginId=org.kordamp.gradle.jandex
jandexPluginVersion=2.0.0
grgitPluginId=org.ajoberstar.grgit
grgitPluginVersion=5.0.0-rc.3
lombokPluginId=io.freefair.lombok
lombokPluginVersion=8.4
lombokPluginVersion=8.6
nexusPublishPluginId=io.github.gradle-nexus.publish-plugin
nexusPublishPluginVersion=2.0.0-rc-1
nexusPublishPluginVersion=2.0.0
jmhPluginId=me.champeau.jmh
jmhPluginVersion=0.7.2

quarkusVersion=3.11.0
quarkusVersion=3.12.3
junitVersion=5.10.1
jmhVersion=1.37
guavaVersion=32.1.3-jre
slf4jVersion=2.0.9
guavaVersion=33.2.1-jre
slf4jVersion=2.1.0-alpha1
jandexVersion=3.2.0
hibernateVersion=6.5.2.Final
hamcrestVersion=1.3
mockitoVersion=5.8.0
jacksonVersion=2.16.0
graphqlJavaVersion=21.3
istackCommonsRuntimeVersion=4.1.2
lombokVersion=1.18.30
jakartaCdiApiVersion=4.1.0.Alpha1
jakartaValidationApiVersion=3.1.0-M1
jakartaPersistenceApiVersion=3.2.0-M1
jakartaAnnotationApiVersion=3.0.0-M1
jbossLoggingProcessorVersion=2.2.1.Final
jbossLoggingVersion=3.5.3.Final
jbossLoggingAnnotationsVersion=2.2.1.Final
hamcrestVersion=2.2
mockitoVersion=5.12.0
jacksonVersion=2.17.2
graphqlJavaVersion=22.1
istackCommonsRuntimeVersion=4.2.0
lombokVersion=1.18.34
jakartaCdiApiVersion=4.1.0
jakartaValidationApiVersion=3.1.0
jakartaPersistenceApiVersion=3.2.0
jakartaAnnotationApiVersion=3.0.0
jbossLoggingProcessorVersion=3.0.1.Final
jbossLoggingVersion=3.6.0.Final
jbossLoggingAnnotationsVersion=3.0.1.Final
antlr4Version=4.13.1
hibernateValidatorVersion=8.0.1.Final
testcontainersVersion=1.19.3
testcontainersVersion=1.20.0
minioVersion=8.5.7
s3Version=2.21.43
shrinkwrapVersion=2.0.0-beta-1
Expand Down
9 changes: 8 additions & 1 deletion gradle/jmh.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jmh {
batchSize = 8
forceGC = true
fork = 1
jmhVersion = '1.37'
jmhVersion = "${jmhVersion}"
resultFormat = 'JSON'
synchronizeIterations = true
// humanOutputFile = project.file("${project.buildDir}/reports/jmh/human.txt")
Expand All @@ -28,3 +28,10 @@ checkstyleJmh {
configFile = file("${rootProject.projectDir}/gradle/config/checkstyle/checkstyle-test.xml")
}


dependencies {
jmh "commons-io:commons-io:2.7"
jmh "org.openjdk.jmh:jmh-core:${jmhVersion}"
jmh "org.openjdk.jmh:jmh-generator-annprocess:${jmhVersion}"
jmh "org.openjdk.jmh:jmh-generator-bytecode:${jmhVersion}"
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 2 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -57,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -86,8 +84,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 0 additions & 2 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
2 changes: 1 addition & 1 deletion lang/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apply from: "${rootProject.rootDir}/gradle/jmh.gradle"
//apply from: "${rootProject.rootDir}/gradle/jmh.gradle"

dependencies {
api "com.google.guava:guava:${guavaVersion}"
Expand Down

0 comments on commit 508773b

Please sign in to comment.