Hi @salomvary,
I’m an engineer on the Pipelines team here at CircleCI. The environment variable CIRCLE_COMPARE_URL
is available in v2 of our config schema, but not in v2.1. We are aware that this is a problem for some folks, and we’re working to provide an upgrade path.
For v2.1 we are introducing something we call pipeline values
. You use these like job parameters, but they’re more like constants for your pipeline. The first set of pipeline values we are introducing contains all the values you need to define your own CIRCLE_COMPARE_URL
. These are available to use in production right now, but the public documentation hasn’t caught up yet.
jobs:
my-job:
environment:
CIRCLE_COMPARE_URL: << pipeline.project.git_url >>/compare/<< pipeline.git.base_revision >>..<<pipeline.git.revision>>
The full set of pipeline values available today are:
-
pipeline.id
- a globally unique id representing the pipeline -
pipeline.number
- a project unique integer id for the pipeline -
pipeline.project.git_url
- e.g. https://github.com/circleci/circleci-docs -
pipeline.project.type
- e.g. “github” -
pipeline.git.tag
- the tag triggering the pipeline (if any) -
pipeline.git.branch
- the branch triggering the pipeline (if any) -
pipeline.git.revision
- the current git revision -
pipeline.git.base_revision
- the previous git revision (if this is a PR)
We’ll work hard to get better documentation for this out soon, I promise. In the meantime I’ve opened a PR against our docs to make it clear that CIRCLE_COMPARE_URL
is not availble in 2.1, and point to this discuss post for more details.