Merge branch 'staging'
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
### [1.0.1] - 2019/03/18
|
||||
- Add failsafe when importing Seafile's APT-key
|
||||
- Restrict production build to latest, majors, minors and revisions version, on-demand.
|
||||
# [1.0.0] - 2019/03/15
|
||||
- Release to Docker Hub
|
||||
|
||||
|
||||
10
Dockerfile
10
Dockerfile
@@ -30,12 +30,12 @@ COPY assets/supervisord.conf /.supervisord/
|
||||
COPY assets/infinite-seaf-cli-start.sh /
|
||||
COPY entrypoint.sh /
|
||||
|
||||
# Install both seafile-cli and supervisord.
|
||||
RUN apt-key adv \
|
||||
--keyserver hkp://keyserver.ubuntu.com:80 \
|
||||
--recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61
|
||||
RUN apt-get update ;\
|
||||
# Safely import Seafile APT key, then install both seafile-cli and supervisord.
|
||||
COPY utils/build/import-seafile-apt-key.sh /
|
||||
RUN /bin/bash /import-seafile-apt-key.sh ;\
|
||||
apt-get update ;\
|
||||
apt-get install -o Dpkg::Options::="--force-confold" -y seafile-cli supervisor
|
||||
RUN rm -f /import-seafile-apt-key.sh
|
||||
|
||||
# Configure the user.
|
||||
ENV UNAME=seafuser
|
||||
|
||||
21
README.md
21
README.md
@@ -1,16 +1,25 @@
|
||||
[](https://gitlab.com/flwgns-docker/seafile-client/commits/1.0.0)
|
||||
[](https://gitlab.com/flwgns-docker/seafile-client/commits/1.0.1)
|
||||
[](https://hub.docker.com/r/flowgunso/seafile-client)
|
||||
|
||||
# Available tags
|
||||
|
||||
## Production stable release
|
||||
[`1`](https://gitlab.com/flwgns-docker/seafile-client/tags/1.0.0),
|
||||
[`1.0`](https://gitlab.com/flwgns-docker/seafile-client/tags/1.0.0),
|
||||
Weekly stable release are built every Monday at 6AM UTC+2.
|
||||
Permanent stable releases will not be built again.
|
||||
|
||||
You can rely on the weekly stable releases. They are stable.
|
||||
|
||||
## Weekly stable releases.
|
||||
[`1`](https://gitlab.com/flwgns-docker/seafile-client/tags/1.0.1),
|
||||
[`1.0`](https://gitlab.com/flwgns-docker/seafile-client/tags/1.0.1),
|
||||
[`1.0.1`](https://gitlab.com/flwgns-docker/seafile-client/tags/1.0.1),
|
||||
[`latest`](https://gitlab.com/flwgns-docker/seafile-client/tags/1.0.1)
|
||||
(see tag/release [1.0.1](https://gitlab.com/flwgns-docker/seafile-client/tags/1.0.1))
|
||||
|
||||
## Permanent stable releases.
|
||||
[`1.0.0`](https://gitlab.com/flwgns-docker/seafile-client/tags/1.0.0),
|
||||
[`latest`](https://gitlab.com/flwgns-docker/seafile-client/tags/1.0.0)
|
||||
(see tag/release [1.0.0](https://gitlab.com/flwgns-docker/seafile-client/tags/1.0.0))
|
||||
|
||||
## Developmental releases
|
||||
## Developmental releases.
|
||||
[`staging`](https://gitlab.com/flwgns-docker/seafile-client/tree/staging)
|
||||
(see branch [staging](https://gitlab.com/flwgns-docker/seafile-client/tree/staging))
|
||||
|
||||
|
||||
27
utils/build/import-seafile-apt-key.sh
Normal file
27
utils/build/import-seafile-apt-key.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Docker Seafile client, help you mount a Seafile library as a volume.
|
||||
# Copyright (C) 2019, flow.gunso@gmail.com
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
not_imported=true
|
||||
while $not_imported; do
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61
|
||||
if [ $? -eq 0 ]; then
|
||||
not_imported=false
|
||||
else
|
||||
sleep 5
|
||||
fi
|
||||
done
|
||||
@@ -1,11 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Docker Seafile client, help you mount a Seafile library as a volume.
|
||||
# Copyright (C) 2019, flow.gunso@gmail.com
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Restrict production build to tag matching MAJOR.MINOR.REVISION.
|
||||
if ! [[ "$CI_COMMIT_TAG" =~ ^[0-9]+[.][0-9]+[.][0-9]+$ ]]; then
|
||||
echo "Version number must match major.minor.revision!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If no build indication was given, assume BUILD_LATEST.
|
||||
# Most likely, this will only cover builds triggered from tag pushes.
|
||||
if [ -z $BUILD_LATEST -o \
|
||||
-z $BUILD_MAJOR -o \
|
||||
-z $BUILD_MINOR -o \
|
||||
-z $BUILD_REVISION ]; then
|
||||
BUILD_LATEST=true
|
||||
fi
|
||||
|
||||
# Cascade the builds by inheritance.
|
||||
if [ $BUILD_LATEST ]; then BUILD_MAJOR=true; BUILD_MINOR=true; BUILD_REVISION=true; fi
|
||||
if [ $BUILD_MAJOR ]; then BUILD_MINOR=true; BUILD_REVISION=true; fi
|
||||
if [ $BUILD_MINOR ]; then BUILD_REVISION=true; fi
|
||||
|
||||
# Define MAJOR, MINOR and REVISION version numbers.
|
||||
MAJOR_NUMBER=$(echo "$CI_COMMIT_TAG" | awk -F \. {'print $1'})
|
||||
MINOR_NUMBER=$(echo "$CI_COMMIT_TAG" | awk -F \. {'print $2'})
|
||||
@@ -14,15 +44,15 @@ MAJOR=$MAJOR_NUMBER
|
||||
MINOR=$MAJOR.$MINOR_NUMBER
|
||||
REVISION=$MINOR.$REVISION_NUMBER
|
||||
|
||||
# Build.
|
||||
# Always build with all tags, there's a single build anyway.
|
||||
docker build \
|
||||
-t $CI_REGISTRY_IMAGE:latest \
|
||||
-t $CI_REGISTRY_IMAGE:$MAJOR \
|
||||
-t $CI_REGISTRY_IMAGE:$MINOR \
|
||||
-t $CI_REGISTRY_IMAGE:$REVISION .
|
||||
|
||||
# And push.
|
||||
docker push $CI_REGISTRY_IMAGE:latest
|
||||
docker push $CI_REGISTRY_IMAGE:$MAJOR
|
||||
docker push $CI_REGISTRY_IMAGE:$MINOR
|
||||
docker push $CI_REGISTRY_IMAGE:$REVISION
|
||||
# Only push requested builds.
|
||||
if [ $BUILD_LATEST ]; then docker push $CI_REGISTRY_IMAGE:latest; fi
|
||||
if [ $BUILD_MAJOR ]; then docker push $CI_REGISTRY_IMAGE:$MAJOR; fi
|
||||
if [ $BUILD_MINOR ]; then docker push $CI_REGISTRY_IMAGE:$MINOR; fi
|
||||
if [ $BUILD_REVISION ]; then docker push $CI_REGISTRY_IMAGE:$REVISION; fi
|
||||
@@ -1,5 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Docker Seafile client, help you mount a Seafile library as a volume.
|
||||
# Copyright (C) 2019, flow.gunso@gmail.com
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Just build and push as staging.
|
||||
docker build -t $CI_REGISTRY_IMAGE:staging .
|
||||
docker push $CI_REGISTRY_IMAGE:staging
|
||||
Reference in New Issue
Block a user