3.0.0 • Published 1 year ago

screwdriver-coverage-base v3.0.0

Weekly downloads
45
License
BSD-3-Clause
Repository
github
Last release
1 year ago

Coverage Base

Version Downloads Build Status Open Issues License

Base class defining the interface for coverage upload implementations

Usage

npm install screwdriver-coverage-base

Interface

This is an interface for uploading code coverage results from a Screwdriver build to a code coverage server.

getAccessToken

Required Parameters
ParameterTypeDescription
configObject
config.buildCredentialsObjectInformation stored in the build JWT token
config.projectKeyStringProject key (can be directly passed in with just startTime and endTime)
config.scopeStringCoverage scope (pipeline or job)
config.usernameStringProject username
Expected Outcome

The getAccessToken function should resolve a Promise with an access token that build can use to talk to the code coverage server.

getInfo

Required Parameters
ParameterTypeDescription
configObject
config.jobIdStringThe unique ID for a job
config.jobNameStringThe Screwdriver job name
config.pipelineIdStringThe unique ID for a pipeline
config.pipelineNameStringThe Screwdriver pipeline name
config.prNumStringThe pull request number
config.startTimeStringThe job start time
config.endTimeStringThe job end time
config.projectKeyStringProject key (can be directly passed in with just startTime and endTime)
config.prParentJobIdStringPR parent job ID
config.scopeStringCoverage scope (pipeline or job)
Expected Outcome

The getInfo function should resolve a Promise with an object with metadata about the project coverage.

getUploadCoverageCmd

Required Parameters
ParameterTypeDescription
configObject
config.buildStringThe build
config.jobStringThe job
config.pipelineStringThe pipeline
Expected Outcome

The getUploadCoverageCmd function should resolve a Promise with a string of shell commands to upload code coverage results.

Extending

To extend the base class, the functions to override are: 1. _getAccessToken 1. _getInfo 1. _getUploadCoverageCmd

Testing

npm test

Related links

See the coverage-bookend

License

Code licensed under the BSD 3-Clause license. See LICENSE file for terms.

3.0.0

1 year ago

2.1.0

3 years ago

2.0.2

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago