CIRCLE_BUILD_URL environment variable changing for projects that use GitHub App & GitLab

Sorry for the delay:

  • Unfortunately there is no way to get the workflow URL in a way that’s agnostic to the integration type. The only option would be to manipulate the current string from CIRCLE_BUILD_URL. You could also construct it with CIRCLE_PIPELINE_ID and CIRCLE_WORKFLOW_ID but it will differ a bit between the integrations. ie. GitHub OAuth App will be “app.circleci.com/pipelines/github/org-name/project-name/pipelineID/workflows/workflowID” whereas a project using the GitHub App integration will be “app.circleci.com/pipelines/circleci/orgID/projectID/pipelineID/workflows/workflowID

  • I’m still a little confused why you believe that CIRCLE_BUILD_URL is misnamed? In this case we are using “build” and “job” interchangeably. And for all integration types, while the formatting is inconsistent, the result should be a URL to a specific job

  • VCS org name: yes you can use CIRCLE_PROJECT_USERNAME

  • VCS repo name: yes you can use CIRCLE_PROJECT_REPONAME

we have a goal to enable a way to get these types of values in an “integration-agnostic” way, but we don’t have that yet unfortunately. When we make progress on that, I’ll be sure to update this thread.