greenkeeperio / greenkeeper-lockfile

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

greenkeeper-lockfile never gets triggered #208

Closed jsardev closed 5 years ago

jsardev commented 5 years ago

I don't get it how this package should work. This doesn't make any sense.

I trigger a TravisCI build on every new pull request. Important note: pull request , not push. Every new pull request on Travis is getting built by a merge of the default branch (master) and the pull request one. Travis tags the build as being built on master, not on some other branch. This results in a 'master' is not a Greenkeeper branch message and makes greenkeeper-lockfile completely useless, as it will never get triggered - on PRs branch is marked as master, on merge and finally push to master it's also obviously marked as master.

Example PR: https://github.com/sarneeh/reaptcha/pull/57 Example build: https://travis-ci.org/sarneeh/reaptcha/builds/422454239

Am I missing something or there's something wrong here? 😄

kylemh commented 5 years ago

I'm having the same issue. I followed documentation to the letter.

Example PR: https://github.com/OperationCode/front-end/pull/98 Travis file: https://github.com/OperationCode/front-end/blob/master/.travis.yml

Kornil commented 5 years ago

Same for me, tried rewriting the travis config for a week to make it work but it never triggered once, not even with the simplest config. It either ends with

see https://github.com/Kornil/personal-website/pull/10 on "details" in checks you'll see both errors at the end of the logs.

elwayman02 commented 5 years ago

My formerly working config is also exhibiting the master is not a Greenkeeper branch error now: https://travis-ci.org/elwayman02/ember-interactivity/jobs/422262174

Realtin commented 5 years ago

The 'master' is not a Greenkeeper branch message will be displayed on the travis pr run. Greenkeeper-lockfile only runs on the push (branch status). Having a CI branch status is a requirement for Greenkeeper.

@sarneeh greenkeeper-lockfile only runs on branches that are created by greenkeeper

@kylemh On the push run it says No dependency changed which is probably because you run yarn global add greenkeeper-lockfile@1but monorepos are only supported with greenkeeper-lockfile@2

@Kornil similar problem here. Since this was a monorepo release it might require greenkeeper-lockfile@2. version 2 is tagged as nextrelease and not latest therefore has to be explicitly installed with the @2

@elwayman02 this is a pr travis run which bases of the master branch and therefore greenkeeper-lockfile does not run. I checked a push/branch run and there the lockfile was updated.

We are currently working on supporting Lockfile updates natively within Greenkeeper. ✨ 🌴

jsardev commented 5 years ago

@Realtin Thanks for the explanation! I guess it's more of a problem about how TravisCI works and how it informs its users. It's really confusing how Travis handles branches on pr/push runs.

kylemh commented 5 years ago

@Realtin I don't have a monorepo. Just a single package.json at the root of a single client-side application.

I will try to resolve this by changing to version 2 regardless.

kylemh commented 5 years ago

@Realtin bumped to version 2 and it didn't change behavior.

Am I unable to use --freeze-lockfile?

https://github.com/OperationCode/front-end/pull/118

Removing --freeze-lockfile gets it working. I guess I'll create a different build process for greenkeeper branches 👍

Hoping to really nail the config so I can contribute to Greenkeeper examples.