Open wesleyscholl opened 1 week ago
For review: @alexec @terrytangyuan @sarabala1979 @caelan-io
Thanks
I'm not sure how this adds any complexity or burden when there are more than 50 examples in this repo. The lack of documentation/example for CI/CD use case, makes this a much-needed addition, as described in the linked issue.
I would like this to make it clear that it isn't a useful CI/CD for workflows, as it doesn't build everything and doesn't run all of the e2e tests. It doesn't build the controller.
It also feels like we should demonstrate a proper DAG, rather than running the whole thing in series. Build and test the components in parallel.
I'm also not sure that workflows is a good thing to demonstrate this on, as it's pretty peculiar and demonstrates bad practice - e.g. the argo-cli you build in the earlier test isn't the one under test in e2e.
@tico24 did a talk at argocon about doing the whole thing, including fixing some of this https://www.youtube.com/watch?v=q2jAPJHfubA
On the other hand, it would be good to have something in here. Perhaps explain the scope of what is going on and the caveats better in the example. This isn't like most of the other examples in there - the readme section of it is longer than most of the other actual examples in total, so I'm not sure all comparisons apply.
I agree it would be good to have something in here considering that the last Argo workflows survery had CI/CD was the top use case and yet this repo lack an example for that. Like other examples (which are not meant to be full-fledged solutions), this is a great starting point...
@terrytangyuan
The example is a bit long, but it includes all the requirements from #8591. Would be it easier to maintain if it was split into separate CI and CD WorkflowTemplates
? Then link them in the docs.
@Joibel
Thanks for reviewing, this is the first CI/CD pipeline I've ever built. I want to modify this example to make it fully functional. For instance, adding this line to build the controller:
make controller kit STATIC_FILES=false
The workflow can implement a DAG to run all of the e2e tests in parallel and use the argo-cli
build in the e2e tests.
As for the scope and caveats, should more comments be added to the example to explain each step in the workflow?
A detailed example for implementing CI/CD pipelines to build Argo Workflows using Argo Workflows
Fixes #8591
Motivation
This issue was more than 2 years old and I wanted to contribute to the project. I also work with Argo Workflows everyday and I'm CAPA certified (Certified Argo Project Associate).
Modifications
WorkflowTemplate
example includes:CI
WorkflowTemplate
WorkflowEventBinding
WorkflowTemplate
WorkflowTemplate
WorkflowTemplate
WorkflowTemplate
WorkflowTemplate
WorkflowTemplate
Pipeline
WorkflowTemplate
CD
WorkflowTemplate
kustomize edit set image
WorkflowTemplate
WorkflowTemplate
WorkflowTemplate
Documentation & Configuration
WorkflowEventBinding
ServiceAccount
$ARGO_TOKEN
- Bearer Authorization forWorkflowEventBinding
Secret
WorkflowEventBinding
Role
RoleBinding
theRole
to theServiceAccount
forWorkflowEventBinding
RoleBinding
Secret
Secret
Secret
NetworkPolicy
Verification
Thoroughly tested the workflow:
[x] E2E Workflow
[x] Workflow steps
clone-repo
build-cli
create-exec-image
create-cli-image
run-tests
run-coverage
prepare-deploy-to-cluster-e2e-test
approval
docker-tag-push
update-manifests
commit-manifests
start-argocd-sync