frizbee icon indicating copy to clipboard operation
frizbee copied to clipboard

Add support for GitLab

Open dirsigler opened this issue 1 year ago • 3 comments

Please describe the enhancement

I would look forward if Frizbee could support GitLab .gitlab-ci.yml files. There two options which would benefit from the support are:

Job Images: Here we declare a Container Image and its version tag (e.g. latest, v4.2.0).

Includes and CI/CD Components: Here we declare a CI/CD Component, essentially a pre-defined job which should be run in the project and it's version

Solution Proposal

Frizbee should be able to look into .gitlab-ci.yml files and provide the checksum for declared Job images and included components.

Describe alternatives you've considered

Not supporting it?!

Additional context

No response

Acceptance Criteria

I am not sure about how much more difficult the support for includes are, therefore I would consider this feature done if GitLab Job images can be supported.

dirsigler avatar Jun 12 '24 13:06 dirsigler

hey @dirsigler, thanks for reaching out! 🙏

If I'm not mistaken the 1st part should already work with frizbee since it's similar to what is used in docker-compose files and such. Can you try it against your typical gitlab-ci.yml files and share your feedback?

I've tried the following -

default:
  image: ruby:3.0

rspec:
  script: bundle exec rspec

rspec 2.7:
  image: registry.example.com/my-group/my-project/ruby:2.7
  script: bundle exec rspec

and Frizbee produced the following -

default:
  image: index.docker.io/library/ruby@sha256:dcb8a8a6ee981f949da505cb9f4f15cde696e7bcb088955bc1f92f23a4cd7a72 # 3.0

rspec:
  script: bundle exec rspec

rspec 2.7:
  image: registry.example.com/my-group/my-project/ruby:2.7
  script: bundle exec rspec

which seems to make sense since the rspec 2.7 example is for a fake registry so it's okay to stay like that.

The 2nd part though is something that we don't support yet, but it should be possible 👍 Thanks for bringing this up!

rdimitrov avatar Jun 13 '24 21:06 rdimitrov

Hey @rdimitrov , thanks for the quick response. You are right, it works fine on my .gitlab-ci.yml for the job:image spec.

Then I think the CLI helper flags or at least the documentation could need some updates, because it seems (to me) like the heavy focus here relies on GitHub Actions support. I think a clear section about the support of GitLab (and probably other widely used platforms?) could attract more users.

dirsigler avatar Jun 16 '24 10:06 dirsigler

Hey @dirsigler I'm reaching out to check if this is still relevant to you.

My understanding is that you managed to get the desired behavior, but documentation could use some attention, is that correct? Please let us know if that's the case.

blkt avatar Oct 29 '24 17:10 blkt