Compare commits
22 Commits
Author | SHA1 | Date |
---|---|---|
Marcel Otte | b20b6abf3b | |
Marcel Otte | b0eb16edec | |
Marcel Otte | 8536a2ff73 | |
Marcel Otte | 355fcc2b99 | |
Marcel | d085e15c66 | |
Marcel Otte | 726eeb7f2d | |
Marcel M. Otte | 5e1311dc33 | |
Marcel Otte | 9473363d74 | |
Marcel Otte | abdfd02986 | |
Marcel Otte | 29729afca1 | |
Marcel Otte | b0056f2518 | |
Marcel Otte | 57432e3e5c | |
Marcel Otte | 40f727b98d | |
Marcel Otte | 6633401815 | |
Marcel Otte | e475104717 | |
Marcel Otte | 0efb3b5033 | |
Marcel Otte | 2373826792 | |
Marcel Otte | 337ff72e9c | |
Marcel Otte | f839fa8ad2 | |
Marcel Otte | 9b1a92170d | |
Marcel Otte | a61cc79486 | |
Marcel Otte | a2e73e4e86 |
|
@ -1,90 +0,0 @@
|
||||||
name: Docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
# Publish `master` as Docker `latest` image.
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
# Publish `v1.2.3` tags as releases.
|
|
||||||
tags:
|
|
||||||
- v*
|
|
||||||
|
|
||||||
# Run tests for any PRs.
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
env:
|
|
||||||
IMAGE_NAME: terasology
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Run tests.
|
|
||||||
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
|
|
||||||
#test:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
|
||||||
|
|
||||||
# - name: Run tests
|
|
||||||
# run: |
|
|
||||||
# if [ -f docker-compose.test.yml ]; then
|
|
||||||
# docker-compose --file docker-compose.test.yml build
|
|
||||||
# docker-compose --file docker-compose.test.yml run sut
|
|
||||||
# else
|
|
||||||
# docker build . --file Dockerfile
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# Push image to GitHub Packages.
|
|
||||||
# See also https://docs.docker.com/docker-hub/builds/
|
|
||||||
push:
|
|
||||||
# Ensure test job passes before pushing image.
|
|
||||||
# needs: test
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Build image
|
|
||||||
run: docker build . --file Dockerfile --tag image
|
|
||||||
|
|
||||||
- name: Log into registry
|
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
|
|
||||||
|
|
||||||
- name: Push image
|
|
||||||
run: |
|
|
||||||
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
|
|
||||||
|
|
||||||
# Change all uppercase to lowercase
|
|
||||||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
|
||||||
|
|
||||||
# Strip git ref prefix from version
|
|
||||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
|
||||||
|
|
||||||
# Strip "v" prefix from tag name
|
|
||||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
|
||||||
|
|
||||||
# Use Docker `latest` tag convention
|
|
||||||
[ "$VERSION" == "master" ] && VERSION=latest
|
|
||||||
|
|
||||||
echo IMAGE_ID=$IMAGE_ID
|
|
||||||
echo VERSION=$VERSION
|
|
||||||
|
|
||||||
rm versionInfo.properties* || true
|
|
||||||
|
|
||||||
if [ " ${TERASOLOGY_PROPERTIES_URL}" == " " ]; then
|
|
||||||
if [ " ${TERASOLOGY_BUILD}" == " " ]; then
|
|
||||||
TERASOLOGY_PROPERTIES_URL=http://jenkins.terasology.org/job/TerasologyStable/lastSuccessfulBuild/artifact/build/resources/main/org/terasology/version/versionInfo.properties
|
|
||||||
else
|
|
||||||
if [ " ${TERASOLOGY_BUILD}" == " unstable" ]; then
|
|
||||||
TERASOLOGY_PROPERTIES_URL=http://jenkins.terasology.org/job/Terasology/lastSuccessfulBuild/artifact/build/resources/main/org/terasology/version/versionInfo.properties
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
wget ${TERASOLOGY_PROPERTIES_URL}
|
|
||||||
source versionInfo.properties
|
|
||||||
TAGNAME=$engineVersion-$displayVersion
|
|
||||||
echo TAGNAME=$TAGNAME
|
|
||||||
docker tag image $IMAGE_ID:$TAGNAME
|
|
||||||
docker push $IMAGE_ID:$TAGNAME
|
|
|
@ -2,9 +2,9 @@ FROM ubuntu:18.04
|
||||||
MAINTAINER Marcel Otte <qwc+docker@mmo.to>
|
MAINTAINER Marcel Otte <qwc+docker@mmo.to>
|
||||||
RUN apt-get update && apt-get install -y openjdk-11-jre wget unzip
|
RUN apt-get update && apt-get install -y openjdk-11-jre wget unzip
|
||||||
RUN mkdir /terasology \
|
RUN mkdir /terasology \
|
||||||
&& wget -P /terasology http://jenkins.terasology.org/job/DistroOmegaRelease/lastSuccessfulBuild/artifact/distros/omega/build/distributions/TerasologyOmega.zip \
|
&& wget -P /terasology http://jenkins.terasology.io/teraorg/job/Terasology/job/Omega/job/develop/lastSuccessfulBuild/artifact/distros/omega/build/distributions/TerasologyOmega.zip \
|
||||||
&& unzip /terasology/TerasologyOmega.zip -d /terasology \
|
&& unzip /terasology/TerasologyOmega.zip -d /terasology \
|
||||||
&& rm -f /terasology/TerasologyOmega.zip
|
&& rm -f /terasology/TerasologyOmega.zip
|
||||||
ENTRYPOINT cd /terasology && java -jar /terasology/libs/Terasology.jar -headless -homedir=/terasology/server
|
ENTRYPOINT cd /terasology && java -Dterasology_variant=unstable -jar /terasology/libs/Terasology.jar -headless -homedir=/terasology/server -installPath=/terasology
|
||||||
VOLUME /terasology/server
|
VOLUME /terasology/server
|
||||||
EXPOSE 25777
|
EXPOSE 25777
|
||||||
|
|
7
build.sh
7
build.sh
|
@ -2,17 +2,20 @@
|
||||||
|
|
||||||
rm versionInfo.properties*
|
rm versionInfo.properties*
|
||||||
|
|
||||||
wget http://jenkins.terasology.org/job/TerasologyStable/lastSuccessfulBuild/artifact/build/resources/main/org/terasology/version/versionInfo.properties
|
#wget http://jenkins.terasology.org/job/Terasology/lastSuccessfulBuild/artifact/build/resources/main/org/terasology/version/versionInfo.properties
|
||||||
|
wget http://jenkins.terasology.io/teraorg/job/Terasology/job/Omega/job/develop/lastSuccessfulBuild/artifact/distros/omega/versionInfo.properties
|
||||||
|
|
||||||
source versionInfo.properties
|
source versionInfo.properties
|
||||||
|
|
||||||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
||||||
|
|
||||||
TAGNAME=$engineVersion-$displayVersion
|
TAGNAME=$engineVersion-$displayVersion
|
||||||
|
echo The dev-latest build is: $TAGNAME
|
||||||
|
TAGNAME=unstable-latest
|
||||||
|
|
||||||
docker build --no-cache -t qwick/terasology:$TAGNAME .
|
docker build --no-cache -t qwick/terasology:$TAGNAME .
|
||||||
|
|
||||||
NEW_TAGNAME=latest
|
NEW_TAGNAME=unstable-$engineVersion-$buildNumber
|
||||||
|
|
||||||
docker tag qwick/terasology:$TAGNAME qwick/terasology:$NEW_TAGNAME
|
docker tag qwick/terasology:$TAGNAME qwick/terasology:$NEW_TAGNAME
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
version: '2'
|
terasology:
|
||||||
services:
|
image: qwick/terasology:dev-latest
|
||||||
terasology:
|
ports:
|
||||||
image: qwick/terasology:latest
|
- 25777:25777
|
||||||
ports:
|
volumes:
|
||||||
- 25777:25777
|
- ./terasology:/terasology/server
|
||||||
volumes:
|
|
||||||
- ./terasology:/terasology/server
|
|
||||||
|
|
Loading…
Reference in New Issue