tidepool-org / tools

A place to put tooling and scripts that help when working on Tidepool stuff.
Other
11 stars 11 forks source link

Evolve CI to work with GitOps #73

Closed derrickburns closed 5 years ago

derrickburns commented 5 years ago

This is the first in a multi-step process to evolve our CI process to work with Kubernetes/GitOps.

Background

Each of the non-platform services pulls an artifact generating file from GitHub as a raw file. Then, it uses that file to generate artifacts. We want to generate Docker images and push them to DockerHub. Changing these artifact generating files is the place to do so.

Process

In this first step, we merge the two artifact generating files into one, but make three identical copies of that file to address the three distinct cases:

  1. create go tarballs and Docker images;
  2. create node tarballs and Docker images; or,
  3. only create Docker images (to be used with viz).

Ideally we could use symbolic links. However, without simultaneously changing all the services that use this code, this is not possible. Each service repo uses wget to retrieve these artifact generating files. Wget on GitHub raw files does not resolve symbolic links properly.

After this change is committed to master, we can commence the second step: to modify the service repos to retrieve the same artifact.sh file. Then, the service can pass in an argument to indicate which type of artifacts to create.

In the third step, after all modifications have percolated to all outstanding branches of all services, we delete the files artifact_go.sh and artifact_node.sh herein. That eliminates the duplication.

In the fourth step, when we have shifted completed to K8s, we modify artifact.sh to not create tarballs.

@pazaan I tested this on Hydrophone.