[BUILD-1159] keep Selenium in sync for multiple projects Created: 19/Oct/23  Updated: 15/Nov/23  Resolved: 15/Nov/23

Status: Closed
Project: Build
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Christoph Meier Assignee: Harshini Pola
Resolution: Resolved Votes: 0
Labels: TAE
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to BUILD-1183 pipeline-templates supporting seleniu... Closed
is related to MGNLTEST-311 UI tests can run locally without the ... Selected
is related to MGNLTEST-201 Provide default environment variables... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: TAE-build-or-infra-tasks
Team: Foundation
Work Started:
Approved:
Yes

 Description   

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.



 Comments   
Comment by Christoph Meier [ 23/Oct/23 ]

Consider to check

for inspiration ... as related tickets

Comment by Christoph Meier [ 06/Nov/23 ]

SRE.JENKINS

Done:

  • saas-TF
  • cloud-e2e

pending approval ??

  • sub.serv.ui. ... communication in progress w/ Bertrand
  • sub.service.admin.ui ... -> approved by Nguyen, but needs to be merged by admin.x

nearly done:

  • hello-saas-PR (other ticket)

CORE.JENKINS

  • needs a change in pipeline-templates
Comment by Harshini Pola [ 08/Nov/23 ]

SRE.JENKINS

  • sub.serv.ui. ... communication in progress w/ Bertrand
  • Others - done

CORE.JENKINS

Comment by Harshini Pola [ 15/Nov/23 ]

Updated in all SRE.Jenkins projects., reviewed and merged. 

Generated at Sun Feb 11 23:48:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.