Skip to content
Snippets Groups Projects
Commit caf5b79c authored by Benjamin Guillon's avatar Benjamin Guillon :metal:
Browse files

Update .gitlab-ci.yml

parent dd9309e4
No related branches found
No related tags found
3 merge requests!5Module Tapes : Try fixing bug 'Mixed Content The page at was loaded over...,!3Openshift deployment,!2Openshift deployment
Pipeline #64603 failed
......@@ -2,35 +2,39 @@ stages:
- build
- test
nginx-image-build:
stage: build
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
image: docker:latest
default:
services:
- docker:dind
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/nginx:$CI_COMMIT_REF_SLUG" -f ./docker/nginx/Dockerfile .
- docker push "$CI_REGISTRY_IMAGE/nginx:$CI_COMMIT_REF_SLUG"
- docker:dind
image: docker:latest
php-image-build:
stage: build
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
image: docker:latest
services:
- docker:dind
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/php-fpm:$CI_COMMIT_REF_SLUG" -f ./docker/php-fpm/Dockerfile .
- docker push "$CI_REGISTRY_IMAGE/php-fpm:$CI_COMMIT_REF_SLUG"
nginx-image-build:
stage: build
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
needs:
- php-image-build
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/nginx:$CI_COMMIT_REF_SLUG" -f ./docker/nginx/Dockerfile .
- docker push "$CI_REGISTRY_IMAGE/nginx:$CI_COMMIT_REF_SLUG"
test:
stage: test
image: $CI_REGISTRY_IMAGE/php-fpm:$CI_COMMIT_REF_SLUG
variables:
# Don't git clone, the software is already in the image run
GIT_STRATEGY: none
needs:
- php-image-build
script:
- ls -la .
- cd $CI_BUILD_DIR && sh ./vendor/bin/simple-phpunit --configuration phpunit.xml.dist
- pwd && ls -la .
- sh .tms/vendor/bin/simple-phpunit --configuration phpunit.xml.dist
## TODO: Define unit tests
## TODO: Add unit tests report as job artifact
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment