droneci

Droneci

I used to run gitlab a while ago, but it was way too resource heavy for my requirements.

So far a long time I didn't run any local CI.

Today, I started playing around Droneci.

I got it working after some time in its own Debian vm.

The server runs inside docker and the runner also runs in the same vm.

My local git server is a gitea instance, running also in docker.

Link

Link for setting up drone with the gitea instance:

drone docs gitea link

Issues

I setup the instance of Drone to run on http.

Which was fine, until I couldn't get the oauth2 auth working between Gitea and Drone.

Turns out, I setup the Redirect URI as the base http url instead of http://IP/login.

Finally managed to get it working, then activated my blog's git repo, which is a pelican website.

Then setup the drone runner in docker, which was simple.

I created a drone.yml file in my git repo, and pushed it, but nothing happened.

I looked at my local drone webpage, however it wasn't registering any activity from the git repo.

I looked at the git repo's settings and the webhook was configured to post at HTTPS://IP/what&ever.

Changed that to http://IP/what&ever and it started working!

So in my droneci.yml, I configured one step only, which was:

make publish

using my pelican docker image(qwe1/docker-pelican).

The makefile in the repo contains a step which clones the pelican plugins into the git working directory, because building my website requires some plugins.

Anyway, at this step I got permission denied errors.

The user inside my pelican:latest image is uid 1000.

Turns out, drone clones the source repo as root.

I found this issue on their forums:

post

I couldn't find a way to chown/chmod the cloned git directory to uid 1000 from root inside the droneci run, because I was already running as uid 1000 inside the build, so even trying I got permission denied errors.

I probably could have used a new tag inside my image that has sudo and add uid 1000 as a passwordless sudoer but that seemed excessive for this use case.

So instead I made a new tag which runs as root(yay, great) and my test ci managed to build my website on my 23rd try!

What a waste of time.

To-do?

Add a proper hostname to Drone configuration and start using https and hostnames instead of http and ip-s.

links

social