GitLab CI

Documentation on setting up a GitLab build job to sync with DevGrid.

Integrate DevGrid with your pipeline. Keep your entity data up to date, and push important pipeline metrics.

The below assumes you have a project variable of "DEVGRID_API_KEY".

image: node:latest

before_script:
  - curl -Lo /tmp/devgrid-cli.tar.gz https://pkg.devgrid.io/latest/devgrid-latest-linux-x64.tar.gz
  - tar -xvf  /tmp/devgrid-cli.tar.gz

lint-dg:
  script:
    - ./linux/devgrid-cli lint

send-build-event:
  variables:
      DEVGRID_API_KEY: $DEVGRID_API_KEY
      ENV: prod
  script: ./linux/devgrid-cli event -type test -entityShortId "abc" -attributes '{"type":"test"}'

sync-devgrid:
  variables:
      DEVGRID_API_KEY: $DEVGRID_API_KEY
      ENV: prod
  script: 
    - ./linux/devgrid-cli sync