Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Objectives

The objective of this exercise is to help new users of Syndeia graph analysis to formulate Gremlin queries to analyze their graph with the Syndeia Web Dashboard. Bitbucket is an open-source configuration-managed software code repository and DevOps tool developed by Atlassian. The specific learning objectives of this exercise are to create lists of

  • Bitbucket artifacts of a specific artifact type

  • Bitbucket artifacts in a specific Container (Git Repository)

  • Bitbucket artifacts connected as part of a specific Syndeia Project

Preparation

This exercise assumes the student has

  • Syndeia Cloud 3.3 or 3.4 installed with a valid user account, and

  • An existing Syndeia graph containing Bitbucket objects connected to elements in other repositories.

Because the content of your Syndeia graph will be different, the specific examples in the following exercise instructions are only a guide and example for your actions. It is generally advisable to carry out these exercises in a non-production repository, a “sandbox”, set up for training and practice purposes.

See the tutorials under Syndeia Cloud Web-Dashboard/Part 19 – Syndeia Cloud Graph Analysis for an overview of this feature.

Background – Syndeia Cloud Data Model

Figure 1 provides a simplified schema for elements in the Syndeia Cloud graph. All graph nodes are either Repositories, Containers, or Artifacts, where each Artifact is owned by a Container and Each Container is owned by a Repository. Each has a Type; the set of ContainerTypes and ArtifactTypes are owned by the Repository. How the Bitbucket data model maps to the Syndeia Cloud data model is discussed in the next section.

Figure 1 Syndeia Cloud Schema (simplified)

Background – Bitbucket

As of Syndeia release 3.4, the Syndeia Web Dashboard can extract and display some model information from a Bitbucket repository. Figure 2 shows a tree view of this information, with labels identifying the Bitbucket element types. Note the different icons. The label color coding indicates how the Bitbucket element type is mapped to the Syndeia Cloud element types: Repository (green), Container (red), and Artifact (blue). The Syndeia Bitbucket integration supports a large number of standard and custom Bitbucket artifact types, including Branch, Commit, Tag, and Source (files and folders). A more complete diagram of the Bitbucket data model as it is understood by Syndeia is available through the web dashboard help menu on the left.

It is also important to understand the limitations of graph queries with respect to the Bitbucket repositories. As of Syndeia 3.4, graph queries cannot extract the internal structure of a Bitbucket repository, i.e. they cannot be used to obtain the full structure of the Bitbucket repository or internal (intra-model) relations between Bitbucket artifacts. Graph queries are most useful in viewing inter-model connections from Bitbucket elements to other repositories.

Figure 2 Tree view of Bitbucket repository

Exercise

 

  1. Log on to the Syndeia Cloud Web Dashboard (see Video 1.9) and click on the Graph Queries icon on the left border.

  2. The first task is to compile a list of Bitbucket Artifacts of a specific type. Per Figure 1, ArtifactTypes are owned by (specific to) a Repository. We typically want to begin by creating a list of Artifact types available in such a Repository.

    1. If we use Query Builder (Figure 3), we select ArtifactType from the pull-down menu under Label.

    2. To restrict the list of ArtifactTypes to our current Bitbucket repository, we click Filters. We will filter by the name of our Repository, so we select Repository from the pull-down menu at the top marked Property of. Under Property Key, we select the Name property and under Property Value, we enter BitBucket @ Intercax. We then click the Plus (+) button to add the filter in the bottom list and the window should look similar to Figure 4. Click Close.

  3. Back on the Graph Queries page, click Run. The results, a list of all ArtifactTypes in BitBucket @ Intercax, may be displayed in table form as in Figure 5. Key ArtifactType properties in the table are Name and Key because we will use these in the next search. Click the Exports icon to export the list as a CSV file for future reference, if desired.

  • No labels