Skip to main content

Using Source Control with your Run Tool Projects

As the Run Tool and Data Sync project files are simply XML documents this makes it easy to use a source control system, such as Git.

Using a source control system ensures that your following a Dev Ops process, the same development process that is used in software development. This enables backup, change tracking and accountability.

In a traditional DevOps environment you would pull steps from the main production system to a local Dev machine. These steps, whilst in the Dev environment, would use separate connections so your production systems are unaffected by any changes whilst you are testing.

You would develop and test your steps within your Dev environment and once they have been shown to work as expected, the change can be signed off and pulled back into the main production branch. So long as the connections are named the same in each environment then it should just transfer over, otherwise you will just need to configure the endpoints to point at the right production system and you can carry on as normal.

We use Git for source control, however you can make use of any of your preferred source control providers.

Create a Local Repository

The following details assume you have installed Git onto your computer already. Details on installing git can be found on the Git website.

To create a local repository, open the Command Line terminal and enter in the path to your project directory e.g. cd C:/Users/user/RunToolProject.

The full script to use is:

git init
echo .ds/ >> .gitignore
git add .
git commit -m "initial commit"

Initialise Git in the Directory

Now you are inside the project directory type git init to create the .git folder to hold the repository files.

Ignore Files

Now we need to create a .gitignore file to hold all the files we do not want to track in the directory. We can do this directly from the command line and add the .ds folder at the same time by typing echo .ds/ >>.gitignore into the command line. Alternatively you can create a new text file and name it .gitignore and then add .ds/ to the file.

By doing this before we add the files it prevents any existing log files from being included in the first commit.

Add the Files

You then need to add the files you want to track. To add all the files in your directory you can simply type git add ..

Commit

To commit the changes type git commit -m "initial commit"

Remote Repository

To track this on a remote repository on GitHub you can follow the guide here.

You can now create and edit as you need to, just don't forget to commit your changes.