ci-info icon indicating copy to clipboard operation
ci-info copied to clipboard

Support for concourse

Open oliveti opened this issue 6 years ago • 7 comments

Hi,

IT seems this library does not detect concourse ci : https://concourse-ci.org

Would be great if you could support it.

Thank you.

oliveti avatar Mar 20 '18 21:03 oliveti

@oliveti looking through their documentation I think maybe we can check for the CONCOURSE_EXTERNAL_URL environment variable. But I'm not a 100% sure. Do you have any experience in which envs are always present?

watson avatar Mar 20 '18 21:03 watson

This environment variable is not available in tasks (where we can run scripts) for design reasons. Here is the list of environment variables accessible.

USER=xxx PWD=/tmp/build/b504838c/source HOME=xxx https_proxy=xxx http_proxy=xxx no_proxy=xxx SHLVL=1 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin _=/usr/bin/env

oliveti avatar Mar 21 '18 08:03 oliveti

Hmm... those are all very generic I think. Any idea of what else we can look at to detect the correct environment?

watson avatar Mar 21 '18 11:03 watson

I do not really know what could be used here. For now I export an environment variable (CI) in my docker image.

oliveti avatar Mar 21 '18 13:03 oliveti

Hm, yeah the issue is probably that since this is something that people run inside their own Docker images, there's no guarantee that they export/use any environment variables that we can detect.

I've opened an issue on the Concourse GitHub repo asking for help: concourse/concourse#2105

watson avatar Mar 21 '18 14:03 watson

@oliveti Concourse is asking about your use-case for knowing if your code is running inside Concourse. Would you mind going to the issue and comment?

watson avatar Mar 22 '18 15:03 watson

Hi,

Just did it here.

Thank you for the report to concourse.

oliveti avatar Jun 06 '18 09:06 oliveti