It is for discussiion in argo-workflows forum
It is just my understanding now, can be totally wrong ;-)
Here gives a short explanation for user wants to use argo workflow as alternative for your CI framework (gitlab-ci, github actions, travis-ci, jenkins)
argo workflow is not a complete CI solution, it needs other compoments to fullfil your tasks. it is cloud native workflow execution engine
If you want to have complete simple solution quickly, recommended to use "jenkins + argoworkflow"
(TODO) Getting started python project using argoworkflow
Let's take a look at how CI general works, and how argoworkflow and other ci works in this area
- trigger: when the pipeline can be triggered, it needs to monitor git repo, branch, file changes
- token: how to access git repo (pull/push)
- workspace: how to share the data across steps
- archive (optional): how to visible the result (like unit test result)
argo-workflow doesn't cover this, you can use argo-events or webhook to trigger the flow, for different type of git repo, solution could be different.
If you are familiar with jenkins, it could be good choice as well to have jenkins in front, since it has lots of mature plugin to cover it.
anyway, it is not nature enough like github action and gitlab-ci
for public repo, just git clone, see sample input-artifact-git.yaml
otherwise it needs token to access, which leads to secrets and sealedsecrets
for github action, it is VM based, shared workspace via volume sharing, for argo workflow, u need to arrange pvc to be shared
see example ci.yaml, this is a good start!
all ci framework has different solutions for it, be prepared.
using extra service like nginx/artifactory could be good simple solution.
TODO
Use jenkins plugin mechanism to get triggered and inject flow to argo workflow
I do hope argoproject can create argo-ci project again to focus on providing complete CI solution
- integrate needed components (argo-events / argo-workflow)
- create extra service or enhance argo workflow to make key data are default without extra parameters (token, pvc)
- extra UI system (ui for archives/logs/reports ..)
- better "plugin" system like github action marketplace, argo-workflows-catalog still has long way to go
- argo-ci (replaced by argo-events now)
- webhook in argo-workflow: argoproj/argo-workflows#2667
Getting started with argo ci workflow for golang project
argo workflows is a nice cloud native workflow execution engine, surely it can work like normal CI engine though with different setup.
Below is a simple guideline using official documentation and examples
Installation
Surely you need one kubernetes cluster installed with argo server and argo-cli locally, see argo workflows quick start
For client at mac, I use brew command to install directly, it default uses your kube config without extra token to access argo server
Getting started with golang project for CI
The example yaml file is ci.yaml@99359a0950, so the lines I indicated below is always correct.
In short, do below
Use argo-ci namespace
since
argo
namespace is used to install argo server, I recommend to use another namespace for pipeline executiongit checkout
It is stated in Hardwired Artifacts, git is supported is built-in support already, which is missed from beginning.
it is in ci.yaml#L55
the
repo
andrevision
can be passed with parameters as template concept, which is skipped here.workspace
workspace is managed by volumes, which is kubernetes pvc concept, which needs to be specified in each step. depends on your storage in your cluster, it could be nfs or others as default
Further check
You can further check with argo workflow templates, cron workflows and all in quick-start
Reference