@jahia/cypress 8.3.0 → 8.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @jahia/cypress Changelog
2
2
 
3
+ ## 8.3.1
4
+
5
+ * Fixed CI startup so it fails immediately when an image cannot be pulled, instead of hanging until the job times out. The job log now shows the registry error instead of an unanswered confirmation prompt. (#243)
6
+
3
7
  ## 8.3.0
4
8
 
5
9
  ### New Features
package/ci.startup.sh CHANGED
@@ -31,10 +31,19 @@ if [[ "${JAHIA_CLUSTER_ENABLED}" == "true" || ${JAHIA_CLUSTER_ENABLED} == true
31
31
  export CLUSTER_PROFILE="--profile cluster"
32
32
  fi
33
33
 
34
+ # Both docker-compose calls below read from /dev/null on purpose. docker-compose v1 answers an
35
+ # unusable image (wrong name, wrong registry, missing docker login) with an interactive
36
+ # confirmation prompt instead of an error. In CI nothing ever answers it, so the job hangs until
37
+ # it times out. With stdin closed the prompt fails immediately and the real registry error is
38
+ # reported, and the exit code is checked so the startup does not silently continue.
34
39
  echo "$(date +'%d %B %Y - %k:%M') == Starting environment =="
35
- docker-compose ${CLUSTER_PROFILE} up -d --renew-anon-volumes $(docker-compose config --services | grep -v "cypress")
40
+ if ! docker-compose ${CLUSTER_PROFILE} up -d --renew-anon-volumes $(docker-compose config --services | grep -v "cypress") < /dev/null; then
41
+ echo "$(date +'%d %B %Y - %k:%M') == STARTUP FAILURE, unable to start the environment. Check the image names, the registry and the docker login above =="
42
+ exit 1
43
+ fi
44
+
36
45
  if [[ "$1" != "notests" ]]; then
37
46
  docker ps -a
38
47
  docker stats --no-stream
39
- docker-compose up --abort-on-container-exit cypress
48
+ docker-compose up --abort-on-container-exit cypress < /dev/null
40
49
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jahia/cypress",
3
- "version": "8.3.0",
3
+ "version": "8.3.1",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "lint": "eslint src -c .eslintrc.json --ext .ts --max-warnings=0"