Skip to main content

Build Farm with Kubernetes

This tutorial explains how to set up build farm with Kubernetes cluster

  1. Deploy OneDev server into a k8s cluster following this guide (no need to set up ingress and letsencrypt for our demonstration purpose)

  2. From OneDev projects page, add a project my-app

  3. Run below command from your local machine to create a react application:

    npx create-react-app my-app
  4. Change into directory my-app, and run below command to push code to OneDev:

    git remote add origin http://<onedev-external-ip>/my-app
    git push origin master:master

    When prompted, input administrator account specified above as git credential

  5. Visit files page of project my-app from OneDev, click link add build spec to bring up the GUI to add build specification. For typical projects, OneDev suggests default job templates like below:

    Add Job Wizard

  6. Just use the default template, and save the spec. Now you will see that a CI build is running as pods in your cluster.

    After Add Ci Job