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 .ci_syntax import rules as ci_rules | from .ci_syntax import rules as ci_rules | ||||
| from .helpers import rsync_rules_from_artifacts, get_job_script, normalize_image | from .helpers import rsync_rules_from_artifacts, get_job_script, normalize_image, normalize_services | ||||
| from .phorge import SendCoverageToPhorge | from .phorge import SendCoverageToPhorge | ||||
| import re | import re | ||||
| import sys | import sys | ||||
| import json | import json | ||||
| SAFETAR_EXEC = '/lilybuild/lilybuild/safetar.py' | SAFETAR_EXEC = '/lilybuild/lilybuild/safetar.py' | ||||
| COVERAGE_EXEC = '/lilybuild/lilybuild/coverage.py' | COVERAGE_EXEC = '/lilybuild/lilybuild/coverage.py' | ||||
| ▲ Show 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | def job_to_steps(self, job, job_index, variables): | ||||
| 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', | ||||
| normalize_image(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, | ||||
| normalize_services(job.services), | |||||
| ], | ], | ||||
| workdir=self.work_root_dir, | workdir=self.work_root_dir, | ||||
| doStepIf=on_success, | doStepIf=on_success, | ||||
| # 2h timeout by default | # 2h timeout by default | ||||
| # TODO support timeout by each job | # TODO support timeout by each job | ||||
| timeout=60 * 60 * 2, | timeout=60 * 60 * 2, | ||||
| ) | ) | ||||
| ▲ Show 20 Lines • Show All 312 Lines • Show Last 20 Lines | |||||