Skip to content

Instantly share code, notes, and snippets.

@magwas
Last active March 30, 2016 23:24
Show Gist options
  • Save magwas/9b78d86732640e5f67491c707b4d5d18 to your computer and use it in GitHub Desktop.
Save magwas/9b78d86732640e5f67491c707b4d5d18 to your computer and use it in GitHub Desktop.
drone.io and gitlab
dronestart script. You run it once, and you will have a daemon forever. Docker makes sure that the container is started whenever docker starts.
#!/bin/bash
set -x
docker kill drone
docker rm drone
docker run \
--volume /var/lib/drone:/var/lib/drone \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume /etc/ssl:/etc/ssl:ro \
--env-file /etc/drone/dronerc \
--restart=always \
--publish=80:8000 \
--detach=true \
--name=drone \
drone/drone:0.4 \
-debug
------------------------------------------
In ubuntu you put the ca certificate for the gitlab host to /usr/share/ca-certificates,
put its filename to /etc/ca-certificates.conf
$ cat /etc/drone/dronerc
# in gitlab, as an administrator, go to /admin/applications
# add a new application, the redirect uri being https://drone.machine/authorize
REMOTE_DRIVER=gitlab
REMOTE_CONFIG=https://gitlab.host?client_id=$(client_id)&client_secret=$(client_secret)
DATABASE_DRIVER=sqlite3
DATABASE_CONFIG=/var/lib/drone/drone.sqlite
HTTP_PROXY=http://proxy.local:3128/
HTTPS_PROXY=http://proxy.local:3128/
----------------
I know no really correct solution tho this.
if git clone complains about unknown ca of gitlab, you put the following in .drone.yml:
clone:
skip_verify: true
-------------------
You can add docker nodes in the upper right menu/nodes.
Setting up one docker node: https://docs.docker.com/engine/security/https/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment