greenkeeperio / greenkeeper-lockfile

:lock: Your lockfile, up to date, all the time
https://greenkeeper.io
182 stars 73 forks source link

feat: Add generic CI support #246

Open Alorel opened 4 years ago

Alorel commented 4 years ago

Closes #245

This adds support for a generic CI provider configured entirely by environment variables.

Test repo and PRs: https://github.com/Alorel/test-generic-lockfile/pull/2, https://github.com/Alorel/test-generic-lockfile/pull/3

Usage (copied from README):

A generic CI setup allows greenkeeper-lockfile to function in any CI by getting all the data from environment variables. All the environment variables are required; boolean values should be provided as the string "true" or "false".

Variable Description Type Example
GK_LOCK_GENERIC_CI Set this to true to trigger generic CI boolean true
GK_LOCK_GENERIC_CI_REPO_SLUG Your GitHub repo slug string greenkeeper/greenkeeper-lockfile
GK_LOCK_GENERIC_CI_BRANCH_NAME Name of the current branch string greenkeeper/lodash-4.0.0
GK_LOCK_GENERIC_CI_FIRST_PUSH Whether this is the first push to the branch or not boolean true
GK_LOCK_GENERIC_CI_CORRECT_BUILD Is this a regular build (not a pull request for example) boolean false
GK_LOCK_GENERIC_CI_UPLOAD_BUILD Should the lockfile be uploaded from this build (relevant for testing multiple node versions) boolean true