//Cloudogu EcoSystem Docs

Configuration of the projects

The projects and project paths for the associated artifacts are configured in a configuration file in JSON format.

The projects are configured as an array. All configured projects are shown in the Baseline Dogu in the projects overview on the "Projects" page.

1. Modify the configuration

As a member of the Baseline Admin group, you are authorized to customize the project configuration in the JSON file. You can edit the project configuration directly in the Baseline Dogu by clicking on the button "Manage Projects", which you can find on the page "Projects".

Fixed element group

The location of the configuration file is configurable as a string in the etcd via the command cesapp edit-config baseline. The configuration path is <baseline_path>/projects_json_url.

2. Configuration of a project

You can define the following attributes in the configuration file of a project:

  • id
  • scm_url
  • full_qualified_repository_name *
  • additional_repository_names[]*
  • tag_regex*
  • nexus*
  • jenkins*
  • app_version*

* Attribute is optional.

For a more detailed definition of each attribute, see the following subsections.

2.1 Configuration of the project ID

Each project needs a unique name. The name of the project is defined in the id attribute:

  • Attribute key: id
  • Data type: String
  • Example: "id": "petclinic"

2.2 Configuration of the SCM URL

A baseline always needs access to an associated SCM repository. In the project configuration file the URL to the SCM manager where the repositories can be found must be specified using the scm_url attribute:

  • Attribute Key: scm_url.
  • Data type: String
  • Example: "scm_url": "https://ecosystem.cloudogu.com/scm"

2.3 SCM repository configuration

A baseline refers to a single state within the SCM repository. Via tags set in the SCM repository, possible baselines are identified there. In the project configuration file a SCM repository must be specified using the attribute full_qualified_repository_name:

  • Attribute Key: full_qualified_repository_name.
  • Data type: String
  • Example: "full_qualified_repository_name": "demo/spring-petclinic"

For unique identification the SCM repository is defined with its namespace: <namespace>/<repository name>.

2.4 Configuration of additional SCM repositories

For the identification of baselines it is optionally possible to specify additional SCM repositories to be considered:

  • Attribute key: additional_repository_names.
  • Data type: Array with strings
  • Optional
  • Example:
"additional_repository_names": [
  "demo/spring-petclinic-clone",
  "demo/spring-petclinic-additionals"
]

If one of these additional repositories has the same tag as the main repository at full_qualified_repository_name, both states are combined into one baseline.

Each SCM repository must each be specified with its namespace: <namespace>/<repository name>.

2.5 Configuration of SCM tags

