FluxGlow

Does FluxGlow work with GitLab CI, CircleCI, Buildkite or Azure Pipelines?

Yes. FluxGlow has no integrations, so there are none to wait for. Any CI system that can run a shell command at the end of a pipeline can write a board file and upload it.

The pattern

  1. Add a last step that runs even when an earlier one has failed.
  2. In it, write a board file that says how each step ended.
  3. Copy the file to somewhere a browser can read it.

Running a step after a failure

Every CI tool stops at the first failure unless told otherwise, and every one has a way to say otherwise:

ToolHow to make a step always run
GitHub Actionsif: always() on the job or step. See the complete GitHub Actions example.
JenkinsA post { always { } } block. See the complete Jenkinsfile.
GitLab CIwhen: always on a job in the last stage.
CircleCIwhen: always on a step.
BuildkiteA step with depends_on and allow_dependency_failure: true.
Azure Pipelinescondition: always() on the step or job.

Knowing how each step ended

This is the part that differs most between tools, because each has its own way of passing results from one job to the next. One way works everywhere: run the steps from a single script, and let the script keep score.

pipeline.sh
#!/bin/sh
# Runs three steps in order, then writes a board that says how far they got.
build=idle test=idle deploy=idle

if make build; then
  build=ok
  if make test; then
    test=ok
    if make deploy; then deploy=ok; else deploy=bad; fi
  else
    test=bad
  fi
else
  build=bad
fi

cat > board.json <<EOF
{
  "title": "Checkout pipeline",
  "tag": "Build # ${BUILD_NUMBER:-0}",
  "nodes": [
    { "id": "build", "label": "Build", "state": "$build" },
    { "id": "test", "label": "Test", "state": "$test", "after": ["build"] },
    { "id": "deploy", "label": "Deploy", "state": "$deploy", "after": ["test"] }
  ]
}
EOF

# Upload board.json here. Then pass the pipeline's own result back to the CI tool.
[ "$deploy" = ok ]

The script runs as one job in any CI tool. It writes the board whichever step fails, and its last line hands the true result back, so the CI tool still marks the run as passed or failed.

Showing a run in progress

To turn an orb blue while its step runs, write the file before the step as well as after, with that node's state set to run. The board reads the file every 15 seconds, so steps that take less time than that will go by unseen.

One file, one writer

A board file is replaced whole each time, so whatever writes it has to know the state of every node. That is why the board is written at the end of the pipeline, where everything is known, rather than by each job separately.

The API planned at fluxglow.io is meant to lift that limit, letting each job change its own orb with one request. It is not open yet.

All questions