Skip to content

Commit dd2e335

Browse files
committed
Cypress 4.6.0 and tweaks to scripts
1 parent 1ff87bb commit dd2e335

12 files changed

+31
-67
lines changed

scripts/.common.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# Colors
4+
BLUE='\E[1;34m'
5+
CYAN='\E[1;36m'
6+
GREEN='\E[1;32m'
7+
RED='\E[1;31m'
8+
RESET='\E[0m'
9+
YELLOW='\E[1;33m'
10+
11+
export BLUE CYAN GREEN RED RESET YELLOW
12+
13+
# Docker Compose
14+
COMPOSE_PROJECT_NAME="npmdev"
15+
COMPOSE_FILE="docker/docker-compose.dev.yml"
16+
17+
export COMPOSE_FILE COMPOSE_PROJECT_NAME

scripts/buildx

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
#!/bin/bash
22

3-
CYAN='\E[1;36m'
4-
YELLOW='\E[1;33m'
5-
BLUE='\E[1;34m'
6-
GREEN='\E[1;32m'
7-
RESET='\E[0m'
3+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4+
. "$DIR/.common.sh"
85

96
echo -e "${BLUE}${CYAN}Building docker multiarch: ${YELLOW}${*}${RESET}"
107

scripts/destroy-dev

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
#!/bin/bash -e
22

33
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4-
5-
CYAN='\E[1;36m'
6-
BLUE='\E[1;34m'
7-
RED='\E[1;31m'
8-
RESET='\E[0m'
9-
10-
COMPOSE_PROJECT_NAME="npmdev"
11-
COMPOSE_FILE="docker/docker-compose.dev.yml"
12-
export COMPOSE_FILE COMPOSE_PROJECT_NAME
4+
. "$DIR/.common.sh"
135

146
# Ensure docker-compose exists
157
# Make sure docker exists

scripts/docs-build

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
#!/bin/bash -e
22

33
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4-
5-
CYAN='\E[1;36m'
6-
BLUE='\E[1;34m'
7-
RED='\E[1;31m'
8-
GREEN='\E[1;32m'
9-
RESET='\E[0m'
4+
. "$DIR/.common.sh"
105

116
# Ensure docker-compose exists
127
if hash docker 2>/dev/null; then

scripts/docs-upload

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22

33
# Note: This script is designed to be run inside CI builds
44

5-
CYAN='\E[1;36m'
6-
YELLOW='\E[1;33m'
7-
BLUE='\E[1;34m'
8-
GREEN='\E[1;32m'
9-
RESET='\E[0m'
5+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+
. "$DIR/.common.sh"
107

118
echo -e "${BLUE}${CYAN}Uploading docs in: ${YELLOW}$1${RESET}"
129

scripts/frontend-build

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
#!/bin/bash -e
22

33
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4-
5-
CYAN='\E[1;36m'
6-
BLUE='\E[1;34m'
7-
RED='\E[1;31m'
8-
GREEN='\E[1;32m'
9-
RESET='\E[0m'
4+
. "$DIR/.common.sh"
105

116
DOCKER_IMAGE=jc21/alpine-nginx-full:node
127

scripts/start-dev

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
#!/bin/bash -e
22

33
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4-
5-
CYAN='\E[1;36m'
6-
BLUE='\E[1;34m'
7-
YELLOW='\E[1;33m'
8-
RED='\E[1;31m'
9-
RESET='\E[0m'
10-
11-
COMPOSE_PROJECT_NAME="npmdev"
12-
COMPOSE_FILE="docker/docker-compose.dev.yml"
13-
export COMPOSE_FILE COMPOSE_PROJECT_NAME
4+
. "$DIR/.common.sh"
145

156
# Ensure docker-compose exists
167
if hash docker-compose 2>/dev/null; then

scripts/stop-dev

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
#!/bin/bash -e
22

33
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4-
5-
CYAN='\E[1;36m'
6-
BLUE='\E[1;34m'
7-
RED='\E[1;31m'
8-
RESET='\E[0m'
9-
10-
COMPOSE_PROJECT_NAME="npmdev"
11-
COMPOSE_FILE="docker/docker-compose.dev.yml"
12-
export COMPOSE_FILE COMPOSE_PROJECT_NAME
4+
. "$DIR/.common.sh"
135

146
# Ensure docker-compose exists
157
# Make sure docker exists

scripts/test-dev

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
#!/bin/bash -e
22

33
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4-
5-
CYAN='\E[1;36m'
6-
BLUE='\E[1;34m'
7-
RED='\E[1;31m'
8-
RESET='\E[0m'
9-
10-
COMPOSE_PROJECT_NAME="npmdev"
11-
COMPOSE_FILE="docker/docker-compose.dev.yml"
12-
export COMPOSE_FILE COMPOSE_PROJECT_NAME
4+
. "$DIR/.common.sh"
135

146
# Ensure docker-compose exists
157
if hash docker-compose 2>/dev/null; then

scripts/wait-healthy

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#!/bin/bash
22

3-
CYAN='\E[1;36m'
4-
YELLOW='\E[1;33m'
5-
BLUE='\E[1;34m'
6-
GREEN='\E[1;32m'
7-
RED='\E[1;31m'
8-
RESET='\E[0m'
3+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4+
. "$DIR/.common.sh"
95

106
if [ "$1" == "" ]; then
117
echo "Waits for a docker container to be healthy."

test/cypress/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM cypress/included:4.0.2
1+
FROM cypress/included:4.6.0
22

33
COPY --chown=1000 ./test /test
44

test/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"@jc21/cypress-swagger-validation": "^0.0.5",
88
"@jc21/restler": "^3.4.0",
99
"chalk": "^3.0.0",
10-
"cypress": "^4.0.2",
10+
"cypress": "^4.6.0",
1111
"cypress-plugin-retries": "^1.5.2",
1212
"eslint": "^6.7.2",
1313
"eslint-plugin-align-assignments": "^1.1.2",

0 commit comments

Comments
 (0)