executePipeline static method
Execute Pipeline
Implementation
static Future<void> executePipeline() async {
final config = Config().config;
final List<PipelineStepModel>? stages = config.pipelineSteps;
for (final stage in stages!) {
final String stageName = stage.name;
print('\nš Starting stage: $stageName');
final success = await _executeStep(
stage,
);
if (!success) {
print('ā Pipeline failed at step: $stageName');
return;
}
/// Upload artifact, if `outputPath != null && uploadOutput = true`.
if (stage.uploadOutput && stage.outputPath != null) {
// Upload artifact to Cloud.
await promptUploadOption(stage.outputPath!);
/// Generate QR code and link.
await generateQrCodeAndLink();
}
/// Notify slack, if `notifySlack = true`.
if (stage.notifySlack) {
/// Notify Slack.
await notifySlack();
}
print('ā
Stage completed: $stageName \n');
}
print('š Pipeline executed successfully!');
}