CI: Update Drone config and Makefile for new release branch

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-12-26 17:02:15 +01:00
parent 6958820475
commit 9d887ca5d2
5 changed files with 29 additions and 10 deletions

View file

@ -51,7 +51,7 @@ steps:
- failure
- success
- name: deploy
- name: deploy-preview
environment:
DOCKER_USERNAME:
from_secret: docker_username
@ -59,13 +59,28 @@ steps:
from_secret: docker_password
commands:
- scripts/docker-login.sh
- make docker-photoprism docker-photoprism-pull docker-demo
- make docker-photoprism-preview docker-demo
when:
status:
- success
branch:
- master
- name: deploy-release
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
commands:
- scripts/docker-login.sh
- make docker-photoprism
when:
status:
- success
branch:
- release
---
kind: pipeline
type: exec
@ -104,7 +119,7 @@ name: linux-arm64
trigger:
branch:
- master
- release
platform:
arch: arm64

View file

@ -167,6 +167,9 @@ docker-development:
docker-photoprism:
scripts/docker-build.sh photoprism $(DOCKER_TAG)
scripts/docker-push.sh photoprism $(DOCKER_TAG)
docker-photoprism-preview:
scripts/docker-build.sh photoprism
scripts/docker-push.sh photoprism
docker-photoprism-local:
scripts/docker-build.sh photoprism
docker-photoprism-pull:
@ -180,8 +183,8 @@ docker-demo:
scripts/docker-push.sh demo $(DOCKER_TAG)
docker-demo-local:
scripts/docker-build.sh photoprism
scripts/docker-build.sh demo
scripts/docker-push.sh demo
scripts/docker-build.sh demo $(DOCKER_TAG)
scripts/docker-push.sh demo $(DOCKER_TAG)
docker-webdav:
docker pull golang:1
scripts/docker-build.sh webdav $(DOCKER_TAG)

View file

@ -1,4 +1,4 @@
FROM photoprism/photoprism:latest as build
FROM photoprism/photoprism:preview as build
# Hide TensorFlow warnings
ENV TF_CPP_MIN_LOG_LEVEL 2

View file

@ -4,8 +4,9 @@ if [[ -z $1 ]] && [[ -z $2 ]]; then
echo "Please provide a container image name and version" 1>&2
exit 1
elif [[ $1 ]] && [[ -z $2 ]]; then
echo "Building 'photoprism/$1:latest'...";
docker build --no-cache --build-arg BUILD_TAG=$2 -t photoprism/$1:latest -f docker/${1/-//}/Dockerfile .
DOCKER_TAG=$(date -u +%Y%m%d)
echo "Building 'photoprism/$1:preview'...";
docker build --no-cache --build-arg BUILD_TAG="${DOCKER_TAG}" -t photoprism/$1:preview -f docker/${1/-//}/Dockerfile .
echo "Done"
else
echo "Building 'photoprism/$1:$2'...";

View file

@ -8,8 +8,8 @@ if [[ -z $1 ]] && [[ -z $2 ]]; then
echo "Please provide a container image name and version" 1>&2
exit 1
elif [[ $1 ]] && [[ -z $2 ]]; then
echo "Pushing 'photoprism/$1:latest' to Docker hub...";
docker push photoprism/$1:latest
echo "Pushing 'photoprism/$1:preview' to Docker hub...";
docker push photoprism/$1:preview
echo "Done"
else
echo "Pushing 'photoprism/$1:$2' to Docker hub...";