Skip to content

Add configuration via config file or env variables #49

@pashidlos

Description

@pashidlos

Read file vrt.json from project root with structure:

{
      "apiUrl": "http://162.243.161.172:4200",
      "project": "VRT",
      "apiKey": "SECRET",
      "branchName": "master",
      "enableSoftAssert": false,
      "ciBuildId": "SOME_UNIQUE_ID"
}

env variables example:

VRT_APIURL="http://localhost:4200" 
VRT_PROJECT="Default project" 
VRT_APIKEY="tXZVHX0EA4YQM1MGDD" 
VRT_CIBUILDID="commit_sha" 
VRT_BRANCHNAME="develop" 
VRT_ENABLESOFTASSERT=true

Acceptance criteria:

  • config variables are read from config file
  • can start build with default constructor VisualRegressionTracker (without specific config)
  • validation error is thrown in case required config properties are not set
  • explicit config from code is overriding values from env variables
  • env variables are overriding values from config file

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions