How do I generate a change log between pipeline runs?

I’m currently using Gitlab CI/CD combined with Fastlane on our build machine to perform nightly builds of an iOS app, and push those builds to TestFlight on completion. So far, so good. However, I’ve been asked to generate a change log of the new commits that have gone into each night’s build.

Is it possible to get not just the CI_COMMIT_SHA of the current pipeline run, but also the SHA of the previous commit that the pipeline last ran for? That way, I could generate a change log of what’s new in the current pipeline run? After searching the docs on Gitlab.com, I’m coming up empty so far.

As part of the pipeline, we also generate a build manifest that includes the current commit SHAs used for the build, and save that as an artifact. So, if it was possible to download the most recent artifacts, I could also maybe just look at that manifest, but again, I’m not seeing a way to do that either.

Ideally, I’d like an environment variable in addition to the current commit SHA that contains the SHA of the last commit that a pipeline or job ran for.

I’m looking for similar solution and only sane way I see is to use GitLab API.

1 Like