Changeset View
Changeset View
Standalone View
Standalone View
lilybuild/lilybuild/ci_steps.py
| Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | def run(self): | ||||
| job_prop = self.getProperty('lilybuild_job_prop') | job_prop = self.getProperty('lilybuild_job_prop') | ||||
| job = ci_file.CIJob.from_prop(job_prop) | job = ci_file.CIJob.from_prop(job_prop) | ||||
| job_index = self.getProperty('lilybuild_job_index') | job_index = self.getProperty('lilybuild_job_index') | ||||
| variables = yield self.get_ci_variables(job) | variables = yield self.get_ci_variables(job) | ||||
| should_run = True | should_run = True | ||||
| if len(job.rules): | if len(job.rules): | ||||
| should_run = False | should_run = False | ||||
| default_when = job.struct_raw.get('when', 'on_success') | |||||
| for r in job.rules: | for r in job.rules: | ||||
| try: | try: | ||||
| when = r.get('when', 'on_success') | when = r.get('when', default_when) | ||||
| if when == 'never': | if when == 'never' or when == 'manual': | ||||
| should_run_to_set = False | should_run_to_set = False | ||||
| else: | else: | ||||
| should_run_to_set = True | should_run_to_set = True | ||||
| rule_str = r.get('if') | rule_str = r.get('if') | ||||
| if not rule_str: | if not rule_str: | ||||
| # No condition == always true | # No condition == always true | ||||
| # TODO: `changes` rule | # TODO: `changes` rule | ||||
| ▲ Show 20 Lines • Show All 487 Lines • Show Last 20 Lines | |||||