Skip to content

nikita-akuity/demo-workflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example application using Argo Workflows and Argo Events

Concept

This repository is based on a concept that any application has two parts:

  • Some docker images
  • Connections between these images

For example, here are diagrams of two different applications using the same set of docker images:

App1 DiagramApp2 Diagram

We keep images in the /images folder, and connection between them in the /manifests folder.

Folders Diagram

Continious Integration

There are two possibe ways to trigger the CI pipelines:

  • Update images
  • Update manifests

CI scheme

Update images

When change in /images folder is detected, GitHub triggers "Build and Promote" Action, which does build and promote for the each subfolder.

Build

  • Run unit tests
  • Build image
  • Tag image as ghcr.io/<repository_owner>/<subfolder_name>:
    • sha-<short-sha> if triggered event is push in branch
    • x.x.x if triggered event is tag vx.x.x
  • Push image to ghcr.io

Promote

The promote part can be removed and replaced with Argo CD Image Updater

Change a manifest

When change in /manifests folder is detected, GitHub triggers "Update Kustomize Base" Action which does promotion for the each subfolder.

Promote

  • Test manifests by running kustomize build <subfolder-name>
  • Checkout into main branch of nikita-akuity/demo-workflow-delivery repository
  • Update resources list in the apps/<subfolder-name>/env/base/kustomization.yaml, setting the first element of the list into "https://github.com/<repository>//manifests/<subfolder-name>/?ref=<sha>"
  • Push changes to nikita-akuity/demo-workflow-delivery repository

Images in this repository

All images are simple python based scripts:

  • greetings
    Take a string argument --names (e.g."name1,name2") and create a file
    hello name1
    hello name2
    
  • replace-text
    Take an input text file, replace hello to goodbye and save result into different file, e.g.
    goodbye name1
    goodbye name2
    
  • count
    Take an input file, count number of string occurances there and print the result number in stdout

Applications in this repository

Please check corresponding folders for the detailed description of each application: