Visual-Regression-Tracker/sdk-java

Add configuration via config file or env variables

pashidlos opened this issue · 1 comments

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

In progress.