Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
phundament
app
Commits
f5552fbd
Commit
f5552fbd
authored
Feb 04, 2016
by
Tobias Munk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated build ENV variables
parent
a8492b8a
Pipeline
#7074
passed with stages
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
18 deletions
+20
-18
.gitlab-ci.yml
.gitlab-ci.yml
+4
-4
Makefile
Makefile
+2
-2
README.md
README.md
+2
-2
test.override.yml
build/compose/test.override.yml
+4
-4
lint.sh
build/scripts/lint.sh
+5
-5
test.sh
build/scripts/test.sh
+3
-1
No files found.
.gitlab-ci.yml
View file @
f5552fbd
before_script
:
-
export
APP_MIGRATION_LOOKUP=@root/tests/codeception/_migrations
-
export
BUILD_APP_VOLUME=${CI_PROJECT_DIR}
-
export BUILD_PREFIX=buildref${CI_BUILD_REF}$(echo ${CI_BUILD_REF_NAME} | tr -dc '[:alnum:]\n\r' | tr '[:upper:]' '[:lower:]')
-
export BUILD_IMAGE_PREFIX=${BUILD_PREFIX}
-
export COMPOSE_PROJECT_NAME=${BUILD_PREFIX}
-
export COMPOSE_HTTP_TIMEOUT=120
-
export HOST_APP_VOLUME=$CI_PROJECT_DIR
-
export TEST_IMAGE_PREFIX=${BUILD_PREFIX}
-
export APP_MIGRATION_LOOKUP=@root/tests/codeception/_migrations
-
mkdir -p tmp
stages
:
...
...
@@ -30,6 +29,7 @@ test:
-
bash build/scripts/${CI_BUILD_NAME}.sh || EXIT_CODE=$?
-
set -e
-
cp -r tests/codeception/_output/ /tmp/${CI_BUILD_NAME}-${CI_BUILD_REF}
-
ls -lat /tmp
-
exit ${EXIT_CODE}
test-allow_failure
:
...
...
Makefile
View file @
f5552fbd
...
...
@@ -8,8 +8,8 @@ DOCKER_COMPOSE ?= docker-compose
PHP_SERVICE
?=
php
WEB_SERVICE
?=
nginx
export
TEST
_IMAGE_PREFIX
?=
$(
shell
echo
$
(
notdir
$(PWD))
|
tr
-dc
'[:alnum:]\n\r'
|
tr
'[:upper:]'
'[:lower:]'
)
export
HOST
_APP_VOLUME
?=
.
export
BUILD
_IMAGE_PREFIX
?=
$(
shell
echo
$
(
notdir
$(PWD))
|
tr
-dc
'[:alnum:]\n\r'
|
tr
'[:upper:]'
'[:lower:]'
)
export
BUILD
_APP_VOLUME
?=
.
UNAME_S
:=
$(
shell
uname
-s
)
ifeq
($(UNAME_S),
Darwin)
...
...
README.md
View file @
f5552fbd
...
...
@@ -134,8 +134,8 @@ First, build your application image
Set environment variables for test stack
export COMPOSE_PROJECT_NAME=testapp
export
TEST
_IMAGE_PREFIX=app
export
HOST
_APP_VOLUME=.
export
BUILD
_IMAGE_PREFIX=app
export
BUILD
_APP_VOLUME=.
Start test stack and enter tester CLI container
...
...
build/compose/test.override.yml
View file @
f5552fbd
php
:
image
:
${
TEST
_IMAGE_PREFIX}_php
image
:
${
BUILD
_IMAGE_PREFIX}_php
volumes
:
-
/app
environment
:
...
...
@@ -10,14 +10,14 @@ nginx:
ports
:
-
'
80'
tester
:
image
:
${
TEST
_IMAGE_PREFIX}_php
image
:
${
BUILD
_IMAGE_PREFIX}_php
links
:
-
'
mariadb:DB'
-
'
seleniumfirefox:HUB'
-
'
nginx:WEB'
volumes
:
-
${
HOST
_APP_VOLUME}/codeception.yml:/app/codeception.yml
-
${
HOST
_APP_VOLUME}/tests:/app/tests
-
${
BUILD
_APP_VOLUME}/codeception.yml:/app/codeception.yml
-
${
BUILD
_APP_VOLUME}/tests:/app/tests
environment
:
-
YII_ENV=test
seleniumfirefox
:
...
...
build/scripts/lint.sh
View file @
f5552fbd
...
...
@@ -2,7 +2,7 @@
EXIT_CODE
=
0
DIRNAME
=
$(
dirname
"
$0
"
)
HOST_APP_VOLUME
=
"
${
HOST
_APP_VOLUME
-
${
PWD
}
/
${
DIRNAME
}
/../..
}
"
BUILD_APP_VOLUME
=
"
${
BUILD
_APP_VOLUME
-
${
PWD
}
/
${
DIRNAME
}
/../..
}
"
DOCKERFILE
=
Dockerfile
DOCKERFILE_PATH
=
.
...
...
@@ -15,10 +15,10 @@ docker-compose run --rm php composer diagnose || EXIT_CODE=1
docker-compose run
--rm
php vendor/bin/php-cs-fixer fix
--dry-run
--format
=
txt
-v
src
||
EXIT_CODE
=
1
docker run
--rm
-v
"
${
HOST
_APP_VOLUME
}
/build/scripts/lint.sh:/tmp/FileToBeChecked"
chrisdaish/shellcheck
||
EXIT_CODE
=
1
docker run
--rm
-v
"
${
HOST
_APP_VOLUME
}
/build/scripts/test.sh:/tmp/FileToBeChecked"
chrisdaish/shellcheck
||
EXIT_CODE
=
1
docker run
--rm
-v
"
${
HOST
_APP_VOLUME
}
/build/scripts/deploy.sh:/tmp/FileToBeChecked"
chrisdaish/shellcheck
||
EXIT_CODE
=
1
docker run
--rm
-v
"
${
HOST
_APP_VOLUME
}
/build/scripts/requirements.sh:/tmp/FileToBeChecked"
chrisdaish/shellcheck
||
EXIT_CODE
=
1
docker run
--rm
-v
"
${
BUILD
_APP_VOLUME
}
/build/scripts/lint.sh:/tmp/FileToBeChecked"
chrisdaish/shellcheck
||
EXIT_CODE
=
1
docker run
--rm
-v
"
${
BUILD
_APP_VOLUME
}
/build/scripts/test.sh:/tmp/FileToBeChecked"
chrisdaish/shellcheck
||
EXIT_CODE
=
1
docker run
--rm
-v
"
${
BUILD
_APP_VOLUME
}
/build/scripts/deploy.sh:/tmp/FileToBeChecked"
chrisdaish/shellcheck
||
EXIT_CODE
=
1
docker run
--rm
-v
"
${
BUILD
_APP_VOLUME
}
/build/scripts/requirements.sh:/tmp/FileToBeChecked"
chrisdaish/shellcheck
||
EXIT_CODE
=
1
set
+v
...
...
build/scripts/test.sh
View file @
f5552fbd
...
...
@@ -3,11 +3,13 @@
EXIT_CODE
=
0
set
-e
make TEST setup up
make TEST clean-tests
set
+e
set
-v
set
+e
make TEST run-tests
codecept_opts
=
'unit prod --html=_report_unit.html'
||
EXIT_CODE
=
1
make TEST run-tests
codecept_opts
=
'functional prod --html=_report_functional.html'
||
EXIT_CODE
=
1
make TEST run-tests
codecept_opts
=
'acceptance prod --html=_report_acceptance.html'
||
EXIT_CODE
=
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment