Skip to content

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 04 Nov 03:32
· 51 commits to main since this release

Graphwake CI agent v0.1.0

First release of graphwake, the CI agent that sends your service's OpenAPI spec to Graphwake. Add one step to your pipeline; the agent works out what kind of build it is running in and acts on its own:

  • Pull request builds: the spec is stored as a draft, so teams that use your API hear about breaking changes before they ship.
  • Default-branch builds: the spec becomes the live spec and notifications go out. If the commit came from a pull request, that pull request's draft is settled as "merged".
  • Anything else (feature branches, tags, unknown CI): nothing is sent.

The agent never fails your pipeline: it always exits 0 and prints one line saying what was sent or why nothing was. The ingest key is never printed.

Highlights

  • Supported CI platforms: GitHub Actions, GitLab CI, Azure DevOps, Bitbucket Pipelines and Jenkins (multibranch). On any other CI you can set the context with --pr or --live.
  • Safe live publishing: before sending a live spec, the agent checks that the build is still the branch tip, so an old re-run or a pipeline that finishes out of order can't overwrite a newer spec.
  • Merge detection: finds the merged pull request through the GitHub API, or from the platform's default merge commit message. This works for merge, squash and rebase merges.
  • Configurable live branches: --live-branch main,release/* (globs allowed). The default is the platform's default branch.
  • Spec from a file or a URL, in YAML or JSON, sent as is.
  • Built-in integrations:
    • GitHub Action: graphwake/agent/github-action@v0.1.0
    • GitLab CI template: gitlab/graphwake.gitlab-ci.yml
    • Docker image: ghcr.io/graphwake/agent:0.1.0
    • The GitHub Action downloads the agent and checks its SHA-256 before running it.
  • Standard library only, no external Go dependencies.

Install

GitHub Actions

- uses: graphwake/agent/github-action@v0.1.0
  with:
    spec: openapi.json
    key: ${{ secrets.GRAPHWAKE_KEY }}

GitLab CI

include:
  - remote: https://raw.githubusercontent.com/graphwake/agent/v0.1.0/gitlab/graphwake.gitlab-ci.yml

graphwake:
  extends: .graphwake-upload
  variables:
    GRAPHWAKE_SPEC: openapi.json

Docker (Jenkins, Bitbucket, anything else)

Pass your CI's environment variables through with -e so the agent can detect the build (see the README for the list for each platform):

docker run --rm -e GRAPHWAKE_KEY -v "$PWD:/w" -w /w ghcr.io/graphwake/agent:0.1.0 upload --spec openapi.json

Binary

VERSION=0.1.0
BASE=https://github.com/graphwake/agent/releases/download/v$VERSION
ARCHIVE=graphwake_${VERSION}_linux_amd64.tar.gz
curl -fsSLO "$BASE/$ARCHIVE" && curl -fsSLO "$BASE/checksums.txt" &&
  sha256sum --check --ignore-missing checksums.txt &&
  tar -xzf "$ARCHIVE" graphwake &&
  ./graphwake upload --spec openapi.json || echo "graphwake: agent not run, spec not sent"

See the README for every option and for per-platform setup.

Assets

Platform amd64 arm64
Linux graphwake_0.1.0_linux_amd64.tar.gz graphwake_0.1.0_linux_arm64.tar.gz
macOS graphwake_0.1.0_darwin_amd64.tar.gz graphwake_0.1.0_darwin_arm64.tar.gz
Windows graphwake_0.1.0_windows_amd64.zip graphwake_0.1.0_windows_arm64.zip

SHA-256 checksums are in checksums.txt. The multi-arch Docker image ghcr.io/graphwake/agent:0.1.0 (also :latest) is published for linux/amd64 and linux/arm64.

Notes

  • Each ingest key belongs to one service. If a repository has several services, run the step once per service, each with its own spec and key.