mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Make travis build and push docker images (#772)
This commit is contained in:
14
.travis.yml
14
.travis.yml
@@ -55,6 +55,12 @@ deploy:
|
|||||||
on:
|
on:
|
||||||
repo: stashapp/stash
|
repo: stashapp/stash
|
||||||
branch: develop
|
branch: develop
|
||||||
|
# docker image build for develop release
|
||||||
|
- provider: script
|
||||||
|
script: bash ./docker/ci/x86_64/docker_push.sh development-x86_64
|
||||||
|
on:
|
||||||
|
repo: stashapp/stash
|
||||||
|
branch: develop
|
||||||
# official master release - only build when tagged
|
# official master release - only build when tagged
|
||||||
- provider: releases
|
- provider: releases
|
||||||
api_key:
|
api_key:
|
||||||
@@ -78,3 +84,11 @@ deploy:
|
|||||||
tags: true
|
tags: true
|
||||||
# make sure we don't release using the latest_develop tag
|
# make sure we don't release using the latest_develop tag
|
||||||
condition: $TRAVIS_TAG != latest_develop
|
condition: $TRAVIS_TAG != latest_develop
|
||||||
|
# docker image build for master release
|
||||||
|
- provider: script
|
||||||
|
script: bash ./docker/ci/x86_64/docker_push.sh latest
|
||||||
|
on:
|
||||||
|
repo: stashapp/stash
|
||||||
|
tags: true
|
||||||
|
# make sure we don't release using the latest_develop tag
|
||||||
|
condition: $TRAVIS_TAG != latest_develop
|
||||||
|
|||||||
25
docker/ci/x86_64/Dockerfile
Normal file
25
docker/ci/x86_64/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
# must be built from /dist directory
|
||||||
|
|
||||||
|
FROM ubuntu:18.04 as prep
|
||||||
|
LABEL MAINTAINER="https://discord.gg/Uz29ny"
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get -y install curl xz-utils && \
|
||||||
|
apt-get autoclean -y && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
WORKDIR /
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
|
RUN curl --http1.1 -o /ffmpeg.tar.xz https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz && \
|
||||||
|
tar xf /ffmpeg.tar.xz && \
|
||||||
|
rm ffmpeg.tar.xz && \
|
||||||
|
mv /ffmpeg*/ /ffmpeg/
|
||||||
|
|
||||||
|
FROM ubuntu:18.04 as app
|
||||||
|
RUN apt-get update && apt-get -y install ca-certificates
|
||||||
|
COPY --from=prep /ffmpeg/ffmpeg /ffmpeg/ffprobe /usr/bin/
|
||||||
|
COPY /stash-linux /usr/bin/stash
|
||||||
|
|
||||||
|
EXPOSE 9999
|
||||||
|
CMD ["stash"]
|
||||||
1
docker/ci/x86_64/README.md
Normal file
1
docker/ci/x86_64/README.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
This dockerfile is used by travis to build the stash image. It must be run after cross-compiling - that is, `stash-linux` must exist in the `dist` directory. This image must be built from the `dist` directory.
|
||||||
9
docker/ci/x86_64/docker_push.sh
Normal file
9
docker/ci/x86_64/docker_push.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DOCKER_TAG=$1
|
||||||
|
|
||||||
|
# must build the image from dist directory
|
||||||
|
echo docker build -t stashapp/stash:$DOCKER_TAG -f ./docker/ci/x86_64/Dockerfile ./dist
|
||||||
|
|
||||||
|
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
|
echo docker push stashapp/stash:$DOCKER_TAG
|
||||||
Reference in New Issue
Block a user