A package repository typically holds a set of packages, each of which can have multiple versions. Package repository material allows Go to trigger a pipeline(s) when a newer version of a package is published. Package repository and package are represented as PackageRepository and PackageDefinition respectively in Go.
PackageRepository consists of name, id, list of ConfigurationProperty represented as Configuration, list PackageDefinition represented as Packages and PluginConfiguration which controls PackageRepository.
PackageDefinition consists of name, id, list of ConfigurationProperty represented as Configuration.
Configuration consists of list of ConfigurationProperty. Every ConfigurationProperty consists of key name and value, value could be encrypted if property is secure.
PluginConfiguration for a PackageRepository specifies plugin which is going control Configuration and communication with actual package repository.
PackageMaterial captures association between PackageDefinition and a Pipeline. Each PackageMaterial will be uniquely identified by combination of PackageRepository and PackageDefinition Configuration. Plugin associated with PackageRepository will decide if a ConfigurationProperty should be considered to uniquely identify PackageMaterial.
PackageMaterialPoller handles all communication between Go and PackageMaterial plugins.
When Go is required to capture Configuration a for PackageRepository, it will contact associated plugin for the configuration metadata. Configuration metadata is captured only once during Go server startup and same information is cached for later usage. Once Configuration for a PackageRepository is captured from user, it will be stored in config file and database.
When a MaterialUpdateService kicks-in, all unique PackageMaterial will be identified. For each unique PackageMaterial, associated plugin will be invoked for the latest revision. All the Configuration of PackageMaterial will be sent to plugin during this invocation. Once plugin return latest PackageRevision, the same will be persisted in database like any other material revision.