From 9ed5b4990b842d22f80170de87fa5cb85e0657a3 Mon Sep 17 00:00:00 2001 From: shupiaoyang Date: Tue, 25 Feb 2025 15:33:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AF=B9task=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=80=89=E9=A1=B9disabled=EF=BC=8C=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E7=A6=81=E7=94=A8=EF=BC=88=E8=B7=B3=E8=BF=87=EF=BC=89=E6=9F=90?= =?UTF-8?q?=E4=B8=80=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oedp/src/commands/run/run_action.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/oedp/src/commands/run/run_action.py b/oedp/src/commands/run/run_action.py index a76d563..9e52dca 100644 --- a/oedp/src/commands/run/run_action.py +++ b/oedp/src/commands/run/run_action.py @@ -55,6 +55,10 @@ class RunAction: return True def _run_playbook(self, task: dict, project: str) -> bool: + if 'disabled' in task and task['disabled'] == True: + self.log.info(f'Skipping task {task.get("name", "")}') + return True + self.log.info(f'Running task {task.get("name", "")}') workspace = os.path.join(project, 'workspace') playbook = os.path.join(workspace, task['playbook']) if not os.path.exists(playbook): -- Gitee