Skip to content

nemerosa/ontrack-github-action-client

Repository files navigation

ontrack-github-action-client

Reusable low-level Ontrack GraphQL client for GitHub Actions.

Installation

npm login --scope=@nemerosa --registry=https://npm.pkg.github.com
npm install @nemerosa/ontrack-github-action-client

Usage

const client = require('@nemerosa/ontrack-github-action-client');

// logging: true or false or undefined
const clientEnvironment = client.checkEnvironment(logging);

// Performing the call
const result = client.graphQL(clientEnvironment, query, variables, logging);

Prerequisites

The following environment variables must be available:

  • ONTRACK_URL - the root URL of the Ontrack installation
  • ONTRACK_TOKEN - the Ontrack authentication token

Typically, these will be defined at repository or organization level and exposed to the GitHub Actions workflow:

env:
  ONTRACK_URL: "${{ vars.ONTRACK_URL }}"
  ONTRACK_TOKEN: "${{ secrets.ONTRACK_TOKEN }}"

See also

About

Reusable low-level Ontrack GraphQL client for GitHub Actions

Resources

License

Stars

Watchers

Forks

Packages