Page MenuHomePhabricator

Add CI checks for golang admission controllers
Open, LowPublic

Description

Per conversation with @hashar, this is a ticket to create a CI environment for the two Go repos we've made for the new Toolforge Kubernetes deployment.

The requirement is go 1.11+ (for modules) and to run two commands as checks:
go test ./… and golint ./… which will basically lint and run the tests that are defined wherever they are in the repos.

The repos in question are:

  • labs/tools/registry-admission-webhook
  • cloud/toolforge/ingress-admission-controller

Details

Related Gerrit Patches:

Event Timeline

Bstorm removed Bstorm as the assignee of this task.Oct 22 2019, 7:13 PM
Bstorm triaged this task as Medium priority.
Bstorm created this task.

I have bring this up to Release-Engineering-Team team meeting.

We do not currently have golang based containers in integration/config.git , though it is probably not too complicated to set one up.

I think containers for that is probably fine. Not everything has to jump over to the service pattern immediately, especially stand-alone things.

We do have a docker-pkg managed image for Go projects, docker-registry.wikimedia.org/golang:1.11.5-1. It's currently being utilized as a base image by Blubber, and it can likely be used here.

For the CI side, we can either define jobs directly in JJB for golint and go test, or utilize the deployment pipeline. The latter is quite flexible, even for test-only use cases that don't result in published images or deployed containers. I'm available to pair with @Bstorm on pipeline configuration if that's the right route for these projects.

Whichever one you folks want to use is alright by me. I don't know much about the deployment pipeline. These get deployed to a Cloud VPS-based Kubernetes cluster via the Toolforge docker registry, if that affects anything here. My big concern is getting tests run when reviewing a commit.

@Jdforrester-WMF 👋🏻 This is the ticket I mentioned at TechConf

I'll cookie-lick this one. ;-)

Do you have a repo you'd like to use this on now?

Change 552865 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[integration/config@master] [WIP] jjb: Add a golang jjb defintion for golint and go test

https://gerrit.wikimedia.org/r/552865

@Jdforrester-WMF Yup, these are the two repos. They both need the exact same config ideally.

labs/tools/registry-admission-webhook
cloud/toolforge/ingress-admission-controller
Jdforrester-WMF lowered the priority of this task from Medium to Low.Wed, Jan 8, 6:30 PM