2021-09-03 13:07:12 +00:00
|
|
|
# Requirements:
|
|
|
|
#
|
|
|
|
# Builds Docker images locally:
|
|
|
|
# git clone https://gitlab.com/psuapp/psu
|
|
|
|
# cd psu/
|
2021-09-03 13:15:00 +00:00
|
|
|
# cp tests/dockerfiles/.env.local tests/dockerfiles/.env
|
2021-09-03 13:07:12 +00:00
|
|
|
# source tests/dockerfiles/.env
|
|
|
|
# docker build --no-cache -t $PSU_IMAGE:$PSU_TAG -f Dockerfile .
|
|
|
|
# docker build --no-cache -t $PSU_IMAGE:core-$PSU_TAG -f Dockerfile.core .
|
|
|
|
# docker build --no-cache -t $PSU_IMAGE:debian-$PSU_TAG -f Dockerfile.debian .
|
|
|
|
# docker build --no-cache -t $PSU_IMAGE:debaian-core-$PSU_TAG -f Dockerfile.debian-core .
|
|
|
|
#
|
|
|
|
# Build Docker images from https://gitlab.com/psuapp/hub locally:
|
|
|
|
# cd ..
|
|
|
|
# git clone https://gitlab.com/psuapp/hub
|
|
|
|
# cd hub/
|
|
|
|
# source ../psu/tests/dockerfiles/.env
|
|
|
|
# hub_pwd="$(pwd)"
|
|
|
|
# cd "${hub_pwd}/php/8.0-fpm-alpine/"
|
|
|
|
# docker build --no-cache -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/hub/php:8.0-fpm-alpine .
|
|
|
|
# cd "${hub_pwd}/testing/psu/php-app/"
|
|
|
|
# docker build --no-cache --build-arg CI_REGISTRY_IMAGE="$CI_REGISTRY/$CI_PROJECT_NAMESPACE/hub" -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/hub/testing/psu-php-app:latest .
|
|
|
|
# cd "${hub_pwd}/testing/psu/apache2/"
|
|
|
|
# docker build --no-cache -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/hub/testing/psu-apache2:latest .
|
|
|
|
# cd "$hub_pwd"
|
|
|
|
# cd ../psu
|
|
|
|
#
|
|
|
|
# Run tests locally:
|
|
|
|
# bash scripts/test.sh
|
|
|
|
|
2021-02-18 14:31:42 +00:00
|
|
|
#TRACE=true
|
|
|
|
|
|
|
|
CI_REGISTRY=localhost.com
|
|
|
|
CI_PROJECT_NAMESPACE=psuapp
|
|
|
|
CI_REGISTRY_IMAGE=localhost.com/psupapp/psu
|
|
|
|
CI_REGISTRY_USER=gitlab-ci-token
|
2021-09-03 13:07:12 +00:00
|
|
|
CI_REGISTRY_PASSWORD=longalphanumericstring
|
|
|
|
CI_COMMIT_SHA=cfbe17a43cecd1f737cba4584b161ea9676e8adf
|
2021-02-18 14:31:42 +00:00
|
|
|
#DOCKER_REGISTRY_IMAGE=$DOCKER_REGISTRY/$CI_PROJECT_PATH
|
|
|
|
|
|
|
|
PSU_IMAGE=localhost.com/psuapp/psu/builds
|
2021-09-03 13:07:12 +00:00
|
|
|
PSU_TAG=cfbe17a43cecd1f737cba4584b161ea9676e8adf
|
|
|
|
PSU_TAG_CORE=core-cfbe17a43cecd1f737cba4584b161ea9676e8adf
|
2021-02-18 14:31:42 +00:00
|
|
|
PSU_PASSWORD=portainerAdminPassword
|
|
|
|
|
|
|
|
TRAEFIK_VERSION="2.4"
|
|
|
|
|
|
|
|
PORTAINER_IMAGE="portainer/portainer-ce"
|
|
|
|
#PORTAINER_IMAGE="portainer/portainer"
|
|
|
|
PORTAINER_VERSION=latest
|
2021-09-03 13:07:12 +00:00
|
|
|
#PORTAINER_VERSION="2.6.3"
|
2021-02-18 14:31:42 +00:00
|
|
|
#PORTAINER_VERSION="1.24.1"
|
|
|
|
PORTAINER_COMMAND_OPTIONS=""
|
|
|
|
#PORTAINER_COMMAND_OPTIONS=" --no-analytics"
|
|
|
|
|
2021-02-19 11:25:44 +00:00
|
|
|
SWARM_NODE_NAME=localhost
|
|
|
|
SWARM_NODE_IP=$(hostname -I | awk '{ print $1 }')
|