You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 3
Next »
- Build Workflow example
- TODO: Make a flow chart ppt when done creating
- runner checks out repo to /sdf/group/ad/eed/ad-build/<user>/ → runners request to backend build cluster to start new build container -> builder pod starts a new container on our ad-build cluster -> write log to database?
- Steps broken down:
Runners request to backend build cluster, uses a rest api to send a POST request to 'build' endpoint with data like this:
curl -X POST \
'https://accel-webapp-dev.slac.stanford.edu/api/cbs/v1/component/build' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"organization": "str",
"componentName: "str",
"branchName: "str"
}'
- Backend builder pod talks to component database, grabs the build environment based off the organization, componentName and branchName
Backend builder pod then starts the build environment using build-deployment.yml with parameters (componentName, branchName, imageName)
- Use Declarative Management of Kubernetes Objects Using Kustomize | Kubernetes to configure the build-job.yml for the component
- build-job.yml will be a job with a volumeMount to s3df-dev-container-ad-group, and template parameters to label the container (componentName-branchName), and provide image name
- backend builder pod then logs to branches_in_development.
- backend builder pod sends the name of the build container thats running, back to runner,
- runners last job is to print the filepath to where the container is being built, and othe useful info like 'status'
- LAST STEP: if triggered by action (push to main/ pull request), then we want to provide the filepath to user of the build output, or at the least state its status (successful built / fail).
- Then have another workflow which does the build step, then adds onto it and does the testing.
- TODO: How to test after built? Do we want to spin up another container for testing? and/or use the already built module?