-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spoon: updated to jdk21 and added jenkins test
- Loading branch information
1 parent
b6c4134
commit 9c43d81
Showing
7 changed files
with
118 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,85 @@ | ||
FROM ghcr.io/graalvm/native-image-community:17-muslib AS build | ||
CMD ["/bin/bash"] | ||
ENTRYPOINT ["/bin/bash", "-c"] | ||
FROM ubuntu:24.04 AS test-donor | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
git \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
WORKDIR /tests | ||
|
||
ENV JENKINS_REVISION jenkins-2.464 | ||
RUN git clone https://github.com/jenkinsci/jenkins \ | ||
&& git -C jenkins checkout ${JENKINS_REVISION} | ||
|
||
ENV SPRING_BOOT_REVISION v3.3.1 | ||
RUN git clone https://github.com/spring-projects/spring-boot \ | ||
&& git -C spring-boot checkout ${SPRING_BOOT_REVISION} | ||
|
||
ENV ELASTIC_SEARCH_REVISION v8.14.1 | ||
RUN git clone https://github.com/elastic/elasticsearch \ | ||
&& git -C elasticsearch checkout ${ELASTIC_SEARCH_REVISION} | ||
|
||
ENV GUAVA_REVISION v33.2.1 | ||
RUN git clone https://github.com/google/guava \ | ||
&& git -C guava checkout ${GUAVA_REVISION} | ||
|
||
ENV DUBBO_REVISION dubbo-3.2.14 | ||
RUN git clone https://github.com/apache/dubbo \ | ||
&& git -C dubbo checkout ${DUBBO_REVISION} | ||
|
||
|
||
# FROM ghcr.io/graalvm/native-image-community:21-muslib AS jar-builder | ||
FROM openjdk:21-slim AS jar-builder | ||
COPY . /tmp/kaskara-spoon | ||
ENV KASKARA_SPOON_VERSION 0.1.0 | ||
RUN cd /tmp/kaskara-spoon \ | ||
&& mkdir -p /opt/kaskara-spoon/bin \ | ||
&& ./gradlew build \ | ||
&& cd ./build/libs \ | ||
&& mv /tmp/kaskara-spoon/build/libs/kaskara-spoon-${KASKARA_SPOON_VERSION}-all.jar /tmp/kaskara-spoon/build/libs/kaskara-spoon.jar | ||
|
||
|
||
FROM ghcr.io/graalvm/native-image-community:21-muslib AS native-image-builder | ||
CMD ["/bin/bash"] | ||
ENTRYPOINT ["/bin/bash", "-c"] | ||
COPY --from=test-donor /tests /tests | ||
COPY --from=jar-builder /tmp/kaskara-spoon/build/libs /tmp/kaskara-spoon/build/libs | ||
|
||
RUN cd /tmp/kaskara-spoon/build/libs \ | ||
&& mkdir -p META-INF/native-image \ | ||
&& echo "test: kaskara-spoon (src/main/java)" \ | ||
&& java \ | ||
-agentlib:native-image-agent=config-output-dir=META-INF/native-image \ | ||
-jar ./kaskara-spoon-0.1.0-all.jar \ | ||
-jar ./kaskara-spoon.jar \ | ||
/tmp/kaskara-spoon/src/main/java \ | ||
&& echo "test: jenkins (core/src/main/java)" \ | ||
&& java \ | ||
-agentlib:native-image-agent=config-merge-dir=META-INF/native-image \ | ||
-jar ./kaskara-spoon.jar \ | ||
/tests/jenkins/core/src/main/java \ | ||
&& echo "skipping test: guava (guava)" \ | ||
&& echo "skipping test: spring-boot (spring-boot-project/spring-boot/src/main/java)" \ | ||
&& echo "skipping test: elasticsearch" | ||
|
||
# && echo "test: guava (guava)" \ | ||
# && java \ | ||
# -agentlib:native-image-agent=config-merge-dir=META-INF/native-image \ | ||
# -jar ./kaskara-spoon.jar \ | ||
# /tests/guava/guava \ | ||
|
||
# --no-fallback | ||
RUN cd /tmp/kaskara-spoon/build/libs \ | ||
&& mkdir -p /opt/kaskara-spoon/bin \ | ||
&& native-image \ | ||
-classpath . \ | ||
--verbose \ | ||
--no-fallback \ | ||
--verbose \ | ||
--static \ | ||
--libc=musl \ | ||
-jar ./kaskara-spoon-${KASKARA_SPOON_VERSION}-all.jar \ | ||
-H:+ReportExceptionStackTraces \ | ||
-jar ./kaskara-spoon.jar \ | ||
-o /opt/kaskara-spoon/bin/kaskara-spoon \ | ||
&& /opt/kaskara-spoon/bin/kaskara-spoon --help \ | ||
&& /opt/kaskara-spoon/bin/kaskara-spoon /tmp/kaskara-spoon/src/main/java | ||
|
||
FROM ghcr.io/graalvm/native-image-community:17-muslib AS run | ||
COPY --from=build /opt/kaskara-spoon /opt/kaskara-spoon | ||
|
||
FROM ubuntu:24.04 AS package | ||
COPY --from=native-image-builder /opt/kaskara-spoon /opt/kaskara-spoon | ||
RUN /opt/kaskara-spoon/bin/kaskara-spoon --help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Binary file not shown.
4 changes: 3 additions & 1 deletion
4
src/kaskara/spoon/backend/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters