Changeset View
Changeset View
Standalone View
Standalone View
lilybuild/lilybuild/ci_steps.py
| from buildbot.plugins import * | from buildbot.plugins import * | ||||
| from buildbot.process import buildstep, logobserver | from buildbot.process import buildstep, logobserver | ||||
| from buildbot.interfaces import IRenderable | from buildbot.interfaces import IRenderable | ||||
| from twisted.internet import defer | from twisted.internet import defer | ||||
| from .ci_syntax import ci_file | from .ci_syntax import ci_file | ||||
| from .helpers import rsync_rules_from_artifacts, get_job_script | from .helpers import rsync_rules_from_artifacts, get_job_script, normalize_image | ||||
| import re | import re | ||||
| import sys | import sys | ||||
| import json | import json | ||||
| SAFETAR_EXEC = '/lilybuild/lilybuild/safetar.py' | SAFETAR_EXEC = '/lilybuild/lilybuild/safetar.py' | ||||
| def on_success(step): | def on_success(step): | ||||
| return step.build.results == util.SUCCESS | return step.build.results == util.SUCCESS | ||||
| ▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | def job_to_steps(self, job, job_index): | ||||
| ) | ) | ||||
| artifact_steps += [download_job, unarchive_job] | artifact_steps += [download_job, unarchive_job] | ||||
| run_step = steps.ShellCommand( | run_step = steps.ShellCommand( | ||||
| name='Run script in container', | name='Run script in container', | ||||
| command=[ | command=[ | ||||
| '/lilybuild/podman-helper', | '/lilybuild/podman-helper', | ||||
| job.image or self.default_image, | normalize_image(job.image or self.default_image), | ||||
| self.src_relative, | self.src_relative, | ||||
| self.script_dir, | self.script_dir, | ||||
| self.result_relative, | self.result_relative, | ||||
| ], | ], | ||||
| workdir=self.work_root_dir, | workdir=self.work_root_dir, | ||||
| doStepIf=on_success, | doStepIf=on_success, | ||||
| ) | ) | ||||
| ▲ Show 20 Lines • Show All 243 Lines • Show Last 20 Lines | |||||