Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation of GitLab provider #4088

Merged
merged 4 commits into from
Aug 9, 2024
Merged

Initial implementation of GitLab provider #4088

merged 4 commits into from
Aug 9, 2024

Conversation

JAORMX
Copy link
Contributor

@JAORMX JAORMX commented Aug 6, 2024

Summary

This does a very minimal implementation of the gitlab provider.

It merely handles policy and enrollment. Which is progress. Note there is more to do to get this ready, but this is just the start. For safety, the gitlab provider is set behind a feature flag, so it cannot be enrolled.

Piggy backing on this, I also set the dockerhub provider to be behind a feature flag.

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@JAORMX JAORMX requested a review from a team as a code owner August 6, 2024 11:43
@JAORMX JAORMX marked this pull request as draft August 6, 2024 11:43
@coveralls
Copy link

coveralls commented Aug 6, 2024

Coverage Status

coverage: 53.844% (-0.6%) from 54.402%
when pulling 5e14224 on gitlab
into 082572d on main.

@JAORMX JAORMX force-pushed the gitlab branch 13 times, most recently from d527792 to 75b9d01 Compare August 8, 2024 10:55
@JAORMX JAORMX marked this pull request as ready for review August 8, 2024 11:00
@JAORMX JAORMX requested a review from eleftherias August 8, 2024 11:00
@@ -416,6 +417,18 @@ func getProvider(pstr string, token string, providerConfigFile string) (provifv1
return nil, fmt.Errorf("error instantiating dockerhub provider: %w", err)
}

return client, nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General thought (not a blocker for this PR) - this rttst.go needs to get changed every time we touch providers, the executor, and various other things. I wonder if there's some way we can structure this to avoid needing to change it so often. (Obviously the big challenge is that needs to work without the database so it can't reuse a lot of the abstractions we have in the server)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's the tricky side. Gotta give it some thought as we add more providers.

Copy link
Contributor

@eleftherias eleftherias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@JAORMX JAORMX merged commit 46202aa into main Aug 9, 2024
23 checks passed
@JAORMX JAORMX deleted the gitlab branch August 9, 2024 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants