From 1dc078e7ba1431d0d352e22f4bbcc724c0ffe0ec Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Thu, 8 Mar 2018 16:00:39 +0000 Subject: [PATCH 1/6] fixes index and composer --- composer.json | 2 +- index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index e7ac977..00e7dd8 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { "require": { - "symfony/yaml" : "*", + "symfony/yaml" : "*" } } diff --git a/index.php b/index.php index 03efc33..b90d519 100644 --- a/index.php +++ b/index.php @@ -7,7 +7,7 @@ $array = array( 'foo' => 'bar', - 'bar' => array('foo' => 'bar', 'bar' => 'baz' => 'test'), + 'bar' => array('foo' => 'bar', 'bar' => 'baz' , 'test' => 'test'), ); echo Yaml::dump($array); From bf296ee01d1d7ad3e5df50db7a79f4ce306175dc Mon Sep 17 00:00:00 2001 From: Sebastien GERVAIS Date: Thu, 8 Mar 2018 16:03:52 +0000 Subject: [PATCH 2/6] Add .drone.yml --- .drone.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..8cfa155 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,20 @@ +# Declare a pipeline +pipeline: + # Declare pipeline step + composer-install: + # Use image for step + image: fpfis/php71-build + # Run commands from this image + commands: + - composer install --ansi + + # Declare another step + lint-code: + image: fpfis/php71-build + commands: + - php -l index.php + + run-code: + image: fpfis/php71-build + commands: + - php index.php From dfd1aa41a8ce4552f721aa7acab4449e3e25d8b4 Mon Sep 17 00:00:00 2001 From: Sebastien GERVAIS Date: Thu, 8 Mar 2018 16:10:51 +0000 Subject: [PATCH 3/6] add docker compose test --- .drone.yml | 6 ++++++ docker-compose.yaml | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 docker-compose.yaml diff --git a/.drone.yml b/.drone.yml index 8cfa155..121cfd9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,3 +18,9 @@ pipeline: image: fpfis/php71-build commands: - php index.php + + test-docker-compose: + image: docker pull docker/compose + commands: + - docker-compose up + diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..3fb6119 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,23 @@ +version: '2' +services: + + # Define a PHP webserver + php-webserver: + # Use a PHP image with apache + image: fpfis/php56-dev + # Define settings + environment: + - XDEBUG=true + - DOCUMENT_ROOT=/app/build + # Mount a local volume in the container + volumes: + - ./:/app/build + # Share the container port with the host + ports: + - 8080:8080 + + # Define a mysql service + mysql: + image: fpfis/mysql56 + + From bdb7e45f009392ff779a76ea0d3e33e002f2194c Mon Sep 17 00:00:00 2001 From: Sebastien GERVAIS Date: Thu, 8 Mar 2018 16:19:24 +0000 Subject: [PATCH 4/6] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 121cfd9..1b72912 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,7 +20,7 @@ pipeline: - php index.php test-docker-compose: - image: docker pull docker/compose + image: docker/compose commands: - docker-compose up From d0493b55a782713a8aed13153d46cc9854df3d28 Mon Sep 17 00:00:00 2001 From: Sebastien GERVAIS Date: Thu, 8 Mar 2018 16:26:09 +0000 Subject: [PATCH 5/6] fix --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1b72912..67c2dc8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,8 +19,8 @@ pipeline: commands: - php index.php - test-docker-compose: - image: docker/compose - commands: - - docker-compose up +# test-docker-compose: +# image: docker/compose +# commands: +# - docker-compose up From 4212ec1b21d1117b1842ad2bd6cc4a39bbb3607f Mon Sep 17 00:00:00 2001 From: Sebastien GERVAIS Date: Thu, 8 Mar 2018 16:53:03 +0000 Subject: [PATCH 6/6] test --- .drone.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.drone.yml b/.drone.yml index 67c2dc8..7f29fea 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,4 +1,15 @@ + + # Declare a pipeline +workspace: + base: /app + path: test +services: + web: + image: fpfis/php56-build + environment: + - DOCUMENT_ROOT=/app/test + pipeline: # Declare pipeline step composer-install: @@ -19,6 +30,11 @@ pipeline: commands: - php index.php + check_http: + image: fpfis/php56-build + commands: + - wget http://web:8080/index.php + # test-docker-compose: # image: docker/compose # commands: