Pipeline management - NextensArelB/SwaggerGenerationTool GitHub Wiki
Pipeline management should comply with the guidelines set by SRE. This includes TA. This will result in building an artifact through build pipelines(Pipeliness for short) and deployments done through release pipelines(Releases for short). Automatically this means that only build pipelines can have unittests and only release pipelines all the other tests. The current setup for TA in pipelines is as follows:
Part of build pipeline
Part of release pipeline as a sepperate stage or task of the deployment stage
Sepperate release pipeline
While most API tests are on integration level due to many APIs working with user context, for all Dev and the Delivery environment it is advised to incorperate the TA as a task after the deployment of the API, not as a stage. The reason or better said theory for this is people will act faster if the deployment fails instead of a TA stage fails. For Acceptance and Production, we cannot include this way of working as for the reason that those environments have a swap procedure before the code is live for each environment. This forces us to have a sepperate stage instead of a integrated task, because the swap itself is not part of the deployment stage.
You can use the following example in your test pipeline .yaml to save created reports as artifacts:
- task: CopyFiles@2
displayName: 'Move desired artifacts'
inputs:
SourceFolder: 'test/karate'
contents: |
cucumber_report.html
cucumber_report.html.json
target\karate.log
target\cucumber-reports\**\*
target\karate-reports*\**\*
targetFolder: '$(Build.ArtifactStagingDirectory)'
CleanTargetFolder: true
- publish: '$(Build.ArtifactStagingDirectory)'
artifact: Artifacts
These can then be downloaded from the build report. Retention policy is that only artifacts from the three most recent runs per pipeline are saved. Note that the total filesize can accrue rather quickly, so think about what reports you do and do not need.