# Consolidated CI config ###### tags: `Design` # Goal: Provide a central upstream repository for CI that contains the configuration for linters, and pre-submit tasks. The central configuration will allow projects to share config and to establish a standard across projects. Customization per repo will also be allowed. ## original breakdown * Need a github public repo to store CI config * Projects: Pelorus, go-scrape-prow, minikube * Types of Tests in Common CI config * Lint: Pelorus, go-scrape-prow, minkube * Unit: * Integration: * Makefile - * Pelorus, go-scrape, minikube * Common Makefile template, and checks that the individual repo complies w/ the template. * Time estimate * 2 sprints * Party! / Demo ## Breakdown - in order of prerequisites ### git repo To get started a user's repo is fine for this task. A team owned repo in Konveyor is probably ideal * konveyor * Names * dev-conventions? * bar * buzz * code-conventions * common-conventions * common-dev-environment ### MakeFile * helpful course https://swcarpentry.github.io/make-novice/ MakeFiles in the each project repo is the next best place to start. Makefiles will handle the following functions. * install *any* rereqs * execute presubmit tasks * lint * config updates ( see pelorus ) helm chart version * TARGET NAMES: * reqs * execute - lint * execute - unit test * execute - all * cleanup Documentation and helpful links: * https://makefiletutorial.com/ * https://github.com/konveyor/pelorus/blob/master/Makefile * https://github.com/paulRbr/ansible-makefile * <wes> I don't know much about makefiles, please help me add to this</wes> ### Linters Any project we work with as a team should have a common linting config. Having a common linting config will improve code readability and usability. Any tooling should be subject to common linters: * bash * python * ansible * golang * etc. ### Goal for this sprint ( ends 4/04/2022) * each project has a makefile checked in * makefile can * install reqs * execute lint * excute cleanup Success is not a requirement for the first sprint. ### Owners | Task Summary| Owner | Notes | | ----------- | ----- | -------- | | Public repo | migi | Done: https://github.com/konveyor/common-ci-config | Makefile pelorus | migi | Done (Pelorus has [Makefile](https://github.com/konveyor/pelorus/blob/master/Makefile) - relevant parts are pretty similar to the common one, [common-ci-config](https://github.com/konveyor/common-ci-config) has sample Makefile together with sample python app that uses Makefile) | Makefile go-scrape-prow | hiteshwari | [go_scrape_prow](https://gitlab.cee.redhat.com/mig-integration/go_scrape_prow/-/tree/makefile/.konveyor/go) | Makefile minikube | nenad | [minikube-cluster with common-ci](https://gitlab.cee.redhat.com/mig-integration/minikube-cluster/-/tree/common-ci) | ci-common-config | migi | <nenad><br> Updated core common-ci config for easer language addition. <br>Added ansible common config with linter</nenad> [CODE](https://github.com/konveyor/common-ci-config/tree/main/makefile/.konveyor/ansible) |Sync remote common-ci-config|migi|Merged [PR #25 for minikube-cluster](https://gitlab.cee.redhat.com/mig-integration/minikube-cluster/-/merge_requests/25) ## Makefile design ## Need a common directory structure * Needs discussion.. ## next steps ( sprint 214 ) * sync remote common-ci-config * make target that pulls required files from common * common * setup -> in common-ci * make dev-env * cleanup -> in common-ci * remove the dev-env * tests * ( extended on the per-project make files) * either real tests or lint * sprint 215 goal will be to hook up what we have * pelorus is optional for 215, needs discussion * wes will look for $other project...