Skip to content

Commit 26f86c2

Browse files
committed
Adding hasSuccessExitCodes pipeline parameter.
1 parent 6c72394 commit 26f86c2

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

app/commands/runtimes/RuntimeImport.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ protected function configure()
131131
'producesFiles' => 'boolean',
132132
'hasEntryPoint' => 'boolean',
133133
'hasExtraFiles' => 'boolean',
134+
'hasSuccessExitCodes' => 'boolean',
134135
],
135136
];
136137

app/model/entity/Pipeline.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ public function overrideCreatedFrom(?Pipeline $pipeline): void
112112
"producesFiles" => false,
113113
"hasEntryPoint" => false,
114114
"hasExtraFiles" => false,
115+
"hasSuccessExitCodes" => false,
115116
];
116117

117118
/**

migrations/Version20240716161149.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ public function postUp(Schema $schema): void
112112
"UPDATE pipeline_config SET pipeline_config = :config WHERE id = :id",
113113
['id' => $pipeline['cid'], 'config' => Yaml::dump($config)]
114114
);
115+
116+
// also add hasSuccessExitCodes pipeline parameter
117+
$this->connection->executeQuery(
118+
"INSERT INTO pipeline_parameter (id, pipeline_id, `name`, discriminator, boolean_value)
119+
VALUES (UUID(), :id, 'hasSuccessExitCodes', 'booleanpipelineparameter', 1)",
120+
['id' => $id]
121+
);
115122
}
116123
}
117124

@@ -223,6 +230,13 @@ public function postDown(Schema $schema): void
223230
"UPDATE pipeline_config SET pipeline_config = :config WHERE id = :id",
224231
['id' => $pipeline['cid'], 'config' => Yaml::dump($config)]
225232
);
233+
234+
// also add hasSuccessExitCodes pipeline parameter
235+
$this->connection->executeQuery(
236+
"DELETE FROM pipeline_parameter WHERE pipeline_id = :id AND `name` = 'hasSuccessExitCodes'
237+
AND discriminator = 'booleanpipelineparameter'",
238+
['id' => $id]
239+
);
226240
}
227241
}
228242

0 commit comments

Comments
 (0)