Automating Drone Updates with Autoupdate

Date: Wed, Mar 8, 2023

Tag(s): Automating Drone Updates Autoupdate Automatic

Drone is a continuous integration platform that helps developers automate their build, test and release workflows. Keeping your software up-to-date is important for security and stability. With Chapati Systems Autoupdate, updating Drone CI has never been easier.

Configuring Autoupdate for Drone CI

To configure Autoupdate to update Drone CI, you need to add a section for Drone CI in the config file. Here is an example of what the config for Drone CI might look like:

[Drone]
update=True
composeDir=/opt/drone
containerization=podman
site=https://ci.kernel.fun
apiUrl=https://api.github.com/repos/harness/drone/releases/latest
preUpdateHook=
postUpdateHook=

In this example, we have set update to True to enable updates for Drone. We have also specified the directory where our Docker Compose file for Drone is located with composeDir. We have chosen podman as our containerization tool with containerization. The site and apiUrl options specify the URL of our Drone instance and the URL of the latest release on GitHub respectively. The preUpdateHook and postUpdateHook options allow us to specify commands that will be run before and after updating Drone.

Updating Drone

Once you have configured Autoupdate for Drone CI, updating it is as simple as running it as root user on your server with a command like the following one:

root@server:/opt/config# ./autoupdate --config=/opt/config/drone.ini

This will read the configuration file from /opt/config/drone.ini and perform the following steps:

  1. Fetch the latest release information from https://api.github.com/repos/harness/drone/releases/latest
  2. Compare the current version of Drone on your server with the latest version available on GitHub
  3. If there is a newer version, download the new Docker Images
  4. If specified, run of preUpdateHook before updating Drone
  5. Restarting of the Containers with the new Docker Images
  6. If specified, run of postUpdateHook after updating Drone

That’s it! You have successfully updated Drone with Chapati Systems Autoupdate.

With Chapati Systems Autoupdate, updating software like Drone has never been easier. By adding a simple config section for each piece of software you want to update and running a single command as root user on your server, you can keep your system up-to-date with minimal effort.

I hope this article helps you understand how Chapati Systems Autoupdate can benefit users who want to keep their continuous integration platform up-to-date.