Meet Build Farm In Kubernetes Cluster
-
Deploy OneDev server into a k8s cluster following this guide (no need to set up ingress and letsencrypt for our demonstration purpose)
-
From OneDev projects page, add a project my-app
-
Run below command from your local machine to create a react application:
npx create-react-app my-app
- 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
- 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:
- Just use the default template, and save the spec. Now you will see that a CI build is running as pods in your cluster.
- Congrats! You've finished the tutorial. Continue to check more tutorials if you are interested.