2018-04-03 02:58:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
######################################
|
2018-05-09 10:36:10 +00:00
|
|
|
# Publish the seafile pro-server image (e.g. seafileltd/seafile-pro:6.2.3) to docker
|
2018-04-03 02:58:14 +00:00
|
|
|
# registry. This script should only be called during a travis build trigger by a tag.
|
|
|
|
######################################
|
|
|
|
|
|
|
|
# Nerver use "set -x" or it would expose the docker credentials in the travis logs!
|
|
|
|
set -e
|
|
|
|
set -o pipefail
|
|
|
|
|
2018-09-05 04:53:58 +00:00
|
|
|
docker login -u="$DOCKER_PRO_REGISTRY_USER" -p="$DOCKER_PRO_REGISTRY_PASSWORD" docker.seadrive.org
|
2018-04-03 02:58:14 +00:00
|
|
|
|
|
|
|
## Always use the base image we build manually to reduce the download size of the end user.
|
2018-05-09 10:36:10 +00:00
|
|
|
docker rm -f $(docker ps -a -q)
|
|
|
|
docker rmi -f $(docker images -a -q)
|
2018-09-05 04:53:58 +00:00
|
|
|
docker pull docker.seadrive.org/seafileltd/pro-base:16.04
|
|
|
|
docker tag docker.seadrive.org/seafileltd/pro-base:16.04 seafileltd/pro-base:16.04
|
2018-04-03 02:58:14 +00:00
|
|
|
|
|
|
|
(
|
|
|
|
cd image
|
2018-09-05 04:53:58 +00:00
|
|
|
make host=docker.seadrive.org pro-server push-pro-server
|
2018-04-03 02:58:14 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-14 10:39:16 +00:00
|
|
|
docker login -u="$LOCAL_DOCKER_PRO_REGISTRY_USER" -p="$LOCAL_DOCKER_PRO_REGISTRY_PASSWORD" docker.seafile.top
|
2018-04-03 02:58:14 +00:00
|
|
|
|
|
|
|
docker rmi -f $(docker images | awk {'print $3'})
|
2018-08-14 10:39:16 +00:00
|
|
|
docker pull docker.seafile.top/seafileltd/pro-base:16.04
|
|
|
|
docker tag docker.seafile.top/seafileltd/pro-base:16.04 seafileltd/pro-base:16.04
|
2018-04-03 02:58:14 +00:00
|
|
|
(
|
|
|
|
cd image
|
2018-08-14 10:39:16 +00:00
|
|
|
make host=docker.seafile.top pro-server push-pro-server
|
2018-04-03 02:58:14 +00:00
|
|
|
)
|