瀏覽代碼

update workflow

Luciano Andrade 7 年之前
父節點
當前提交
5d89816e36

+ 6 - 3
.drone.yml

@@ -36,7 +36,8 @@ pipeline:
       - chmod 0777 -R var/logs var/cache var/sessions
       - php bin/console doctrine:schema:update --force -vvv --env=test
       - touch var/logs/test.log
-      - tail -f var/logs/*.log &
+      - tail -f var/logs/*.log & 
+      - bin/console server:run --help --end=prod
       - vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist
 
  docker:
@@ -46,8 +47,10 @@ pipeline:
    registry: docker.infra.flowdat.com
    username: drone
    password: 6hd2dLfL
-   tag: latest
+   tag: 
+     - ${DRONE_TAG##v}
+     - latest
    when:
      event: [pull_request, push, tag]
-     branch: master
+     branch: [master, v*]
 

+ 1 - 1
Dockerfile

@@ -39,5 +39,5 @@ CMD eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --
  	cp app/config/url_webservice.yml.docker app/config/url_webservice.yml ;\
  	cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml ;\
 	cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
-    composer run-script post-install-cmd --no-interaction ;\
+        composer run-script post-install-cmd --no-interaction ;\
  	cat app/config/hwioauthbundle/parameters.yml ; bin/console server:run 0.0.0.0 

+ 2 - 1
app/AppKernel.php

@@ -51,9 +51,10 @@ class AppKernel extends Kernel
             $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
             $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
 
-	    $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
         }
 
+	$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
+
         return $bundles;
     }
 

+ 3 - 0
app/config/parameters.yml.dist

@@ -34,3 +34,6 @@ parameters:
     db_session_name: fd_session
     db_session_user: root
     db_session_password: null
+
+    # RabbitMQ routing key 
+    env(AMQP_KEY) : ""

+ 1 - 1
composer.json

@@ -115,7 +115,7 @@
     "config": {
         "secure-http": false,
         "optimize-autoloader": true,
-        "sort-packages": true
+	"sort-packages": true
     },
     "require": {
         "php": ">=5.5.9",

+ 21 - 21
composer.lock

@@ -755,7 +755,7 @@
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
+                "url": "https://satis.infra.flowdat.com/dist/doctrine/instantiator/doctrine-instantiator-8e884e78f9f0eb1329e445619e04456e64d8051d-zip-681b88.zip",
                 "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
                 "shasum": "62a7b8d59ce1dc5627bd2aed2882f18ff1138219"
             },
@@ -1417,7 +1417,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/BaseAdmin.git",
-                "reference": "091097f2a95ee2bb1fa624544a96592088c5008d"
+                "reference": "54acf731bc43ab49b4d622b0696cb3ab2083576c"
             },
             "type": "library",
             "autoload": {
@@ -1432,7 +1432,7 @@
                 "bootstrap",
                 "sonata"
             ],
-            "time": "2017-10-10T14:03:21+00:00"
+            "time": "2017-10-12T12:03:37+00:00"
         },
         {
             "name": "ik/device-bundle",
@@ -1440,7 +1440,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/DeviceBundle.git",
-                "reference": "46120d9bc82158608428664b67ee08eb8bfc8f82"
+                "reference": "a96f4e0d49b3375e1c36612281db18ac1695aa58"
             },
             "type": "library",
             "autoload": {
@@ -1455,7 +1455,7 @@
                 "bundle",
                 "validators"
             ],
-            "time": "2017-10-03T13:20:41+00:00"
+            "time": "2017-10-12T14:50:31+00:00"
         },
         {
             "name": "ik/extra-data-bundle",
@@ -1650,7 +1650,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/WorkflowBundle.git",
-                "reference": "67e88d3b5ebf7bfcb56f933962e02dd6573687f7"
+                "reference": "d1a52302c4d86dea6b3a39b6100ac03f2b3eb65e"
             },
             "require": {
                 "php-amqplib/rabbitmq-bundle": "^1.12"
@@ -1680,7 +1680,7 @@
                 "bundle",
                 "workflow"
             ],
-            "time": "2017-10-11T11:24:03+00:00"
+            "time": "2017-10-12T15:00:52+00:00"
         },
         {
             "name": "incenteev/composer-parameter-handler",
@@ -1953,7 +1953,7 @@
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/schmittjoh/JMSSerializerBundle/zipball/85ee039a2b7f89d77c403e33cee7b43a875c31e5",
+                "url": "https://satis.infra.flowdat.com/dist/jms/serializer-bundle/jms-serializer-bundle-85ee039a2b7f89d77c403e33cee7b43a875c31e5-zip-e99b92.zip",
                 "reference": "85ee039a2b7f89d77c403e33cee7b43a875c31e5",
                 "shasum": "8ceb3e6f31ad9b250fe9070661ee2d4b4d52c0f2"
             },
@@ -2819,7 +2819,7 @@
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/eb6266b3b472e4002538610b28a0a04bcf94891a",
+                "url": "https://satis.infra.flowdat.com/dist/sensio/distribution-bundle/sensio-distribution-bundle-eb6266b3b472e4002538610b28a0a04bcf94891a-zip-b89371.zip",
                 "reference": "eb6266b3b472e4002538610b28a0a04bcf94891a",
                 "shasum": "c880207d73e5af5719bf65852f2890e55cb488d6"
             },
@@ -3304,7 +3304,7 @@
                 "type": "zip",
                 "url": "https://api.github.com/repos/sonata-project/SonataCoreBundle/zipball/a1b837101262af856c45b22e8f0887553edf0fb0",
                 "reference": "a1b837101262af856c45b22e8f0887553edf0fb0",
-                "shasum": "b4eab0224ddcb695619ccfd100c5e2e042a5bd65"
+                "shasum": ""
             },
             "require": {
                 "cocur/slugify": "^1.4 || ^2.0",
@@ -3700,7 +3700,7 @@
                 "type": "zip",
                 "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/6f96c7dbb6b2ef70b307a1a6f897153cbca3da47",
                 "reference": "6f96c7dbb6b2ef70b307a1a6f897153cbca3da47",
-                "shasum": "9bfbf89227cb6c537f05ae2097653339435f30e6"
+                "shasum": ""
             },
             "require": {
                 "monolog/monolog": "~1.22",
@@ -4621,7 +4621,7 @@
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102",
+                "url": "https://satis.infra.flowdat.com/dist/myclabs/deep-copy/myclabs-deep-copy-8e6e04167378abf1ddb4d3522d8755c5fd90d102-zip-b7d758.zip",
                 "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102",
                 "shasum": "37b52563a4ae05716e8477fc781cb03e50599a8f"
             },
@@ -4767,7 +4767,7 @@
                 "type": "zip",
                 "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
                 "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
-                "shasum": "4539a1a703f4610530726a583389f6e85bf38a07"
+                "shasum": ""
             },
             "require": {
                 "php": ">=5.5"
@@ -4911,7 +4911,7 @@
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073",
+                "url": "https://satis.infra.flowdat.com/dist/phpspec/prophecy/phpspec-prophecy-93d39f1f7f9326d746203c7c056f300f7f126073-zip-f944ab.zip",
                 "reference": "93d39f1f7f9326d746203c7c056f300f7f126073",
                 "shasum": "f79466e27f8deee75a60d0b4fd98db55eacf9cc3"
             },
@@ -5038,7 +5038,7 @@
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
+                "url": "https://satis.infra.flowdat.com/dist/phpunit/php-file-iterator/phpunit-php-file-iterator-3cc8f69b3028d0f96a9078e6295d86e9bf019be5-zip-184bc9.zip",
                 "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
                 "shasum": "d3ce5a919fe743126f331988b9a0f7b8302b999a"
             },
@@ -5085,7 +5085,7 @@
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+                "url": "https://satis.infra.flowdat.com/dist/phpunit/php-text-template/phpunit-php-text-template-31f8b717e51d9a2afca6c9f046f5d69fc27c8686-zip-c6bcbd.zip",
                 "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
                 "shasum": "4122b00281fc98e1733bd9ca446002393c452f84"
             },
@@ -5126,7 +5126,7 @@
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
+                "url": "https://satis.infra.flowdat.com/dist/phpunit/php-timer/phpunit-php-timer-3dcf38ca72b158baf0bc245e9184d3fdffa9c46f-zip-c27592.zip",
                 "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
                 "shasum": "f67f992aca05457e1e21f619250770b09092ff7b"
             },
@@ -5367,7 +5367,7 @@
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+                "url": "https://satis.infra.flowdat.com/dist/sebastian/code-unit-reverse-lookup/sebastian-code-unit-reverse-lookup-4419fcdb5eabb9caa61a27c7a1db532a6b55dd18-zip-2b8d33.zip",
                 "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
                 "shasum": "8470a6b3ca913a110aa2580255552a06e995710c"
             },
@@ -5841,7 +5841,7 @@
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+                "url": "https://satis.infra.flowdat.com/dist/sebastian/resource-operations/sebastian-resource-operations-ce990bb21759f94aeafd30209e8cfcdfa8bc3f52-zip-4a3a08.zip",
                 "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
                 "shasum": "248cd12206b575057bf0b19f306d92a2f818dfb1"
             },
@@ -5883,7 +5883,7 @@
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
+                "url": "https://satis.infra.flowdat.com/dist/sebastian/version/sebastian-version-99732be0ddb3361e16ad77b68ba41efc8e979019-zip-0eee83.zip",
                 "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
                 "shasum": "dff8de471afebba9fc6837bb8c886ddc7ebe41bb"
             },
@@ -6085,7 +6085,7 @@
         "voryx/restgeneratorbundle": 20
     },
     "prefer-stable": false,
-    "prefer-lowest": false,
+    "prefer-lowest": true,
     "platform": {
         "php": ">=5.5.9"
     },

+ 0 - 1
src/FTTHBundle/Controller/ONURESTController.php

@@ -103,7 +103,6 @@ class ONURESTController extends RESTController
 		    $errorsString = (string) $errors;
 		    return FOSView::create($errorsString, Codes::HTTP_INTERNAL_SERVER_ERROR);
 	    }else{
-		    $entity->setAdministrativeState("suspend");
 		    $em->persist($entity);
 		    $em->flush($entity);
 

+ 3 - 2
src/FTTHBundle/tests/ONURESTControllerTest.php

@@ -218,8 +218,8 @@ class ONURESTControllerTest extends WebTestCaseBase
         $fakeWebService = $this->getClient()->getContainer()->get('webservice');
         $original->setWebservice($fakeWebService);
 
-        $this->getClient()->request('PATCH',
-            $this->getUriPutDelete() . $json["id"] . "/apply/administrative_state/active_to_suspend.json", array());
+	$this->getClient()->request('PATCH',
+		$this->getUriPutDelete().  $json["id"] . "/apply/administrative_state/active_to_suspend.json" , array());
         $response = $this->getClient()->getResponse();
 
         $json = json_decode($response->getContent(), true);
@@ -265,6 +265,7 @@ class ONURESTControllerTest extends WebTestCaseBase
         $this->assertJson($response->getContent(), "No se obtuvo un objeto json.");
     }
 
+    
     /**
      * Realiza el alta.
      * post_onu -> /api/onus.{_format}