Migrate to flrnnc Docker Hub organization.

This commit is contained in:
Florian Anceau
2024-08-24 14:19:24 +00:00
parent 3375aca7dd
commit 659e102935
16 changed files with 117 additions and 36 deletions

View File

@@ -28,7 +28,7 @@ build:
extends: .parallel
rules:
- if: $CI_COMMIT_TAG
- if: $CI_MERGE_REQUEST_APPROVED
- if: $CI_MERGE_REQUEST_TITLE !~ /^Draft/
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
artifacts:
paths:
@@ -52,7 +52,7 @@ test:
- TARGET: unstable
rules:
- if: $CI_COMMIT_TAG
- if: $CI_MERGE_REQUEST_APPROVED
- if: $CI_MERGE_REQUEST_TITLE !~ /^Draft/
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
artifacts:
paths:
@@ -144,8 +144,9 @@ weekly-build-scheduler:
code_quality:
rules:
- if: $CI_MERGE_REQUEST_APPROVED
- if: $CI_MERGE_REQUEST_TITLE !~ /^Draft/
semgrep-sast:
rules:
- if: $CI_MERGE_REQUEST_APPROVED
- if: $CI_MERGE_REQUEST_TITLE !~ /^Draft/

View File

@@ -7,7 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- To log a new version, copy, uncomment, add your changes, then add the tag shortcut at the end of the file
## [Unreleased]
<!-- tag --!>
## [tag]
### Added
### Changed
### Deprecated
@@ -16,9 +17,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security
[tag]: url_to_tag
<!-- --/>
<!-- /tag --!>
-->
<!-- 3.2.4 -->
## [3.2.4]
### Added
* Publish to the new flrnnc/seafile-client repository.
* Documentation template for old flowgunso/seafile-client images.
### Changed
* Use new CI/CD variables.
[3.2.4]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/3.2.4
<!-- /3.2.4 -->
## [3.2.3] - 2024/06/27
### Changed
- Update the build badge date on builds. (#61)

View File

@@ -1,5 +1,6 @@
TARGET?=unstable
# Mocking
mock:
docker compose -f tests/mock/compose.yaml up -d
@@ -16,6 +17,10 @@ shell:
logs:
docker compose -f tests/mock/compose.yaml logs -f client
ps:
docker compose -f tests/mock/compose.yaml ps
# Build
build:
TARGET=${TARGET} CI_COMMIT_TAG=${CI_COMMIT_TAG} bash scripts/build-images.sh
@@ -25,17 +30,18 @@ build-test:
test:
docker run seafile-client:test
# CI/CD
documents:
python scripts/make-documents.py docker.md.j2
python scripts/make-documents.py docker-old.j2
python scripts/make-documents.py seafile.md.j2
publish-images:
TARGET=${TARGET} \
DOCKER_HUB_BOT_USERNAME=${DOCKER_HUB_BOT_USERNAME} \
DOCKER_HUB_BOT_TOKEN=${DOCKER_HUB_BOT_TOKEN} \
DOCKER_HUB_OWNER_USERNAME=${DOCKER_HUB_OWNER_USERNAME} \
DOCKER_HUB_OWNER_TOKEN=${DOCKER_HUB_OWNER_TOKEN} \
DOCKER_HUB_IMAGE=${DOCKER_HUB_IMAGE} \
DOCKER_REGISTRY_USERNAME=${DOCKER_REGISTRY_USERNAME} \
DOCKER_REGISTRY_TOKEN=${DOCKER_REGISTRY_TOKEN} \
DOCKER_REGISTRY_IMAGE_FLOWGUNSO=${DOCKER_REGISTRY_IMAGE_FLOWGUNSO} \
DOCKER_REGISTRY_IMAGE_FLRNNC=${DOCKER_REGISTRY_IMAGE_FLRNCC} \
bash scripts/publish-images.sh
publish-documents:
@@ -44,10 +50,12 @@ publish-documents:
save:
mkdir -p tarballs/
docker save --output tarballs/${TARGET}.tar seafile-client:${TARGET}
docker save --output tarballs/${TARGET}-flowgunso.tar seafile-client:${TARGET}-flowgunso
docker save --output tarballs/${TARGET}-flrnnc.tar seafile-client:${TARGET}-flrnnc
load:
docker load --input tarballs/${TARGET}.tar
docker load --input tarballs/${TARGET}-flowgunso.tar
docker load --input tarballs/${TARGET}-flrnnc.tar
schedule-weekly-build:
python scripts/schedule-build.py

View File

@@ -1,5 +1,7 @@
> ⚠️ Please consider sponsoring this project to help me maintaining and improving it. As of right now, you can support me through Liberay, available in the project badges
> This project is switching namespaces. The sources previously in [flwgnso-docker/docker-seafile-client](https://gitlab.com/flwgns-docker/seafile-client) are now in [florian.anceau-oss/docker-seafile-client](https://gitlab.com/florian.anceau-oss/docker-seafile-client). The Docker image can still be found at [flowgunso/seafile-client](https://hub.docker.com/r/flowgunso/seafile-client) but it will be deprecated, the image [flrnnc/seafile-client](https://hub.docker.com/r/flrnnc/seafile-client) should be used instead.
# Quick informations
_Docker Seafile client_ is a Docker image that provides a Seafile client to sync one or more library as volumes to other containers.

View File

@@ -0,0 +1,15 @@
{% include "parts/notice.md.j2" %}
{% include "parts/badges.md.j2" %}
**Share one or more Seafile libraries as a volume to other containers.**
{% include "parts/supported_tags.md.j2" %}
{% include "parts/features.md.j2" %}
{% include "parts/usage.md.j2" %}
{% include "parts/troubleshooting.md.j2" %}
{% include "parts/moving-to-another-namespace.md.j2" %}

View File

@@ -1,6 +1,6 @@
{% include "parts/badges.md.j2" %}
**Share a Seafile library as a volume to other containers.**
**Share one or more Seafile libraries as a volume to other containers.**
{% include "parts/supported_tags.md.j2" %}

View File

@@ -0,0 +1,5 @@
# Moving to another namespace
This repository is being moved to a new namespace [flrnnc](https://hub.docker.com/u/flrnnc).
I am applying to open source software programs on the service providers I rely on such as Gitlab and Docker. It means that my project must be reorganized. The `flrnnc` namespace is dedidacted to open source software I publish on Docker.

View File

@@ -0,0 +1,2 @@
> This repository will be moved to another namespace [flrnnc/seafile-client](https://hub.docker.com/repository/docker/flrnnc/seafile-client/) instead.
> See [moving to another namespace][#moving-to-another-namespace] for explanations.

View File

@@ -11,8 +11,14 @@ Example usage with docker-compose and for the docker cli are provided. Essential
Feedback is welcome so I can keep improving it.
# Quick informations
**[flowgunso/seafile-client](https://hub.docker.com/r/flowgunso/seafile-client)** on Docker Hub, latest stable version: **{{version}}**
Contribute and report issues on [Gitlab](https://gitlab.com/florian.anceau/docker-seafile-client/).
{% include "parts/badges.md.j2" %}
[u]Please use [flrnnc/seafile-client](https://hub.docker.com/r/flrnnc/seafile-client) from now on instead of [flowgunso/seafile-client](https://hub.docker.com/r/flowgunso/seafile-client)[/u].
The client is being moved to new namespaces which are sponsored as open source software. Both the source code and the image has been moved to those namespaces.
[flowgunso/seafile-client](https://hub.docker.com/r/flowgunso/seafile-client) will still be updated until usage is low enough.
{% include "parts/supported_tags.md.j2" %}
@@ -20,9 +26,4 @@ Contribute and report issues on [Gitlab](https://gitlab.com/florian.anceau/docke
{% include "parts/usage.md.j2" %}
{% include "parts/troubleshooting.md.j2" %}
# Changelog
[details]
{{changelog}}
[/details]
{% include "parts/troubleshooting.md.j2" %}

View File

@@ -30,5 +30,12 @@ done
docker build \
$build_arguments \
--tag seafile-client:$TARGET \
--build-arg IMAGE=flowgunso \
--tag seafile-client:$TARGET-flowgunso \
seafile-client/
docker build \
$build_arguments \
--build-arg IMAGE=flrnnc \
--tag seafile-client:$TARGET-flrnnc \
seafile-client/

View File

@@ -2,13 +2,13 @@
token=$(curl -s \
-X POST \
-H "Content-Type: application/json" \
-d '{"username": "'"$DOCKER_HUB_OWNER_USERNAME"'", "password": "'"$DOCKER_HUB_OWNER_TOKEN"'"}' \
-d '{"username": "'"$DOCKER_REGISTRY_USERNAME"'", "password": "'"$DOCKER_REGISTRY_TOKEN"'"}' \
https://hub.docker.com/v2/users/login/ | jq -r .token)
# Generate a JSON with the README.md as the full_description.
json=$(jq -n \
--arg readme "$(<documentations/docker.md)" \
'{"full_description": $readme,"description":"Synchronize a Seafile library. Support password protected librairies and 2FA authentication."}')
'{"full_description": $readme,"description":"Synchronize one or more Seafile library. Support password protected librairies and 2FA authentication."}')
# Update the Docker Hub repository's full_description.
curl -siL \
@@ -16,4 +16,11 @@ curl -siL \
-d "$json" \
-H "Content-Type: application/json" \
-H "Authorization: JWT $token" \
"https://hub.docker.com/v2/repositories/$DOCKER_HUB_IMAGE/"
"https://hub.docker.com/v2/repositories/$DOCKER_HUB_IMAGE_FLOWGUNSO/"
curl -siL \
-X PATCH \
-d "$json" \
-H "Content-Type: application/json" \
-H "Authorization: JWT $token" \
"https://hub.docker.com/v2/repositories/$DOCKER_HUB_IMAGE_FLRNNC/"

View File

@@ -49,8 +49,13 @@ for version_component in $(echo $version | tr '.' '\n'); do
done
# Tag then push to the Docker Hub registry.
echo $DOCKER_HUB_BOT_TOKEN | docker login --password-stdin --username $DOCKER_HUB_BOT_USERNAME
echo $DOCKER_REGISTRY_TOKEN | docker login --password-stdin --username $DOCKER_REGISTRY_USERNAME
for tag in "${tags[@]}"; do
docker tag seafile-client:$TARGET $DOCKER_HUB_IMAGE:$tag
docker push $DOCKER_HUB_IMAGE:$tag
docker tag seafile-client:$TARGET $DOCKER_REGISTRY_IMAGE_FLOWGUNSO:$tag
docker push $DOCKER_REGISTRY_IMAGE_FLOWGUNSO:$tag
done
for tag in "${tags[@]}"; do
docker tag seafile-client:$TARGET-flrnnc $DOCKER_REGISTRY_IMAGE_FLRNNC:$tag
docker push $DOCKER_REGISTRY_IMAGE_FLRNNC:$tag
done

View File

@@ -3,9 +3,11 @@ FROM debian:${TARGET}-slim
ARG UID
ARG GID
ARG IMAGE
ENV UID 1000
ENV GID 1000
ENV PYTHONUNBUFFERED 1
ENV IMAGE ${IMAGE}
RUN apt-get update && \
apt-get install \
@@ -41,9 +43,9 @@ ARG REVISION
ARG VERSION
LABEL org.opencontainers.image.created=${CREATED}
LABEL org.opencontainers.image.authors="flow.gunso@gmail.com"
LABEL org.opencontainers.image.url="https://hub.docker.com/r/flowgunso/seafile-client"
LABEL org.opencontainers.image.documentation="https://gitlab.com/florian.anceau/docker-seafile-client"
LABEL org.opencontainers.image.source="https://gitlab.com/florian.anceau/docker-seafile-client"
LABEL org.opencontainers.image.url="https://hub.docker.com/r/flrnnc/seafile-client"
LABEL org.opencontainers.image.documentation="https://gitlab.com/florian.anceau-oss/docker-seafile-client"
LABEL org.opencontainers.image.source="https://gitlab.com/florian.anceau-oss/docker-seafile-client"
LABEL org.opencontainers.image.version=${VERSION}
LABEL org.opencontainers.image.revision=${REVISION}
LABEL org.opencontainers.image.licenses="GPL-3.0"

View File

@@ -23,7 +23,20 @@ set -e
groupmod -g $GID seafile &> /dev/null
usermod -u $UID -g $GID seafile &> /dev/null
if [ "$IMAGE" == "flowgunso" ]; then
echo
echo -e "┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"
echo -e "┃ \e[1mPlease use \e[4mflrnnc/seafile-client\e[24m instead of \e[4mflowgunso/seafile-client\e[24m which will be deprecated...\e[0m ┃"
echo -e "┃ See the information notices at: ┃"
echo -e "┃ \thttps://forum.seafile.com/t/docker-client-to-sync-files-with-containers/8573 ┃"
echo -e "┃ \thttps://gitlab.com/florian.anceau-oss/docker-seafile-client ┃"
echo -e "┃ \thttps://hub.docker.com/r/flowgunso/seafile-client ┃"
echo -e "┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"
echo
fi
sudo \
-HE \
-u seafile \
-- "$@"
-- "$@"

View File

@@ -1,5 +1,5 @@
ARG TARGET=unstable
FROM seafile-client:${TARGET}
FROM seafile-client:${TARGET}-flrnnc
COPY --chmod=755 test_binaries.sh /test.sh

View File

@@ -31,7 +31,7 @@ services:
- memcached
client:
image: seafile-client:unstable
image: seafile-client:oldstable-flowgunso
volumes:
#- library:/library
- data:/seafile
@@ -40,7 +40,7 @@ services:
SEAF_SERVER_URL: "http://seafile"
SEAF_USERNAME: "seafile@localhost"
SEAF_PASSWORD: "password"
SEAF_LIBRARY_UUID: "1b7d4e92-6753-4c4a-85b0-42566eab42c8"
SEAF_LIBRARY: "1b7d4e92-6753-4c4a-85b0-42566eab42c8"
DEBUG: 1
UID: 1000
GID: 100