Possible baselines are identified using tags. You can define the tags to be considered as a regular expression using the tag_regex attribute:

  • Attribute key: tag_regex
  • Data type: String
  • Optional
  • Example: tag_regex:"^.*"`

The tag, which is used to find the project states in the SCM repositories and the artifacts, is automatically used as name of a possible baseline.

2.6 Configuring Nexus artifacts

For a baseline, it is optionally possible to configure that one or more artifacts from a Nexus should be observed. When identifying baseline elements, these artifacts are then considered in addition to the states of a repository.

The configuration is done via the attribute nexus:

  • Attribute-Key: nexus
  • Data type: Struct
  • Optional
  • Example:
"nexus": {
  "url": "https://baseline.cloudogu.net/nexus",
  "nexus_artefacts": [
    {
      "repository": "maven-releases",
      "name": "petclinic JAR",
      "location": "org/springframework/samples/spring-petclinic/${tag}/spring-petclinic-${tag}.jar"
    }
  ]
}
2.6.1 Configuration of the Nexus URL

If artifacts from Nexus are to be considered for a baseline, the URL to the Nexus instance must be configured in the Nexus struct:

  • Attribute key: url.
  • Data type: String
  • Example: "url": "https://baseline.cloudogu.net/nexus"
2.6.2 Configuration of Nexus artifacts

If artifacts from Nexus are to be considered for a baseline, you should configure at least one artifact in the configuration file. The configuration is done as an array of Nexus artifact objects:

  • Attribute key: nexus_artefacts.
  • Data type: array
  • Example:
"nexus_artefacts": [
  {
    "repository": "maven-releases",
    "name": "petclinic JAR",
    "location": "org/springframework/samples/spring-petclinic/${tag}/spring-petclinic-${tag}.jar"
  }
]

A Nexus artifact object consists of the name of the Nexus repository, a name and the path of the artifact in the Nexus repository.

The artifact repository specifies the repository where the artifact can be found:

  • Attribute Key: repository
  • Data type: String
  • Example: repository: maven-releases.

The artifact name is displayed in the baseline overview to identify the artifact:

  • Attribute Key: name
  • Data type: String
  • Example: "name": "Petclinic JAR"

The path defines where the artifact is located in the specified Nexus repository:

  • Attribute key: location.
  • Data type: String
  • Example: "location": "org/springframework/samples/spring-petclinic/${tag}/spring-petclinic-${tag}.jar".

Since the path differs depending on the tag used, the expression ${tag} is used. This is automatically replaced with the used tag of a baseline when identifying the baseline artifacts.

2.7 Configuring Jenkins build log files

If you want to have a Jenkins build log file considered in the baseline, you can define this via the jenkins attribute.

To do this, you must configure the Jenkins build to automatically upload a Jenkins build log file into Nexus. The Jenkins build log file must be a Maven artifact with a log extension. This is identified for the baseline by the commit ID of the associated tag of the baseline.

When configuring the jenkins attribute, you then specify the Nexus URL and the Nexus repository:

  • Attribute Key: jenkins
  • Data type: Struct
  • Optional
  • Example:
"jenkins": {
  "nexus_url": "https://baseline.cloudogu.net/nexus",
  "repository": "maven-releases"
},

The nexus URL specifies the URL to the nexus where the repository containing the Jenkins build log files is located:

  • Attribute Key: nexus_url.
  • Data type: String
  • Example: "nexus_url": "https://baseline.cloudogu.net/nexus"

In the repository attribute you define in which Nexus repository the Jenkins build log file is to be found:

  • Attribute Key: repository
  • Data type: String
  • Example: repository: maven-releases.

2.8 App version configuration

In the configuration for a baseline there is the attribute app_version. This attribute is defined by the system automatically. You do not need to define a value for the attribute. The attribute is only required for internal, technical details and cannot be changed.

2.9 Example of a project configuration

The following example shows a complete project configuration with two projects petclinic and cas:

[
  {
    "id": "petclinic",
    "scm_url": "https://baseline.cloudogu.net/scm",
    "full_qualified_repository_name": "baselineTest/spring-petclinic",
    "additional_repository_names": [
      "baselineTest/summer-petclinic",
      "baselineTest/fall-petclinic",
      "baselineTest/winter-petclinic"
    ],
    "tag_regex": "^.*",
    "nexus": {
      "url": "https://baseline.cloudogu.net/nexus",
      "nexus_artefacts": [
        {
          "repository": "maven-releases",
          "name": "petclinic JAR",
          "location": "org/springframework/samples/spring-petclinic/${tag}/spring-petclinic-${tag}.jar"
        }
      ]
    },
    "jenkins": {
      "nexus_url": "https://baseline.cloudogu.net/nexus",
      "repository": "maven-releases"
    },
    "app_version": "0.5.0-1"
  },
  {
    "id": "cas",
    "scm_url": "https://baseline.cloudogu.net/scm",
    "full_qualified_repository_name": "baselineTest/cas"
  }
]

The project petclinic represents a project configuration with all optional attributes. In this project for collecting baseline elements additional SCM repositories, a Nexus artifact, and a Jenkins build log file are configured.

The project cas reflects the minimal project configuration. A baseline would consist only of the state of the defined repository, defined by an SCM tag.