Here’s a hypothetical scenario at a company: We have 2 repos that builds and deploys code as tools and libraries for other apps at the company. Let’s call this lib1 and lib2.

There’s a third repo, let’s call it app, that is application code that depends on lib1 and lib2.

The hard part right now is keeping track of which version of lib1 and lib2 are packaged for app at any point in time.

I’d like to know at a glance, say 1 month ago, what versions of app is deployed and what version of lib1 and lib2 they were using. Ideally, I’m looking for a software solution that would be agnostic to any CI/CD build system, and doubly ideally, an open source one. Maybe a simple web service you call with some metadata, and it displays it in a nice UI.

Right now, we accomplish this by looking at logs, git commit history, and stick things together. I know I can build a custom solution pretty easily, but I’m looking for something more out-of-the-box.

  • bahmanm@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    I believe you’re already on the right track.

    Your pipeline keeps track of the git commit that resulted in each build/deploy. You can use that (curl your CI/CD API and feed it into jq) to check out the build definition file for app (eg app/build.gradle) from that particular revision, and simply grep for lib1 and lib2. It should technically be possible to do this in a few lines of shell script.