deleteBuildByKey method

Future<void> deleteBuildByKey({
  1. required String pipelineId,
  2. required int buildNumber,
  3. int? updateSequenceNumber,
})

Delete the build data currently stored for the given pipelineId and buildNumber combination.

Deletion is performed asynchronously. The getBuildByKey operation can be used to confirm that data has been deleted successfully (if needed).

Only Connect apps that define the jiraBuildInfoProvider module, and on-premise integrations, can access this resource. This resource requires the 'DELETE' scope for Connect apps.

Implementation

Future<void> deleteBuildByKey(
    {required String pipelineId,
    required int buildNumber,
    int? updateSequenceNumber}) async {
  await _client.send(
    'delete',
    'rest/builds/0.1/pipelines/{pipelineId}/builds/{buildNumber}',
    pathParameters: {
      'pipelineId': pipelineId,
      'buildNumber': '$buildNumber',
    },
    queryParameters: {
      if (updateSequenceNumber != null)
        '_updateSequenceNumber': '$updateSequenceNumber',
    },
  );
}