Version Control
Last updated
Last updated
Version control is a crucial part of development. Puppetry has an integrated GIT client. Let's go together though a tutorial to examine how we can benefit of it.
First we take a look at how we can keep version history and navigate through it.
So we open a demo project and find Project/Git in the main menu.
Here we provide test author name and email. This information will be used to sign project version.
After saving the changes we go in the main menu and click on File / GIT / Initialize
We've just created a local GIT repository for our project. There will be kept snapshots of all the committed versions. Let's see how it works.
We open a suite and jump to Targets. We add anew target TEST_SELECTOR
with value .ver1
Next in the main menu we click on File / GIT / Commit
It opens New Commit modal window:
We name the commit as ver. 1 and click Commit button. Thus we get the first committed version.
Now we change the value of the target:
Then we commit the change (File / GIT / Commit).
Well, we have at least two versions of the project, so it makes some history. Let's see what we really have. Click on File / GIT / Checkout
It opens the following modal window:
Here we can see our previously committed changes. Now we just to the ver. 1 by clicking on Checkout link.
As we see TEST_SELECTOR
has value .ver1
of the previously saved version. As it says we are on a detached version. It's not the working one, so we can simply examine the contents and copy assets to paste into the head of history.
As we done we click on Checkout master button:
We've back to the working (last) version:
Version control is especially good for collaboration. Let's imagine we have QA engineers Samwell Tarly and Davos Seaworth. Sam is just committed a new version of the project and want to share it with Davos. For that guys need a remote repository. Let's take Bitbucket as service provider. So we register and create a new project:
That will bring us to the project page, which currently filled in with instruction to get started:
Now we go back to Puppetry, open Settings application menu and jump to GIT tab. Next we scroll down to Git Remote Repository section:
Here we need to provide the remote repository URL (from Bitbucket) and user credentials. Now we can synchronize our local repository to the remote one. Click File / GIT / Sync
It opens the following modal window:
As we confirm the synchronization we can refresh the page on Bitbucket:
We can see that our project artifacts now are available there.
Now Davos opens Puppetry on his machine and configure GIt:
He opens File / GIT / Clone in the main menu and gets the following modal window:
As he selects a destination and clicks on Clone, the version of Sam's project gets delivered to Davos' Puppetry.
Well, let's really collaborate. Davos changes the target again:
and commits the changes. Then he synchronizes with the remote repository (File / Git / Sync with remote ). Sam also synchronizes and sees the changes from Davos arrived: