Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ci teardown to cluster init #150

Merged
merged 41 commits into from
Jan 12, 2022

Conversation

leonlnj
Copy link
Contributor

@leonlnj leonlnj commented Jan 7, 2022

Summary

Refactor existing Turing CI workflow, to remove tear down of cluster and do it as an e2e test part of cluster-init workflow.

Modification

.github/actions/cluster-init/action.yaml - New github action to be called by both Turing and cluster-init workflow to init the cluster. It will contain inputs to optionally build an image or to use an built jar.
The steps involved are:

  1. Setup k3d cluster
  2. (Optional) Build and save Cluster-Init Image
  3. Push image to local registry
  4. Install cluster

.github/workflows/cluster-init.yaml - Updated to include an e2e test.
Steps

  1. Trigger cluster-init github action
  2. Deploy an knative service for smoke test
  3. Tear down infra

.github/workflows/turing.yaml - Extracted installation of cluster as github action and to call the action instead. Removed tearing down of cluster.

@romanwozniak
Copy link
Contributor

@leonlnj I understand that this is a draft PR, but in case you haven't considered it yet, then my early feedback would be to share common cluster setup steps between cluster-init/test-e2e and turing/test-e2e workflows with a custom Github Action. This action can encapsulate repeated steps of starting up k3d cluster, adding cluster-init Docker image into a K3d's local image registry, and cluster provisioning with the cluster-init job.

gojek/turing already contains one custom action here: https://github.com/gojek/turing/blob/main/.github/actions/release-rules/action.yaml

@leonlnj
Copy link
Contributor Author

leonlnj commented Jan 10, 2022

ah thanks, i was still looking around on how to extract common code, that helps!

@leonlnj leonlnj closed this Jan 11, 2022
@leonlnj leonlnj reopened this Jan 11, 2022
@leonlnj leonlnj self-assigned this Jan 11, 2022
@leonlnj leonlnj requested a review from a team January 11, 2022 09:09
@leonlnj leonlnj marked this pull request as ready for review January 11, 2022 09:09
Copy link
Contributor

@romanwozniak romanwozniak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a suggestion on how to make cluster-init workflow aligned with the main Turing CI workflow (to structure it as build -> test-e2e -> publish). The rest looks good!

@leonlnj leonlnj force-pushed the update_ci_teardown_to_cluster_init branch from ef5c896 to 7d2bbd0 Compare January 12, 2022 09:41
@leonlnj leonlnj merged commit f242af5 into caraml-dev:main Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants