From c9e4d0b9a0a9ae5b9a9cb04ddbc2df0560521077 Mon Sep 17 00:00:00 2001 From: thelamer Date: Fri, 8 Mar 2019 13:03:28 -0800 Subject: [PATCH] updating build env and using gradle wrapper to fix messed up pipeline release --- Dockerfile | 12 +++++++----- Dockerfile.aarch64 | 32 +++++++++++++++----------------- Dockerfile.armhf | 32 +++++++++++++++----------------- README.md | 1 + readme-vars.yml | 1 + 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9165df7..9011e69 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,12 @@ -FROM gradle:4.10 as buildstage +FROM openjdk:8-alpine as buildstage ARG DAVOS_RELEASE -USER root RUN \ echo "**** Install build requirements ****" && \ - apt-get update && apt-get install -y jq && \ + apk add \ + bash \ + curl \ + jq && \ echo "**** Download Davos ****" && \ if [ -z ${DAVOS_RELEASE+x} ]; then \ DAVOS_RELEASE=$(curl -sX GET https://api.github.com/repos/linuxserver/davos/releases/latest \ @@ -20,7 +22,7 @@ RUN \ /tmp/davos.tar.gz -C \ /app/davos-test/ --strip-components=1 && \ cd /app/davos-test/ && \ - gradle build cucumber && \ + ./gradlew build cucumber && \ echo "**** Build Davos For Release ****" && \ mkdir -p \ /app/davos/ && \ @@ -28,7 +30,7 @@ RUN \ /tmp/davos.tar.gz -C \ /app/davos/ --strip-components=1 && \ cd /app/davos/ && \ - gradle clean build && \ + ./gradlew -Penv=release clean build && \ echo "**** Copy Finished Jar ****" && \ cp build/libs/*.jar /davos.jar && \ chmod 755 /davos.jar diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 895acf3..16b3484 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,16 +1,16 @@ -FROM gradle:4.10 as buildstage +FROM openjdk:8-alpine as buildstage ARG DAVOS_RELEASE -USER root -# Add qemu to build on x86_64 systems -COPY qemu-aarch64-static /usr/bin RUN \ echo "**** Install build requirements ****" && \ - apt-get update && apt-get install -y jq && \ + apk add \ + bash \ + curl \ + jq && \ echo "**** Download Davos ****" && \ if [ -z ${DAVOS_RELEASE+x} ]; then \ - DAVOS_RELEASE=$(curl -sX GET https://api.github.com/repos/linuxserver/davos/releases/latest \ - | jq -r '. | .tag_name'); \ + DAVOS_RELEASE=$(curl -sX GET https://api.github.com/repos/linuxserver/davos/releases/latest \ + | jq -r '. | .tag_name'); \ fi && \ curl -o \ /tmp/davos.tar.gz -L \ @@ -19,10 +19,10 @@ RUN \ mkdir -p \ /app/davos-test/ && \ tar xf \ - /tmp/davos.tar.gz -C \ - /app/davos-test/ --strip-components=1 && \ + /tmp/davos.tar.gz -C \ + /app/davos-test/ --strip-components=1 && \ cd /app/davos-test/ && \ - gradle build cucumber && \ + ./gradlew build cucumber && \ echo "**** Build Davos For Release ****" && \ mkdir -p \ /app/davos/ && \ @@ -30,7 +30,7 @@ RUN \ /tmp/davos.tar.gz -C \ /app/davos/ --strip-components=1 && \ cd /app/davos/ && \ - gradle clean build && \ + ./gradlew -Penv=release clean build && \ echo "**** Copy Finished Jar ****" && \ cp build/libs/*.jar /davos.jar && \ chmod 755 /davos.jar @@ -38,21 +38,19 @@ RUN \ FROM lsiobase/alpine.arm64:3.9 +# Add qemu to build on x86_64 systems +COPY qemu-aarch64-static /usr/bin + # set version label ARG BUILD_DATE ARG VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="JAGFin1,Thelamer" -# Add qemu to build on x86_64 systems -COPY qemu-aarch64-static /usr/bin - # install packages RUN \ apk add --no-cache \ - curl && \ - apk add --no-cache \ - --repository http://nl.alpinelinux.org/alpine/edge/community \ + curl \ openjdk8-jre # copy files from build stage and local files diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 4a63f0e..726bb2d 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,16 +1,16 @@ -FROM gradle:4.10 as buildstage +FROM openjdk:8-alpine as buildstage ARG DAVOS_RELEASE -USER root -# Add qemu to build on x86_64 systems -COPY qemu-arm-static /usr/bin RUN \ echo "**** Install build requirements ****" && \ - apt-get update && apt-get install -y jq && \ + apk add \ + bash \ + curl \ + jq && \ echo "**** Download Davos ****" && \ if [ -z ${DAVOS_RELEASE+x} ]; then \ - DAVOS_RELEASE=$(curl -sX GET https://api.github.com/repos/linuxserver/davos/releases/latest \ - | jq -r '. | .tag_name'); \ + DAVOS_RELEASE=$(curl -sX GET https://api.github.com/repos/linuxserver/davos/releases/latest \ + | jq -r '. | .tag_name'); \ fi && \ curl -o \ /tmp/davos.tar.gz -L \ @@ -19,10 +19,10 @@ RUN \ mkdir -p \ /app/davos-test/ && \ tar xf \ - /tmp/davos.tar.gz -C \ - /app/davos-test/ --strip-components=1 && \ + /tmp/davos.tar.gz -C \ + /app/davos-test/ --strip-components=1 && \ cd /app/davos-test/ && \ - gradle build cucumber && \ + ./gradlew build cucumber && \ echo "**** Build Davos For Release ****" && \ mkdir -p \ /app/davos/ && \ @@ -30,7 +30,7 @@ RUN \ /tmp/davos.tar.gz -C \ /app/davos/ --strip-components=1 && \ cd /app/davos/ && \ - gradle clean build && \ + ./gradlew -Penv=release clean build && \ echo "**** Copy Finished Jar ****" && \ cp build/libs/*.jar /davos.jar && \ chmod 755 /davos.jar @@ -38,21 +38,19 @@ RUN \ FROM lsiobase/alpine.armhf:3.9 +# Add qemu to build on x86_64 systems +COPY qemu-arm-static /usr/bin + # set version label ARG BUILD_DATE ARG VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="JAGFin1,Thelamer" -# Add qemu to build on x86_64 systems -COPY qemu-arm-static /usr/bin - # install packages RUN \ apk add --no-cache \ - curl && \ - apk add --no-cache \ - --repository http://nl.alpinelinux.org/alpine/edge/community \ + curl \ openjdk8-jre # copy files from build stage and local files diff --git a/README.md b/README.md index 7172edc..465ffac 100644 --- a/README.md +++ b/README.md @@ -158,5 +158,6 @@ Below are the instructions for updating containers: ## Versions +* **08.03.19:** - Updating build environment to pass proper build flags and use gradle wrapper. * **22.02.19:** - Rebasing to alpine 3.9. * **18.11.16:** - Initial Release. diff --git a/readme-vars.yml b/readme-vars.yml index e643ab6..4253c3a 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -32,5 +32,6 @@ app_setup_block: | # changelog changelogs: + - { date: "08.03.19:", desc: "Updating build environment to pass proper build flags and use gradle wrapper." } - { date: "22.02.19:", desc: "Rebasing to alpine 3.9." } - { date: "18.11.16:", desc: "Initial Release." }