Use .nvmrc for determining the node image used for E2E tests (#24446)

* Use .nvmrc for determining the node image used for E2E tests

* Rename E2E rundir from /app to /cypress for consistency
This commit is contained in:
Mario Vitale 2023-09-05 21:32:23 +02:00 committed by GitHub
parent 0338ec8fdc
commit 77fa1c5824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 5 deletions

View File

@ -7,6 +7,7 @@ export MME2E_UID=$(id -u)
# Default the optional variables that are used in the docker-compose file
export SERVER_IMAGE_DEFAULT="mattermostdevelopment/mm-ee-test:$(git rev-parse --short=7 HEAD)"
export SERVER_IMAGE=${SERVER_IMAGE:-$SERVER_IMAGE_DEFAULT}
export NODE_VERSION_REQUIRED=$(cat ../../.nvmrc)
# Function definitions
mme2e_log () { echo "[$(date +%Y-%m-%dT%H:%M:%S%Z)]" "$@"; }

View File

@ -54,7 +54,7 @@ services:
condition: service_healthy
webhook-interactions:
image: mattermostdevelopment/mirrored-node:18.17.1
image: mattermostdevelopment/mirrored-node:${NODE_VERSION_REQUIRED}
command: sh -c "npm install -g axios express client-oauth2@larkox/js-client-oauth2#e24e2eb5dfcbbbb3a59d095e831dbe0012b0ac49 && exec node webhook_serve.js"
environment:
NODE_PATH: /usr/local/lib/node_modules/
@ -72,7 +72,7 @@ services:
- webhook-interactions
cypress:
image: "mattermostdevelopment/mirrored-cypress-browsers-public:node16.14.2-slim-chrome100-ff99-edge"
image: "mattermostdevelopment/mirrored-cypress-browsers-public:node-18.16.1-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1"
entrypoint: [ "/bin/bash", "-c" ]
command: [ "until [ -f /var/run/mm_terminate ]; do sleep 5; done" ]
env_file:
@ -107,14 +107,14 @@ services:
# https://github.com/cypress-io/cypress/issues/1243
CI: "1"
# Ensure we're independent from the global node environment
PATH: /app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH: /cypress/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ulimits:
nofile:
soft: 8096
hard: 1048576
working_dir: /app
working_dir: /cypress
volumes:
- "../../e2e-tests/cypress/:/app"
- "../../e2e-tests/cypress/:/cypress"
utils:
image: "mattermostdevelopment/mirrored-golang:1.19.5"

View File

@ -37,6 +37,8 @@
"node": {
"16.10.0": "node:16.10.0",
"16.17.0": "node:16.17.0",
"18": "node:18@sha256:11e9c297fc51f6f65f7d0c7c8a8581e5721f2f16de43ceff1a199fd3ef609f95",
"18.17": "node:18.17@sha256:11e9c297fc51f6f65f7d0c7c8a8581e5721f2f16de43ceff1a199fd3ef609f95",
"18.17.1": "node:18.17.1@sha256:11e9c297fc51f6f65f7d0c7c8a8581e5721f2f16de43ceff1a199fd3ef609f95"
}
}