1
0
Fork 0
mirror of synced 2024-06-14 08:44:49 +12:00

Add build time to deployment

This commit is contained in:
Bradley Schofield 2022-10-10 16:24:40 +01:00
parent 676709e706
commit 380a45f987
2 changed files with 7 additions and 0 deletions

View file

@ -832,6 +832,7 @@ App::get('/v1/functions/:functionId/deployments')
$result->setAttribute('status', $build->getAttribute('status', 'processing'));
$result->setAttribute('buildStderr', $build->getAttribute('stderr', ''));
$result->setAttribute('buildStdout', $build->getAttribute('stdout', ''));
$result->setAttribute('buildTime', $build->getAttribute('duration', 0));
}
$response->dynamic(new Document([

View file

@ -82,6 +82,12 @@ class Deployment extends Model
'default' => '',
'example' => 'enabled',
])
->addRule('buildTime', [
'type' => self::TYPE_INTEGER,
'description' => 'The current build time in seconds.',
'default' => 0,
'example' => 128,
])
;
}