CIRCLE_COMPARE_URL is empty when running a workflow job

I want to use CIRCLE_COMPARE_URL to analyze the commits for my build, but it seems to be empty when running workflow jobs. It does seem defined for single (non-workflow) jobs.

Is this a not-yet-supported feature? Is there a time table for getting it available in workflow jobs?


I would love to use the tip suggested here: Get list of commits in build

Any update on the status of this?

I sm having the same problem, CIRCLE_COMPARE_URL is empty for all builds

I have the same problem here

is there any workaround?

Hey, just successfully implemented a workaround which makes use of the API:

LAST_SUCCESSFUL_COMMIT=`curl -Ss -u "$API_KEY:" $LAST_SUCCESSFUL_BUILD_URL | jq -r '.[0]["vcs_revision"]'`

You need to generate an API key which could be defined via environment variables.

Downside is that the algorithm only works for the latest build. In case you restart an older one, the change set will be empty.

@mfittko I’ve created this to help manage which packages/modules to deploy on circleci

I just came across this orb command. Huge, but looks promising. :sweat_smile:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.