Skip to content

Automate building and deploying when merging to main branch #35

@VigneshVSV

Description

@VigneshVSV

Since there is no unit testing right now, we skip to building and deploying stage.

Rough steps:

  • Add a job that builds the image when a merge request is created. Further it should be tested if the docker image can be built
  • Once merged, recreate the docker image and auto deploy using webhooks (< ask for credentials >)

UPDATE (taken from comments below):

Since I moved the deployment to kubernetes, one could deploy using the helm chart in https://github.com/hololinked-dev/vps-kubernetes-cluster/tree/main/cluster/manifests/helm/apps by integrating in skaffold https://github.com/hololinked-dev/vps-kubernetes-cluster/blob/85c6dddee62192468dbc922152fcfb5275459356/skaffold-apps.yaml#L101-

Also feel free to add a skaffold.yaml or helm charts in the current project so that deployment is carried out using local skaffold configuration rather than a configuration in another repository.

An example of a local skaffold.yaml is in the docs repository: https://github.com/hololinked-dev/docs-v2

I added a git sparse checkout of the helm charts from the vps-kubernetes-cluster repo with just the relevant helm charts (although for solving the issue, adding the full git submodule is enough). Then I copied the skaffold config (which is linked above) into a local skaffold.yaml. For deployment, then I would simply do "skaffold build" & "skaffold deploy" within the CI (better as separate jobs instead of skaffold run which combines them).

Metadata

Metadata

Assignees

Labels

devopsThis issue deals with devopsgood first issueGood for newcomers

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions