initial commit
This commit is contained in:
commit
bb44e6e957
3 changed files with 42 additions and 0 deletions
21
.drone.yml
Normal file
21
.drone.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build-docker-image
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: org_registry_username
|
||||||
|
password:
|
||||||
|
from_secret: org_registry_password
|
||||||
|
registry: registry.pleshevski.ru
|
||||||
|
repo: registry.pleshevski.ru/${DRONE_REPO}
|
||||||
|
|
7
Dockerfile
Normal file
7
Dockerfile
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
FROM docker:20.10.14-dind
|
||||||
|
|
||||||
|
COPY entrypoint.sh /
|
||||||
|
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT /entrypoint.sh
|
14
entrypoint.sh
Normal file
14
entrypoint.sh
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
if [ -n "$PLUGIN_PASSWORD" ]; then
|
||||||
|
echo -n "$PLUGIN_PASSWORD" | docker login -u "$PLUGIN_USERNAME" --password-stdin $PLUGIN_REGISTRY
|
||||||
|
AUTH_FLAGS=--with-registry-auth
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker stack deploy \
|
||||||
|
$AUTH_FLAGS \
|
||||||
|
-c "${PLUGIN_COMPOSE_FILE_PATH:-docker-compose.yml}" \
|
||||||
|
${PLUGIN_NAME:-$DRONE_REPO_NAME}
|
||||||
|
|
Reference in a new issue