diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a9953cf --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +README.md +pipeline.yml +tag +upload_pipeline.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5851aea --- /dev/null +++ b/Dockerfile @@ -0,0 +1,41 @@ +FROM python:3-slim + +LABEL maintainer="Drew Short" + +ARG RENPY_VERSION +ENV SDL_AUDIODRIVER="dummy" \ + SDL_VIDEODRIVER="dummy" \ + RENPY_DIR="/renpy" \ + RENPY_VERSION=${RENPY_VERSION:-"7.3.5"} + +RUN mkdir -p /tmp + +RUN apt-get -y update \ + && apt-get -y --no-install-recommends install \ + procps \ + bzip2 \ + ca-certificates \ + curl \ + tar \ + unzip \ + wget \ + && rm -Rf /var/lib/apt/lists/* + +RUN cd /tmp \ + && curl -LSo renpy-${RENPY_VERSION}-sdk.tar.bz2 https://www.renpy.org/dl/${RENPY_VERSION}/renpy-${RENPY_VERSION}-sdk.tar.bz2 \ + && curl -LSo renpy-${RENPY_VERSION}-rapt.zip https://www.renpy.org/dl/${RENPY_VERSION}/renpy-${RENPY_VERSION}-rapt.zip \ + && curl -LSo renpy-${RENPY_VERSION}-renios.zip https://www.renpy.org/dl/${RENPY_VERSION}/renpy-${RENPY_VERSION}-renios.zip \ + && curl -LSo renpy-${RENPY_VERSION}-web.zip https://www.renpy.org/dl/${RENPY_VERSION}/renpy-${RENPY_VERSION}-web.zip + +run cd /tmp \ + && tar -xf renpy-${RENPY_VERSION}-sdk.tar.bz2 \ + && rm renpy-${RENPY_VERSION}-sdk.tar.bz2 \ + && mv renpy-${RENPY_VERSION}-sdk ${RENPY_DIR} \ + && unzip renpy-${RENPY_VERSION}-rapt.zip -d ${RENPY_DIR} \ + && rm renpy-${RENPY_VERSION}-rapt.zip \ + && unzip renpy-${RENPY_VERSION}-renios.zip -d ${RENPY_DIR} \ + && rm renpy-${RENPY_VERSION}-renios.zip \ + && unzip renpy-${RENPY_VERSION}-web.zip -d ${RENPY_DIR} \ + && rm renpy-${RENPY_VERSION}-web.zip + +WORKDIR $RENPY_DIR diff --git a/pipeline.yml b/pipeline.yml new file mode 100644 index 0000000..3ed85c8 --- /dev/null +++ b/pipeline.yml @@ -0,0 +1,30 @@ +--- +resources: + - name: git-resource + type: git + icon: git + source: + uri: ssh://git@git.nulloctet.com:8437/docker/renpy.git + private_key: | + ((pull_key)) + ignore_paths: + - pipeline.yml + - upload_pipeline.sh + - README.md + - name: git-resource-image + type: docker-image + icon: docker + source: + repository: ((nexus_docker_write.host))/sothr/renpy + username: ((nexus_docker_write.username)) + password: ((nexus_docker_write.password)) + +jobs: + - name: build-image + plan: + - get: git-resource + trigger: true + - put: git-resource-image + params: + build: git-resource + tag_file: git-resource/tag diff --git a/tag b/tag new file mode 100644 index 0000000..d9edd15 --- /dev/null +++ b/tag @@ -0,0 +1 @@ +7.3.5 diff --git a/upload_pipeline.sh b/upload_pipeline.sh new file mode 100644 index 0000000..64cfa9c --- /dev/null +++ b/upload_pipeline.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +TEAM=docker +PIPELINE=renpy + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +pushd "${DIR}" + +fly -t ${TEAM} set-pipeline --pipeline ${PIPELINE} --config pipeline.yml + +popd