Page MenuHomeSoftware Heritage

Use a volatile resource lock for host port 5080
ClosedPublic

Authored by lunar on Nov 14 2022, 4:02 PM.

Details

Summary

swh-docker-dev and swh-mirror/run-tests both uses Docker containers
bound to port 5080. One to test if the generated images work fine, the
other as part of the mirror stack being tested. To prevent issues,
we explicitly use a volatile resource lock in their pipeline
definitions.

See: https://www.jenkins.io/doc/pipeline/steps/lockable-resources/

We first transform swh-docker-dev from a freestyle job to a Pipeline job in
order to implement fine-grained locked.

Diff Detail

Repository
rCJSWH Jenkins jobs
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 32794
Build 51381: arc lint + arc unit

Event Timeline

lunar requested review of this revision.Nov 14 2022, 4:02 PM

Fix the issue by adding a level of indirection in the yaml (replacing the job
by an identical job-template, and instantiating it through a project).
It seems jinja2 templates aren't actually supported in direct job definitions,
only in job templates. Thanks to olasd for finding this out and suggesting a fix.

olasd added a subscriber: olasd.

Thank you!

This revision is now accepted and ready to land.Nov 15 2022, 2:56 PM