From ca0ef648d6843e109ce062ed8e3228f0a478e74c Mon Sep 17 00:00:00 2001 From: Aymeric Poude Date: Fri, 20 Apr 2018 07:25:45 +0000 Subject: [PATCH 1/2] Added gitlab-ci config --- .gitlab-ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..ce9ec51 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,37 @@ +stages: + - test + - build + +test:php5: + stage: test + script: + - echo "Running tests" + - export SYMFONY_ENV=test + - rm -rf ./vendor/* + - rm -rf ./var/cache/* + - rm -rf ./var/logs/* + - composer install -o --no-dev + - phpunit --configuration phpunit.xml.dist --coverage-text + tags: + - test + +build_on_s3: + stage: build + script: + - echo "Building the app" + - export SYMFONY_ENV=test + - rm -rf ./vendor/* + - rm -rf ./var/cache/* + - rm -rf ./var/logs/* + - composer install -o --no-dev + - echo "Push to S3 Bucket" + - tar -czf /tmp/$CI_PIPELINE_ID-$CI_COMMIT_SHA.tar.gz --exclude=app/config/parameters.yml --exclude=var/cache/* --exclude=var/logs* --exclude=.git --exclude=.gitignore --warning=no-file-changed . + - aws s3 cp /tmp/$CI_PIPELINE_ID-$CI_COMMIT_SHA.tar.gz s3://$S3_BUCKET_NAME/$CI_PROJECT_PATH/ + - rm /tmp/$CI_PIPELINE_ID-$CI_COMMIT_SHA.tar.gz + tags: + - build + dependencies: + - test:php5 + environment: + name: S3 + url: https://s3.console.aws.amazon.com/s3/buckets/$S3_BUCKET_NAME/$CI_PROJECT_PATH/ \ No newline at end of file From 31437e735be960f91ed61b1bdb8df28b63b9f584 Mon Sep 17 00:00:00 2001 From: Aymeric Poude Date: Fri, 20 Apr 2018 07:26:31 +0000 Subject: [PATCH 2/2] Update filename phpunit.dist.xml -> phpunit.xml.dist --- phpunit.dist.xml => phpunit.xml.dist | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename phpunit.dist.xml => phpunit.xml.dist (100%) diff --git a/phpunit.dist.xml b/phpunit.xml.dist similarity index 100% rename from phpunit.dist.xml rename to phpunit.xml.dist