From a1986ef9b7179b211619bfdab25d3d8cb6c537e2 Mon Sep 17 00:00:00 2001 From: Tortue Torche <126358-tortuetorche@users.noreply.gitlab.com> Date: Fri, 3 Sep 2021 15:07:12 +0200 Subject: [PATCH] Add some instructions to run tests locally --- tests/dockerfiles/.env.local | 39 +++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/tests/dockerfiles/.env.local b/tests/dockerfiles/.env.local index 5c8d12e..ea12541 100644 --- a/tests/dockerfiles/.env.local +++ b/tests/dockerfiles/.env.local @@ -1,16 +1,45 @@ +# Requirements: +# +# Builds Docker images locally: +# git clone https://gitlab.com/psuapp/psu +# cd psu/ +# 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 + #TRACE=true CI_REGISTRY=localhost.com CI_PROJECT_NAMESPACE=psuapp CI_REGISTRY_IMAGE=localhost.com/psupapp/psu CI_REGISTRY_USER=gitlab-ci-token -CI_REGISTRY_PASSWORD=longalfanumstring -CI_COMMIT_SHA=ee7ee6556462d46423840dcc49991be630545f60 +CI_REGISTRY_PASSWORD=longalphanumericstring +CI_COMMIT_SHA=cfbe17a43cecd1f737cba4584b161ea9676e8adf #DOCKER_REGISTRY_IMAGE=$DOCKER_REGISTRY/$CI_PROJECT_PATH PSU_IMAGE=localhost.com/psuapp/psu/builds -PSU_TAG=ee7ee6556462d46423840dcc49991be630545f60 -PSU_TAG_CORE=core-ee7ee6556462d46423840dcc49991be630545f60 +PSU_TAG=cfbe17a43cecd1f737cba4584b161ea9676e8adf +PSU_TAG_CORE=core-cfbe17a43cecd1f737cba4584b161ea9676e8adf PSU_PASSWORD=portainerAdminPassword TRAEFIK_VERSION="2.4" @@ -18,7 +47,7 @@ TRAEFIK_VERSION="2.4" PORTAINER_IMAGE="portainer/portainer-ce" #PORTAINER_IMAGE="portainer/portainer" PORTAINER_VERSION=latest -#PORTAINER_VERSION="2.0.1" +#PORTAINER_VERSION="2.6.3" #PORTAINER_VERSION="1.24.1" PORTAINER_COMMAND_OPTIONS="" #PORTAINER_COMMAND_OPTIONS=" --no-analytics"