Working with syncRepo
syncRepo resource is the heart of Shippable DevOps Assembly Lines since this resource is a pointer to the source control repository (called Sync repository) containing the files that define your DevOps Assembly Lines, namely, shippable.resources.yml, shippable.jobs.yml and shippable.triggers.yml.
When you add a syncRepo, Shippable creates a resource and an rSync Job automatically. We also add a webhook to your source control system for the repo so that we can trigger synchronization if you change the definitions of your Assembly Lines.
The name of the
syncRepo is the name of the repository appended to name of the branch with an
rSync Job is
syncRepo's name +
Note You should not add the same repository/branch as a sync repo more than once as it can lead to unexpected behaviors.
Adding a syncRepo
First, add a Subscription integration for the source control provider where your sync repository is located. Instructions are here for different providers:
Go to your Organization's page on Shippable. A list of all available Organizations can be accessed by clicking on the Subscriptions menu at the top left of your screen:
- On the top-right corner, click on the
Enable Projects or Add syncRepo).
- On the enable page, goto the last panel with heading
ADD A SYNC REPOSITORY.
- Complete the form:
Subscription Integrationdropdown shows the integration you created in the first step. If not, you will need to go through the flow of adding the integration.
Repodropdown shows all repositories in the source control you just connected with the integration. Choose your sync repository.
Branchdropdown shows all the branches for the above selected repository. Select the branch that contains your pipeline configuration files.
- Name your sync repository with an easy to remember name.
Flagsoptions, add flags that you want to add to this syncRepo and the rSync job created. You can add as many as you want
Default Flagcheckbox is checked by default. When this is checked all the resources, jobs or trigger will have a default flag(with same name as the rSync job's name).
- Click on Save to apply your sync repository configuration.
At this point, Shippable will create
syncRepo resource and
rSync job. After that rSync job will parse all configuration files in the repository and create your pipeline(s). You will see a visualization of the the jobs and resources from your
shippable.triggers.yml in the Single Pane of Glass (SPOG) (click on the
eye icon on the top-right corner on your organization's page and choose
Show SPOG view).
Editing a syncRepo
Once added, you can only edit a syncRepo to add a flag to it. Adding a flag will include that syncRepo in the SPOG view when you filter on that flag.
Click on the
syncReporesource. This will take you the history page:
You can add/change the flags here.
Deleting a syncRepo
Upon right-clicking on the
syncRepoin your SPOG, you will see an option to delete it. This is available only for this type of resource. All other deletes need to happen from the YML first.
Once you delete it, all objects that were defined in this
rSyncjob will be soft-deleted.
Make sure you have Deleted objects turned on in your view. Find the
syncRepoyou deleted and then hard delete it. Now all the Resources and Jobs that were defined in this repo are all permanently deleted. You cannot recover any data after this operation.
Restoring a syncRepo
- If you accidentally soft deleted a
syncRepo, you can restore it by going to the Deleted objects and clicking on Restore. All you objects will be restored. Please note that you cannot restore a
syncRepothat has been hard-deleted.