Just a note that the referenced project I stood up is in reality pre-pre-MVC-1. Just needed to get something down due to the every increasing requests - especially from partners who are experienced at building these CI integrations across all major players in the CI tooling space.
Marcel Amiraultchanged the descriptionCompare with previous version
changed the description
Marcel Amiraultchanged the descriptionCompare with previous version
I'd like to get some more eyes on this. I mentioned this in slack, but probably should have pinged directly here. I am willing to write up an initial first draft of guidelines for external template contributions, but can't answer all the questions above.
I guess the key initial questions I'd like answered:
Is it OK to add all these to lib/gitlab/ci/templates? (I think it's yes, but worth asking if we need a subfolder)
How can we ensure a smooth and standardized review process?
Can we request that the partner demonstrates the template works in their own GitLab group/project, with a green pipeline, before pinging for a template review?
After a technology partner's template is merged into the repo, what will the maintenance process be like?
How do we verify that someone submitting a fix is from the technology partner? Or is it that anyone touch these templates after they are merged?
Is it OK to merge template changes that are considered "breaking"?
If there are problems in the template, are contributors expected to contact GitLab with issues, or contact the technology partner?
@marcel.amirault - I know @brianwald has some thoughts on integrating partner CI extensions - so inviting in.
As far as I know the current processing logic for locating "templates" has this unusual behavior of ignoring folder structure, but I can't locate it now. So this means required, but manual name uniqueness among all the files in the entire tree. A hard ask for anyone - but especially a partner.
I also opened this issue tracking the benefits of carefully selected new name.
There are also technically beneficial reasons that a partner having an entire folder to themselves would be helpful (or sub-sub folders for huge cloud partners where we deal with individual teams). Among them would be to allow deep include structures so partners can include script library code using includes, rather than forcing a container implementation. A working example and the backing rationale for this idea is covered in Script Code Libraries In Pure GitLab CI YAML and Complexity Oriented Architecture Decision Tree: Building GitLab Reusable CI/CD Extensions
On the review process I think it should be a "Continuous Testing" project with scheduled build & test - not just a review - for Level 2 partners. So that the partner gets "shifted left" early warning when a change in GitLab or their side unexpectedly breaks the integration. I think this would be too human intensive to ask of the first level of basic partnership.
On the maintenance process - as alluded to in the above - I think this should be shifted left for parnership levels 2 and 3 - neither GitLab nor the partner should be waiting for trailing indicators of quality problems because that means many partners are already experiencing a problem.
One new thing this discussion might need to consider is partners who submit CI or CD extensions that they would like co-customers to depend directly on. This is what we do with our own CI/CD code managed as product known as AutoDevOps and our CI / CD competitors provide such a framework as well. So far we seem to conceive of this as "Grab and Customize" starting points. It does not have to be spec'ed for being built now - but it could inform decisions now - such as whether a new folder would help if this "depend upon" mode was on the far out road map.
@marcel.amirault Can you changed the unordered list into an ordered list so it's easier to reference?
Is it OK to add all these to lib/gitlab/ci/templates? (I think it's yes, but worth asking if we need a subfolder)
Yes, both to keeping it there and having a subfolder.
Can we request that the partner demonstrates the template works in their own GitLab group/project, with a green pipeline, before pinging for a template review?
@marcel.amirault Thank you for creating an issue. I currently don't have enough time to fully walkthrough all of the context around this issue, but I'll leave a few important aspects.
License
All contents packaged in GitLab are licensed. If we apply the "MIT Expat" license to the content, we and any users also have a right to change the content. If the third party organization strictly wants to obtain the ownership of the content, they would need to explicitly define the license for the specific content.
Granting a third party for fully control (a part of) our codebase means we could also be vulnerable in some scenario. For example, if the content was introduced by a third party had a security vulnerability and caused a negative impact on active users in gitlab.com or on-premises instances, we don't have a right to fix the content nor reject it from our codebase.
I'd advise to loop in legal person from our organization as well. I could be wrong.
Marketplace
What's missing in our CI/CD templates is to allow any users/organizations to host their templates for end-users.
GitHub already has had market place for GitHub Actions. Each provided action defines the task spec, arguments, docker images, etc to provide the solutions for end-users. Third parties have a full control on their contents and actively maintain in order to drive the adoption of their technologies. To give you an rough idea, an individual action is more or less similar to our Job-level template. Ideally, we should provide multi-tenant CI/CD template registry and move all the lib/gitlab/ci/templates contents into gitlab.org namespace.
Do we need to package the templates into GitLab? I feel like the concept of third-party templates/marketplace inherently suggests it's maintained outside of the application itself.
What if we just had an external project on gitlab.com that hosted the templates and someone interesting including a job template would pull from an external remote? I recognize this would cause issues with airgapped/self-hosted but it's a vendor job that integrates with an external service anyway, it doesn't seem like a big issue - those who want to use them locally could also copy it down to their instance.
If we went this route.. then the question is: As a end-user, how can ensure I am pulling from the "Officially maintained third-party templates".
Perhaps we could add a key to includes: that enforces the path to the external repository where it's hosted.
@brianwald Yes, we've had discussions about some type of marketplace for templates recently, and this is the perfect use case for that concept. I can't find an issue specifically about it, but it'll be part of &4858 (closed)
Do we need to package the templates into GitLab? I feel like the concept of third-party templates/marketplace inherently suggests it's maintained outside of the application itself.
@brianwald is on target. As is currently designed, GitLab CI templates functions first as a starting off point.
The introduction of includes.template has muddied the waters here where users can now rely on CI templates that previously had no guarantees of availability, compatibility, nor maintenance. We have code review guidelines to address backward compatibility as a step but I feel that is not enough.
As a measure until we have versioned CI templates, I will propose that we only accept new CI templates where :
It is requested frequently, e.g Docker.
It is meant as a means for further integration, e.g. Auto-DevOps.
Additionally, I propose that we establish which CI templates are:
Actively maintained,
Functions purely as a template, and should be used with include.template at your own risk.
@tkuah As a starting point, every template that should not be used with includes should have a note right at the top that says as much, perhaps? And the same for those specifically designed to be used with includes.
As a starting point, every template that should not be used with includes should have a note right at the top that says as much, perhaps? And the same for those specifically designed to be used with includes.
@marcel.amirault Maybe something softer, like using includes at your own risk as these templates are subject to change even at minor versions ?
How about "Not designed or maintained to be an include"
Which is definitely true of any of those that aren't completely variable driven because they can't be used as includes anyway - you have to customize them to use them.
By adding "or maintained" you are implying that there is no "non breaking" guarantee when they peg to the current version.
(Later we need to discuss that it seems like we are implicitly thinking we have to guarantee not to break production with the latest commit of these - which is actually a DevOps versioning antipattern because the "latest" release of any dependency should only ever be consumed by the "Dev" environment of anyone depending on it - just like the entire rest of the software ecosystem.)
This is sort of tangential, sort of not. Quite a while back I suggested a search engine microformat be embedded in snippets so they could be located anywhere on any web server using google or a curator process we used to pull it into a list.
Maybe we could specify a metadata format in Markdown Frontmatter that would also serve as the "listing data". In the near term, google would pick up the burden of indexing for us.
If we eventually created a curation collection mechanism it would know which ones were found in our official locations and which ones in the wild - like this person's personal MarketPlace for GitLab CI components: https://r2devops.io/jobs/
Creating an MVC of the frontmatter in markdown would be very easy to do.
@dhershkovitch - if marketplace is right around the corner, I think perhaps which of the two modes are in the marketplace vision should be settled. I think many partners will be willing to use the model of directly depending on CI components because it is familiar from competitors and AutoDevOps and non-CI coding frameworks (like NPM packages).
Technology Partnerships will definitely be more strategic to partners if depending on CI extensions is available.
It definitely affects the technology partnership programs @mlebeau has been tasked with building out.
@DarwinJS agreed - this is a key aspect of the new tiered partnership leveling I'm proposing which would include integration complexity as a factor to distinguish "Registered" partners (those who are simply building a grab n' go template) from those partners who choose to build a more robust & dependable CI extension that would be partner-managed.
@dhershkovitch would be great to connect and discuss your vision of the marketplace so that we can align on other potential areas for tiering our partnership levels.
I'm going to close this as the guidelines have been expanded a lot with !56843 (merged) (and later !78403 (merged)), so I think the main purpose of this issue was resolved with that first MR. We can continue to iterate as needed.