Is it guaranteed that jobs ids of the same build are sequential (share data between the jobs purpose)?

I’m thinking of sharing the data between jobs by publishing the public artifact somewhere by parent job and then dependent jobs would read the link of the shared artifact by scanning log output of the parent job accessing it by such link https://api.travis-ci.org/v3/job/123456789/log.txt (123456789 is the id of the job that shares a data).

It looks like ids of the jobs are sequential, but it’s worth to ask.

  • (job number=123.1, id=45676) job uploads a file somewhere and prints download link to console.
  • (job number=123.2, id=45677) calculates a link to previous job’s log https://api.travis-ci.org/v3/job/45676/log.txt (45676 = 45677 - 2 + 1), downloads the log, locates a link to the artifact, downloads the artifact, etc.
  • (job number=123.3, id=45678) does the same as the previous one (45676 = 45678 - 3 + 1), etc.

So this would be a way to share dynamic public data between the jobs.

It is likely, but we make no guarantees.

Do note that job numbers are sequential, and they may suffice for your use case.

It’s unfortunately not possible to resolve log download link like this one https://api.travis-ci.org/v3/job/123456789/log.txt by only job number as that link includes job id value.

I’ve reviewed a related issue Using unified cache / Control cache identity and noticed that ids of 112 jobs of this build Travis CI - Test and Deploy with Confidence are sequential.