ontrack-github-action-client 0.1.7
Install from the command line:
Learn more about npm packages
$ npm install @nemerosa/ontrack-github-action-client@0.1.7
Install via package.json:
"@nemerosa/ontrack-github-action-client": "0.1.7"
About this version
Reusable low-level Ontrack GraphQL client for GitHub Actions.
npm login --scope=@nemerosa --registry=https://npm.pkg.github.com
npm install @nemerosa/ontrack-github-ingestion-build-links
const client = require('@nemerosa/ontrack-github-ingestion-build-links');
// logging: true or false or undefined
const clientEnvironment = client.checkEnvironment(logging);
// Performing the call
const result = client.graphQL(clientEnvironment, query, variables, logging);
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: "${{ secrets.ONTRACK_URL }}"
ONTRACK_TOKEN: "${{ secrets.ONTRACK_TOKEN }}"