Uploaded image for project: 'Build'
  1. Build
  2. BUILD-1159

keep Selenium in sync for multiple projects

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Resolved
    • Icon: Neutral Neutral
    • None
    • None
    • None
    • Yes

      Context

       
      To run UI-tests, projects depend on core-Tf, which comes with artifacts from selenium, selenide, etc.. So - managing the version of the artifacts at one single place is done in core-TF.
       
      But, additionally, we need docker-images from Selenium to run the tests. We typically have a docker-compose and and a .env file for each project. These two files are typically project-specific and cannot be shared among various projects.
      The .env file contains this assignment:
      SELENIUM_VERSION=4.13.0
      The value for SELENIUM_VERSION is the same in all .env files of all projects.
      (at least it should be)

      Approach

       
      Inspiration from here:
      https://stackoverflow.com/questions/62121588/how-to-evaluate-a-dynamic-variable-in-a-docker-compose-yml-file
       
      On the individual projects have this:
      a file named env_raw or similar. It is identical to the final ray, but keeps a placeholder for the value of SELENIUM_VERSION
       
      at aws-build-scripts repository we have this:
      a downloadable script which contains the value for SELENIUM_VERSION and a function to transform env_raw into .env

      In the Jenkins pipeline- we need to download the script and create "dynamically" the .env before calling docker-compose.

      What about running tests locally?

      The above mentioned approach should work fine on Jenkins.
      BUT locally we would lack the .env file.

      To workaround this - each project could still contain a .env file with a literal value for the SELENIUM_VERSION. On jenkins we would just override the file.

        Acceptance criteria

              hpola Harshini Pola
              cmeier Christoph Meier
              Foundation
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Work Started: