Add metabom jars to all built docker images
This commit is contained in:
parent
eef4690ba4
commit
3602b89512
10 changed files with 22 additions and 7 deletions
|
|
@ -55,7 +55,6 @@ jobs:
|
||||||
VERSION=$(cat resources/BABASHKA_VERSION)
|
VERSION=$(cat resources/BABASHKA_VERSION)
|
||||||
jar=target/babashka-$VERSION-standalone.jar
|
jar=target/babashka-$VERSION-standalone.jar
|
||||||
cp $jar /tmp/release
|
cp $jar /tmp/release
|
||||||
|
|
||||||
java -jar $jar script/reflection.clj
|
java -jar $jar script/reflection.clj
|
||||||
reflection="babashka-$VERSION-reflection.json"
|
reflection="babashka-$VERSION-reflection.json"
|
||||||
java -jar "$jar" --config .build/bb.edn --deps-root . release-artifact "$jar"
|
java -jar "$jar" --config .build/bb.edn --deps-root . release-artifact "$jar"
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ if [ -z "$CIRCLE_PULL_REQUEST" ] && [ "$CIRCLE_BRANCH" = "master" ]; then
|
||||||
if [[ $tarball_platform == "linux-arm64" ]]; then tarball_platform="linux-aarch64"; fi
|
if [[ $tarball_platform == "linux-arm64" ]]; then tarball_platform="linux-aarch64"; fi
|
||||||
mkdir -p $p
|
mkdir -p $p
|
||||||
tar zxvf "/tmp/release/babashka-${image_tag}-${tarball_platform}.tar.gz" -C $p
|
tar zxvf "/tmp/release/babashka-${image_tag}-${tarball_platform}.tar.gz" -C $p
|
||||||
|
# this overwrites, but this is to work around having built the uberjar/metabom multiple times
|
||||||
|
cp "/tmp/release/${tarball_platform}-metabom.jar" ./metabom.jar
|
||||||
done
|
done
|
||||||
docker buildx build -t "$image_name:$image_tag" --platform "$platform" "${label_args[@]}" --push -f Dockerfile.ci .
|
docker buildx build -t "$image_name:$image_tag" --platform "$platform" "${label_args[@]}" --push -f Dockerfile.ci .
|
||||||
if [[ $snapshot == "false" ]]; then
|
if [[ $snapshot == "false" ]]; then
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ cp bb /tmp/release
|
||||||
|
|
||||||
VERSION=$(cat resources/BABASHKA_VERSION)
|
VERSION=$(cat resources/BABASHKA_VERSION)
|
||||||
|
|
||||||
cd /tmp/release
|
|
||||||
mkdir -p /tmp/bb_size
|
|
||||||
./bb '(spit "/tmp/bb_size/size" (.length (io/file "bb")))'
|
|
||||||
|
|
||||||
## release binary as tar.gz archive
|
## release binary as tar.gz archive
|
||||||
|
|
||||||
|
|
@ -18,6 +16,13 @@ if [ "$BABASHKA_STATIC" = "true" ]; then
|
||||||
arch="$arch-static"
|
arch="$arch-static"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# because circle won't allow the same file to be saved/restored in the same workspace concurrently
|
||||||
|
cp metabom.jar "/tmp/release/$BABASHKA_PLATFORM-$arch-metabom.jar"
|
||||||
|
|
||||||
|
cd /tmp/release
|
||||||
|
mkdir -p /tmp/bb_size
|
||||||
|
./bb '(spit "/tmp/bb_size/size" (.length (io/file "bb")))'
|
||||||
|
|
||||||
archive="babashka-$VERSION-$BABASHKA_PLATFORM-$arch.tar.gz"
|
archive="babashka-$VERSION-$BABASHKA_PLATFORM-$arch.tar.gz"
|
||||||
|
|
||||||
tar zcvf "$archive" bb # bbk
|
tar zcvf "$archive" bb # bbk
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ For a list of breaking changes, check [here](#breaking-changes).
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- Add metabom jar to docker images [#1133](https://github.com/babashka/babashka/issues/1133)
|
||||||
- Add opencontainers annoations to docker image [#1134](https://github.com/babashka/babashka/issues/1134)
|
- Add opencontainers annoations to docker image [#1134](https://github.com/babashka/babashka/issues/1134)
|
||||||
- Fix Alpine Linux Docker images in CI script [#1140](https://github.com/babashka/babashka/issues/1140)
|
- Fix Alpine Linux Docker images in CI script [#1140](https://github.com/babashka/babashka/issues/1140)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,5 +73,6 @@ RUN ./script/compile
|
||||||
FROM ubuntu:latest
|
FROM ubuntu:latest
|
||||||
RUN apt-get update && apt-get install -y curl \
|
RUN apt-get update && apt-get install -y curl \
|
||||||
&& mkdir -p /usr/local/bin
|
&& mkdir -p /usr/local/bin
|
||||||
|
COPY --from=BASE /opt/target/metabom.jar /opt/babashka-metabom.jar
|
||||||
COPY --from=BASE /opt/bb /usr/local/bin/bb
|
COPY --from=BASE /opt/bb /usr/local/bin/bb
|
||||||
CMD ["bb"]
|
CMD ["bb"]
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ RUN apk --no-cache add curl ca-certificates tar && \
|
||||||
apk add --allow-untrusted /tmp/glibc-2.28-r0.apk
|
apk add --allow-untrusted /tmp/glibc-2.28-r0.apk
|
||||||
RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf
|
RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf
|
||||||
|
|
||||||
|
COPY metabom.jar /opt/babashka-metabom.jar
|
||||||
COPY --from=tester /bin/bb /bin/bb
|
COPY --from=tester /bin/bb /bin/bb
|
||||||
|
|
||||||
CMD ["bb"]
|
CMD ["bb"]
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ RUN apt-get update \
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
ARG TARGETOS
|
ARG TARGETOS
|
||||||
|
|
||||||
|
COPY metabom.jar /opt/babashka-metabom.jar
|
||||||
COPY ${TARGETOS}/${TARGETARCH}/bb /usr/local/bin/bb
|
COPY ${TARGETOS}/${TARGETARCH}/bb /usr/local/bin/bb
|
||||||
|
|
||||||
RUN chmod +x /usr/local/bin/bb
|
RUN chmod +x /usr/local/bin/bb
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
[org.clojure/test.check "1.1.0"]
|
[org.clojure/test.check "1.1.0"]
|
||||||
[com.github.clj-easy/graal-build-time "0.1.0"]
|
[com.github.clj-easy/graal-build-time "0.1.0"]
|
||||||
[rewrite-clj/rewrite-clj "1.0.699-alpha"]]
|
[rewrite-clj/rewrite-clj "1.0.699-alpha"]]
|
||||||
|
:plugins [[org.kipz/lein-meta-bom "0.1.1"]]
|
||||||
|
:metabom {:jar-name "metabom.jar"}
|
||||||
:profiles {:feature/xml {:source-paths ["feature-xml"]
|
:profiles {:feature/xml {:source-paths ["feature-xml"]
|
||||||
:dependencies [[org.clojure/data.xml "0.2.0-alpha6"]]}
|
:dependencies [[org.clojure/data.xml "0.2.0-alpha6"]]}
|
||||||
:feature/yaml {:source-paths ["feature-yaml"]
|
:feature/yaml {:source-paths ["feature-yaml"]
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,13 @@ rm -rf resources/*.class
|
||||||
# "$GRAALVM_HOME/bin/javac" -cp "$SVM_JAR" resources/CutOffMisc.java
|
# "$GRAALVM_HOME/bin/javac" -cp "$SVM_JAR" resources/CutOffMisc.java
|
||||||
if [ -z "$BABASHKA_JAR" ]; then
|
if [ -z "$BABASHKA_JAR" ]; then
|
||||||
lein with-profiles +reflection,+native-image "do" run
|
lein with-profiles +reflection,+native-image "do" run
|
||||||
lein "do" clean, uberjar
|
lein "do" clean, uberjar, metabom
|
||||||
BABASHKA_JAR=${BABASHKA_JAR:-"target/babashka-$BABASHKA_VERSION-standalone.jar"}
|
BABASHKA_JAR=${BABASHKA_JAR:-"target/babashka-$BABASHKA_VERSION-standalone.jar"}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# because script/test cleans target during ci before the jar can we saved
|
||||||
|
cp target/metabom.jar .
|
||||||
|
|
||||||
BABASHKA_BINARY=${BABASHKA_BINARY:-"bb"}
|
BABASHKA_BINARY=${BABASHKA_BINARY:-"bb"}
|
||||||
|
|
||||||
args=("-jar" "$BABASHKA_JAR"
|
args=("-jar" "$BABASHKA_JAR"
|
||||||
|
|
|
||||||
|
|
@ -165,5 +165,5 @@ cp deps.edn resources/META-INF/babashka/deps.edn
|
||||||
|
|
||||||
if [ -z "$BABASHKA_JAR" ]; then
|
if [ -z "$BABASHKA_JAR" ]; then
|
||||||
lein with-profiles "$BABASHKA_LEIN_PROFILES,+reflection,-uberjar" do run
|
lein with-profiles "$BABASHKA_LEIN_PROFILES,+reflection,-uberjar" do run
|
||||||
lein with-profiles "$BABASHKA_LEIN_PROFILES" do clean, uberjar
|
lein with-profiles "$BABASHKA_LEIN_PROFILES" do clean, uberjar, metabom
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue