feat: run AutoFlow workflows with glab instead of kas autoflow

What does this merge request do and why?

This MR moves the AutoFlow rig from the kas autoflow client to glab's autoflow workflow commands. The autoflow and autoflow:run tasks, the smoke test's hello workflow and the docs now run glab on the host. glab exchanges the rig's admin token for a gitlab-autoflow token on the rig's GitLab and calls AutoFlow's public listener through a port-forward.

The AutoFlow chart is dropping its API listener on 8153 and, with it, the kas autoflow client the rig uses today. Once the chart pin includes that change, the public listener is the only way in, and it only accepts token-exchange tokens.

Two things make the token exchange work on the rig. A new script enables the token_exchange_autoflow_audience feature flag, and the smoke test runs it first. AutoFlow is also given GitLab's external URL. Without it, AutoFlow expects the in-cluster address as the token's issuer and refuses every token Rails signs.

The token exchange is interim. IAM delegations will replace it as glab's credential for AutoFlow.

autoflow:host is gone, because AUTOFLOW_ADDRESS now points the tasks at the host kas in edit mode. start no longer waits, so run starts the workflow and then waits for its result. The integration autoflow job also runs on changes to .tool-versions and the admin token script, which the smoke test now depends on.

Running workflows needs GitLab 19.6, the first release with the gitlab-autoflow audience. glab's own calls depend on it, because the token exchange is how glab gets a token AutoFlow accepts. This MR has to merge before the AutoFlow chart pin that drops the API listener. The integration autoflow job passes on GitLab 19.6. On a local rig without the external URL, AutoFlow answers Unauthenticated: JWT validation failed.

References

Refs #147

How to set up and validate locally

  1. Enable fragments/caproni.autoflow.yaml in caproni.local.yaml and run caproni up.
  2. Run scripts/ci/smoke-autoflow.sh. It enables the flag and prints the hello workflow's result.
Edited by Timo Furrer

Merge request reports

Loading
Loading