Skip to content

Commit

Permalink
Merge branch 'master' into ci-codeship
Browse files Browse the repository at this point in the history
  • Loading branch information
janl authored Oct 18, 2017
2 parents 1ab2657 + 6ce1748 commit b63eb16
Show file tree
Hide file tree
Showing 13 changed files with 173 additions and 349 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ After [enabling Greenkeeper for your repository](https://github.com/integration/

**First [create a GitHub access token with push access to your repository](https://github.com/settings/tokens) and make it available to your CI's environment as `GH_TOKEN`**.

If you use Travis CI, you may add the token using the [CLI app](https://github.com/travis-ci/travis.rb) as follows: `travis encrypt GH_TOKEN=<token> --add`

Configure your CI to use the npm/yarn version you want your lockfiles to be generated with before it installs your dependencies. Install `greenkeeper-lockfile` as well.

Configure your CI to run `greenkeeper-lockfile-update` right before it executes your tests and `greenkeeper-lockfile-upload` right after it executed your tests.
Expand Down
4 changes: 3 additions & 1 deletion ci-services/circleci.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const _ = require('lodash')

const env = process.env
Expand All @@ -7,5 +9,5 @@ module.exports = {
branchName: env.CIRCLE_BRANCH,
firstPush: !env.CIRCLE_PREVIOUS_BUILD_NUM,
correctBuild: _.isEmpty(env.CI_PULL_REQUEST),
uploadBuild: env.CIRCLE_NODE_INDEX === '0'
uploadBuild: env.CIRCLE_NODE_INDEX === `${env.BUILD_LEADER_ID || 0}`
}
2 changes: 2 additions & 0 deletions ci-services/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const _ = require('lodash')

const tests = require('./tests')
Expand Down
2 changes: 2 additions & 0 deletions ci-services/jenkins.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const env = process.env

const _ = require('lodash')
Expand Down
2 changes: 2 additions & 0 deletions ci-services/tests.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const env = process.env

module.exports = {
Expand Down
4 changes: 3 additions & 1 deletion ci-services/travis.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const env = process.env

module.exports = {
Expand All @@ -11,5 +13,5 @@ module.exports = {
// Is this a regular build
correctBuild: env.TRAVIS_PULL_REQUEST === 'false',
// Should the lockfile be uploaded from this build
uploadBuild: env.TRAVIS_JOB_NUMBER.endsWith('.1')
uploadBuild: env.TRAVIS_JOB_NUMBER.endsWith(`.${env.BUILD_LEADER_ID || 1}`)
}
2 changes: 2 additions & 0 deletions ci-services/wercker.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const gitHelpers = require('../lib/git-helpers')

const env = process.env
Expand Down
2 changes: 2 additions & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const _ = require('lodash')
const relative = require('require-relative')

Expand Down
2 changes: 2 additions & 0 deletions lib/extract-dependency.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const _ = require('lodash')

module.exports = function extractDependency (pkg, branchPrefix, branch) {
Expand Down
2 changes: 2 additions & 0 deletions lib/git-helpers.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const exec = require('child_process').execSync

const _ = require('lodash')
Expand Down
Loading

0 comments on commit b63eb16

Please sign in to comment.