Page MenuHomeSoftware Heritage

Use a volatile resource lock for host port 5080
ClosedPublic

Authored by lunar on Mon, Nov 14, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

lunar requested review of this revision.Mon, Nov 14, 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.Tue, Nov 15, 2:56 PM