docs/current_docs/getting-started/ci-integrations/argo-workflows.mdx
Dagger provides a programmable container engine that can be invoked from an Argo Workflow to run a Dagger pipeline. This allows you to benefit from Dagger's caching, debugging, and visualization features, whilst still keeping all of your existing Argo Workflows infrastructure.
Dagger is invoked like any other tool, as one step of an Argo Workflow. Argo Workflows executes the Dagger CLI in a container and connects to the Dagger Engine running in a sidecar container.
kubectl profileThe following example runs the tests for a simple Go application using a Dagger Function. This project uses the Dagger Go SDK for CI.
Create a file called workflow.yaml with the following content:
A few important points to note:
unix://run/dagger/engine.sock is mounted and specified with the _EXPERIMENTAL_DAGGER_RUNNER_HOST environment variable.DAGGER_CLOUD_TOKEN environment variable is only necessary if integrating with Dagger Cloud.When you're satisfied with the workflow configuration, run it with Argo:
argo submit -n argo --watch ./workflow.yaml
The --watch argument provides an ongoing status feed of the workflow request in Argo. To see the logs from your workflow, note the pod name and in another terminal run kubectl logs -f POD_NAME
Once the workflow has successfully completed, run it again with argo submit -n argo --watch ./workflow.yaml. Dagger's caching should result in a significantly faster second execution.
:::note Argo Workflows is not a full-featured CI platform in itself, and won't directly respond to changes in repositories or have any automated triggers. To use Argo Workflows as a CI server, it should be paired with other tools like Argo Events. :::
Some resources from the Dagger community that may help are listed below. If you have any questions about additional ways to use Argo Workflows with Dagger, join our Discord and ask your questions in our Kubernetes channel.
Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes.