Delete Executions in Rundeck – Wrapping it all Up

The previous posts have built the components to allow us to get projects, jobs, executions and remove executions from a Rundeck instance via its API. Now, we can just wrap them up :) The list of packages we need is:

For convenience, I’ve declared a bunch of constants we can use throughout the project: […]

Remove Executions in Rundeck

TL;DR: You have to get the executions’ list and remove the appropriate ones using hte API. Once we’ve managed to get the list of job executions, we can use the API to remove the relevant executions. The command is rather simple:

This method requires: server – the Rundeck’s server address port – the port […]

List Rundeck Jobs for a Project

Now that we Rundeck have a list of project names, we might want to see which jobs were created for each project. To do this, we need: The Rundeck instance’s address (server, port) The API key (api_key) A project’s name (project_name) First, we need to get the list of jobs for a project:

The […]

List Rundeck Projects

The other day I found out that Rundeck has an API which allows it to be controlled remotely by scripts. I’ve decided to write a script to list all the projects defined in a rundeck instance. Prerequisites Before you start, you need: The instance’s URL (server and port) An api key for the user Make […]

Initialise Python with GoCD

Following the deployment of a python-aware agent, we can start creating a pipeline. The first stage would be to: Clean up any previous data Create a virtual environment for python Install all dependencies from a requirements.txt file in our project Note: we assume the global pipeline settings and the Materials are properly set up (e.g. […]

Create a Python-friendly GoCD Agent in Docker

I’ve got two requirements to make GoCD useful: Run both the server and agent(s) in Docker Make it python-friendly Fortunately, GoCD offers Docker images (and Dockerfiles) for both, so it’s just a matter of extending it:

Unfortunately, pip is not quite adequate, so we re-install it from source. In the Dockerfile we add:


Handler for Global Logger in Python

While writing a command line tool, I’ve stumbled upon a strange situation: Some logs were written to a file while some others were printed to console. Quite annoying, particularly since every module I use has its own logger via logging.getLogger(__name__). After some investigation I found out you can access the global logger via logging.getLogger() (note […]

DRF: What is ‘source’ in Fields?

For a couple of days I’ve been trying to de-serialise a JSON to a model. My problem is the model and the JSON have different fields, mainly to keep the model pythonic and independent of a specific JSON source. So… I’ve been trying to use the source parameter for each Field in my serialiser to […]

Timestamp to DateTime Serializer Field for DRF

I’m currently trying to deserialize JSON data to a Django model. This is quite straight forward for most numeric fields, but I have a DateTime field which is stored as a timestamp in the original JSON. At first, I thought I should read the timestamp as an integer and convert it through post-processing. Then, after […]

Scroll to top