Cypress 4.6.0 and tweaks to scripts

This commit is contained in:
Jamie Curnow 2020-05-21 16:11:19 +10:00
parent 1ff87bbc12
commit dd2e335fae
12 changed files with 31 additions and 67 deletions

17
scripts/.common.sh Normal file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# Colors
BLUE='\E[1;34m'
CYAN='\E[1;36m'
GREEN='\E[1;32m'
RED='\E[1;31m'
RESET='\E[0m'
YELLOW='\E[1;33m'
export BLUE CYAN GREEN RED RESET YELLOW
# Docker Compose
COMPOSE_PROJECT_NAME="npmdev"
COMPOSE_FILE="docker/docker-compose.dev.yml"
export COMPOSE_FILE COMPOSE_PROJECT_NAME

View File

@ -1,10 +1,7 @@
#!/bin/bash #!/bin/bash
CYAN='\E[1;36m' DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
YELLOW='\E[1;33m' . "$DIR/.common.sh"
BLUE='\E[1;34m'
GREEN='\E[1;32m'
RESET='\E[0m'
echo -e "${BLUE} ${CYAN}Building docker multiarch: ${YELLOW}${*}${RESET}" echo -e "${BLUE} ${CYAN}Building docker multiarch: ${YELLOW}${*}${RESET}"

View File

@ -1,15 +1,7 @@
#!/bin/bash -e #!/bin/bash -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$DIR/.common.sh"
CYAN='\E[1;36m'
BLUE='\E[1;34m'
RED='\E[1;31m'
RESET='\E[0m'
COMPOSE_PROJECT_NAME="npmdev"
COMPOSE_FILE="docker/docker-compose.dev.yml"
export COMPOSE_FILE COMPOSE_PROJECT_NAME
# Ensure docker-compose exists # Ensure docker-compose exists
# Make sure docker exists # Make sure docker exists

View File

@ -1,12 +1,7 @@
#!/bin/bash -e #!/bin/bash -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$DIR/.common.sh"
CYAN='\E[1;36m'
BLUE='\E[1;34m'
RED='\E[1;31m'
GREEN='\E[1;32m'
RESET='\E[0m'
# Ensure docker-compose exists # Ensure docker-compose exists
if hash docker 2>/dev/null; then if hash docker 2>/dev/null; then

View File

@ -2,11 +2,8 @@
# Note: This script is designed to be run inside CI builds # Note: This script is designed to be run inside CI builds
CYAN='\E[1;36m' DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
YELLOW='\E[1;33m' . "$DIR/.common.sh"
BLUE='\E[1;34m'
GREEN='\E[1;32m'
RESET='\E[0m'
echo -e "${BLUE} ${CYAN}Uploading docs in: ${YELLOW}$1${RESET}" echo -e "${BLUE} ${CYAN}Uploading docs in: ${YELLOW}$1${RESET}"

View File

@ -1,12 +1,7 @@
#!/bin/bash -e #!/bin/bash -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$DIR/.common.sh"
CYAN='\E[1;36m'
BLUE='\E[1;34m'
RED='\E[1;31m'
GREEN='\E[1;32m'
RESET='\E[0m'
DOCKER_IMAGE=jc21/alpine-nginx-full:node DOCKER_IMAGE=jc21/alpine-nginx-full:node

View File

@ -1,16 +1,7 @@
#!/bin/bash -e #!/bin/bash -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$DIR/.common.sh"
CYAN='\E[1;36m'
BLUE='\E[1;34m'
YELLOW='\E[1;33m'
RED='\E[1;31m'
RESET='\E[0m'
COMPOSE_PROJECT_NAME="npmdev"
COMPOSE_FILE="docker/docker-compose.dev.yml"
export COMPOSE_FILE COMPOSE_PROJECT_NAME
# Ensure docker-compose exists # Ensure docker-compose exists
if hash docker-compose 2>/dev/null; then if hash docker-compose 2>/dev/null; then

View File

@ -1,15 +1,7 @@
#!/bin/bash -e #!/bin/bash -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$DIR/.common.sh"
CYAN='\E[1;36m'
BLUE='\E[1;34m'
RED='\E[1;31m'
RESET='\E[0m'
COMPOSE_PROJECT_NAME="npmdev"
COMPOSE_FILE="docker/docker-compose.dev.yml"
export COMPOSE_FILE COMPOSE_PROJECT_NAME
# Ensure docker-compose exists # Ensure docker-compose exists
# Make sure docker exists # Make sure docker exists

View File

@ -1,15 +1,7 @@
#!/bin/bash -e #!/bin/bash -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$DIR/.common.sh"
CYAN='\E[1;36m'
BLUE='\E[1;34m'
RED='\E[1;31m'
RESET='\E[0m'
COMPOSE_PROJECT_NAME="npmdev"
COMPOSE_FILE="docker/docker-compose.dev.yml"
export COMPOSE_FILE COMPOSE_PROJECT_NAME
# Ensure docker-compose exists # Ensure docker-compose exists
if hash docker-compose 2>/dev/null; then if hash docker-compose 2>/dev/null; then

View File

@ -1,11 +1,7 @@
#!/bin/bash #!/bin/bash
CYAN='\E[1;36m' DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
YELLOW='\E[1;33m' . "$DIR/.common.sh"
BLUE='\E[1;34m'
GREEN='\E[1;32m'
RED='\E[1;31m'
RESET='\E[0m'
if [ "$1" == "" ]; then if [ "$1" == "" ]; then
echo "Waits for a docker container to be healthy." echo "Waits for a docker container to be healthy."

View File

@ -1,4 +1,4 @@
FROM cypress/included:4.0.2 FROM cypress/included:4.6.0
COPY --chown=1000 ./test /test COPY --chown=1000 ./test /test

View File

@ -7,7 +7,7 @@
"@jc21/cypress-swagger-validation": "^0.0.5", "@jc21/cypress-swagger-validation": "^0.0.5",
"@jc21/restler": "^3.4.0", "@jc21/restler": "^3.4.0",
"chalk": "^3.0.0", "chalk": "^3.0.0",
"cypress": "^4.0.2", "cypress": "^4.6.0",
"cypress-plugin-retries": "^1.5.2", "cypress-plugin-retries": "^1.5.2",
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-align-assignments": "^1.1.2", "eslint-plugin-align-assignments": "^1.1.2",