Get correct versions for docker image
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Armin Friedl 2020-07-12 11:46:47 +02:00
parent 525fd42b84
commit dcd9b65bbb
Signed by: armin
GPG key ID: 48C726EEE7FBCBC8
2 changed files with 6 additions and 2 deletions

View file

@ -50,6 +50,8 @@ steps:
context: ./container
repo: arminfriedl/fling
tags: 0.1.0-snapshot
build_args:
- VERSION=0.1.0-snapshot
- name: runservice
image: arminfriedl/fling:0.1.0-snapshot

View file

@ -1,10 +1,12 @@
FROM alpine:latest
ARG VERSION
RUN apk add --update --no-cache nginx openjdk11-jre && \
mkdir -p /var/fling/files && \
mkdir -p /tmp/fling && \
wget -O /tmp/fling/service.jar "https://nexus.friedl.net/service/rest/v1/search/assets/download?sort=version&maven.groupId=net.friedl&maven.artifactId=fling&maven.baseVersion=*SNAPSHOT&maven.extension=jar" && \
wget -O /tmp/fling/web.tar.gz "https://nexus.friedl.net/repository/build-artifacts/fling-web-latest.tar.gz" && \
wget -O /tmp/fling/service.jar "https://nexus.friedl.net/service/rest/v1/search/assets/download?sort=version&maven.groupId=net.friedl&maven.artifactId=fling&maven.baseVersion=$(echo -n $VERSION | tr [:lower:] [:upper:])&maven.extension=jar" && \
wget -O /tmp/fling/web.tar.gz "https://nexus.friedl.net/repository/build-artifacts/fling-web-$(echo -n $VERSION | tr [:upper:] [:lower:]).tar.gz" && \
tar xzf /tmp/fling/web.tar.gz -C /tmp/fling && \
ls -al /tmp/fling && \
mkdir -p /var/www/fling && mv /tmp/fling/build/* /var/www/fling && \