SWEAGLE
A quality gate for your configuration data.
SWEAGLE is a Service Now application for managing, consolidating & continuously validating all kinds of configuration data (application, infrastructure, environment, releases) which is crucial to your CI/CD pipeline.
This extension allows for uploading config data into SWEAGLE so it can be versioned, validated, and made consumable in many different formats.
More info about SWEAGLE can be found at https://www.servicenow.com/content/dam/servicenow-assets/public/en-us/doc-type/resource-center/data-sheet/ds-sweagle-configuration-data-management.pdf
Sweagle Overview
Configuration data workflow.
This extension supports the major APIs used to manage your config data lifecycle.
Upload --> Validate / ValidationStatus --> Snapshot --> Export
Upload is used to upload a configuration data file in a specific path of Sweagle data model
Validate is used to validate your configuration versus a specific validation rule
Validation Status will give you result of all validations rules assigned to your configuration
Snapshot will create an unalterable release tag for your configuration
Export is used to export configuration release in any format you need with optional filtering rules also, if required
Configuration data validation.
Sweagle can apply any kind of validation rules: compliance, security, syntax, deviation vs blueprint, ...
A full library of rules is provided out-of-the-box, but you can also build your own rules using javascript.
Results of the validation rules are visible directly in your Azure pipeline test dashboard if you use a publish test result step like the one below:
- task: PublishTestResults@2`
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/testResult*.xml'
mergeTestResults: false
testRunTitle: 'SWEAGLE VALIDATION'
buildPlatform: 'SWEAGLE'
Validation rules dashboard
Validation rules error details
Prerequisites.
To make usage of this extension, you need to subscribe to a Service Now Sweagle application and define a connection to your instance using a valid API token.
History of versions.
1.0.x: first releases with info, upload, snapshot, export, validate and validationStatus operations
- add the export of Sweagle validation rules as test results in Azure DevOps GUI
1.1.x: add the upload of list of files with Glob expression to get list of files to upload and support for Windows BOM characters
- task: sweagle@1`
displayName: "Sweagle Upload several files"
inputs:
tenant: 'testing.sweagle.com'
port: '443'
token: '$(SWEAGLE_TOKEN)'
operation: 'uploadFiles'
dirPath: './buildAndReleaseTask/tests/inputs/**/+(*.ini|*.json|*.xml|*.yml|*.yaml|*.config)'
nodePath: 'infrastructure,azure,vmGlob-ADO'
format: 'xml'
- 1.2.x: Add the export of list of files (based on import list of files data model obtained above) and arraySupport argument
- see below a coded pipeline example to retrieve a list of files
- task: sweagle@1`
displayName: "Sweagle Get list of files to export"
inputs:
tenant: 'testing.sweagle.com'
port: '443'
token: '$(SWEAGLE_TOKEN)'
operation: 'export'
cds: 'infrastructure.vmGlob-ADO'
format: 'JSON'
exporter: 'returnChildrensForLevel'
arg: '1'
- task: sweagle@1`
displayName: 'Export multiples files'
inputs:
tenant: 'testing.sweagle.com'
port: '443'
token: '$(SWEAGLE_TOKEN)'
operation: 'exportFiles'
cds: 'infrastructure.vmGlob-ADO'
filesList: '$(response)'
format: 'json'
exporterListOfFiles: 'returnDataForNode'
createSubFolders: true