Skip to content

Introduce new subcommand to check availability of DC files in repos #78

@tomschr

Description

@tomschr

Situation

We all know this: when time is limited, we forget things. This could lead to a situation where the DC files in the config dont't reflect the current state in the Git repo.

Use Case

Before we should start a build we need to check if all DC files are available. This avoid broken builds.

Possible Implementation

Introduce a new CLI subcommand status, verify or check which could determine whether a DC file is available in a repo.

The potential implementation could look like:

  1. Clone or update the cached repos (this code is already available). We can use the permanent, bare repo and use git --git-dir=DIR ls-tree --name-only -r BRANCH. No need to clone the bare repo.
  2. Load or access the XML config tree.
  3. Iterate over all deliverables and extract the DC filename:
    a. Determine the repo and the branch of the deliverable
    b. Check if the DC filename is available in the repo.
    c. Store the result.
  4. Collect all results of the check and output all files that couldn't be found. The result should contain the repo, branch, and the DC filename that isn't available.

Optimization

Perhaps one way to do it to group the deliverables per repo and branch and check them in one go. This avoids switching between repos and branches all the time.

Relationship

Maybe this needs to be grouped with #9

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions