Synchronize between Subversion and Git using Continuous Integration Pipelines and Containers

I recently worked on a project for a client that (still) uses Subversion for their code repositories. Unfortunately they had no real short-term interested in migrating their code to Git, which left the team without such goodies as merge/pull requests, easy branching and all the other advantages that Git provides. Git actually has a built-in tool called 'git-svn'. Its main purpose is to migrate from Subversion to Git, or at the most do one-way syncing. In my case, two-way synchronization was the only option, since the Subversion repository was also used by another independent team.

After some experimentation I created a script that was able to do 2-way synchronization without too many problems, though this was just on my local machine, and we needed a solution for the entire team.

Jenkins, Containers & Gitlab to the rescue!
What I came up with was to build a Jenkins pipeline script that does the heavy lifting of synchronizing between git and subversion, while also integrating a Continuous Integration pipeline so that the main codebase is kept stable and thus *should* never break.

Fortunately the client was nice enough to provide us with a bare-bones RHEL 7 VM, and from there, I created a containerized CI/CD suite with containers for Jenkins, Gitlab, Sonar and a local Artifactory for snapshot build management. I created 2 Jenkins pipeline scripts for each project, one to do the git-svn synchronizations, and one to run a ci/cd pipeline that sets up an ad-hoc Docker container for the app (and one for the DB), and runs build & tests against them.

This CI/CD pipeline is triggered both by opened merge requests into the develop branch (no one is allowed to commit directly to develop/master branches), and by the git-svn sync pipeline script. The latter synchronizes between the master branch of git and the subversion repository and triggers the CI/CD pipeline in reverse order, that is, it rebases SVN code into master, and after the CI/CD pipeline successfully passes, merges the code into develop. This way, the develop branch is protected from broken build commits both from SVN and from feature branches.

I created a demo project with examples of the pipeline script and a full-fledged containerized solution you can use as a starting point:

[SOLVED] Ubuntu 11.10 Oneiric Ocelot upgrade: Waiting for Network Configuration

I upgraded my Ubuntu desktop yesterday from 10.04 to 11.10 and ran into some pretty significant problems.  If you get an error saying 'Waiting for Network Configuration', and it sits there until it finally goes on to a black page, then try the following:

CTRL+ALT+F1 should get you to the command line.  Do not try to get into the command line from the recovery option, or you will run into 'read only problems'.  From the command line, log in as root or a sudoer (your main user account should be in the group) and do the following things:

1. create directories /run and /run/lock,
2. move contents of /var/run into /run and /var/lock into /run/lock,
3. delete directories /var/run and /var/lock
4. create replacement simlinks; e.g. 'ln -s /run /var/run' and 'ln -s /run/lock /var/lock'

For less experienced users, you will need to type the following commands:

sudo mkdir /run
sudo mkdir /run/lock
sudo mv /var/run/* /run
sudo mv /var/lock/* /run/lock
sudo rm -rf /var/run
sudo rm -rf /var/lock
sudo rm -rf /run/dbus/*
ln -s /run /var/run
ln -s /run/lock /var/lock

After that reboot your computer:

sudo reboot

Ubuntu *should* now start up properly.