We have a set of shared resources that we want to access in our build jobs, and concurrency groups seem like the ideal way to make sure that we don’t exceed our maximum number of simultaneous jobs.
However, ideally we’d like to be able to tell which job is currently running. For example, in this scenario:
- command: "tests.sh" concurrency: 5 concurrency_group: "tests"
I would like the running build to know which number job it is out of the 5 possible jobs.
This functionality already exists more or less exactly as I would like it in the parallelism feature - you get two env vars that give you the number of total parallel jobs and which one of those jobs is represented by the current build:
Is this possible and I’m not seeing it, or is this something we can get simply another way?