Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error merging to master: Circle doesn't provide CIRCLE_COMPARE_URL #13

Open
trezy opened this issue Dec 18, 2018 · 5 comments
Open

Error merging to master: Circle doesn't provide CIRCLE_COMPARE_URL #13

trezy opened this issue Dec 18, 2018 · 5 comments
Labels
bug Something isn't working

Comments

@trezy
Copy link

trezy commented Dec 18, 2018

Hey @wilau2, we're using this project for NES.css and it's been working great so far! However, we tried to release v1.0.0 this morning and hit a snag. The commitlint_range.sh script falls back to using the CIRCLE_COMPARE_URL environment variable if CIRCLE_PULL_REQUEST is false. However, when we merged our release PR to master both of those environment variables were false.

Do you have any recommendations on how to handle this? For now I'll probably just update the config to ignore the master branch, but I was wondering if you had handled it a different way?

Relevant links

@wilau2 wilau2 added the bug Something isn't working label Dec 18, 2018
@wilau2
Copy link
Owner

wilau2 commented Dec 18, 2018

Hi @trezy, I can check this tonight.

@trezy
Copy link
Author

trezy commented Dec 19, 2018

Thanks, @wilau2!

@wilau2
Copy link
Owner

wilau2 commented Jan 22, 2019

Hey @trezy,
After checking your build, my guess is that you used git rebase. The support was limited for git edge cases like this.

does not exist
rebase support is limited will compare against master
origin/master...72bb45d420a3182392e11841f4bc68f979dd806e

Are you still having the problem?

@virtuoushub
Copy link
Contributor

virtuoushub commented Apr 26, 2020

Hi @wilau2, not sure if it directly related to this issue, but it seems that project is still having some issues building via this CircleCI dependency (see nostalgic-css/NES.css#413 and nostalgic-css/NES.css#415).

I did my best to reproduce their observed build failure in my fork, but was unable to.

See:
* PR 413's failure in CircleCI
* PR 415's failure in CircleCI

Any idea why those failed?
[edit - observed build failures I mentioned were not related to this issue. ]

@virtuoushub
Copy link
Contributor

virtuoushub commented Jun 3, 2020

For people using this docker image in CircleCI 2.1+ @SecretBase found a fix for the missing CIRCLE_COMPARE_URL.

I did my best to summarize his findings and the fix below:

@SecretBase's research

...
CIRCLE_COMPARE_URL is not available in circle ci version 2.1 anymore
https://circleci.com/docs/2.0/env-vars/
https://discuss.circleci.com/t/is-circle-compare-url-still-a-thing/33366

So I just added an env var as example show at circle ci docs.
Hope this fix those noise when running commitlint ci job

https://circleci.com/docs/2.0/pipeline-variables/

...

Source: nostalgic-css/NES.css#425 (comment)

missing CIRCLE_COMPARE_URL fix

jobs:
  my-job:
    environment:
      CIRCLE_COMPARE_URL: << pipeline.project.git_url >>/compare/<< pipeline.git.base_revision >>..<<pipeline.git.revision>>

Source: https://discuss.circleci.com/t/is-circle-compare-url-still-a-thing/33366/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants