瀏覽代碼

Merged in FD3-558 (pull request #82)

FD3-558

Approved-by: Maximiliano Schvindt <maximiliano@interlink.com.ar>
Approved-by: Guillermo Espinoza <guillermo@interlink.com.ar>
Luciano Andrade 7 年之前
父節點
當前提交
6a217b93d4

+ 1 - 10
.drone.yml

@@ -36,18 +36,9 @@ pipeline:
 
 
       - chmod 0400 keys/bitbucket.id_rsa
       - chmod 0400 keys/bitbucket.id_rsa
       - eval $(ssh-agent); ssh-add keys/bitbucket.id_rsa
       - eval $(ssh-agent); ssh-add keys/bitbucket.id_rsa
-      - cp app/config/bundles/ik/device-bundle/parameters.yml.drone app/config/bundles/ik/device-bundle/parameters.yml
-      - cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
-      - cp  app/config/parameters.yml.dist                              app/config/parameters.yml
-      - cp  app/config/url_webservice.yml.dist                          app/config/url_webservice.yml
-      - cp  app/config/hwioauthbundle/parameters.yml.dist               app/config/hwioauthbundle/parameters.yml
-      - cp  app/config/bundles/ik/device-bundle/parameters.yml.dist     app/config/bundles/ik/device-bundle/parameters.yml
-      - cp  app/config/bundles/ik/audit-bundle/parameters.yml.dist      app/config/bundles/ik/audit-bundle/parameters.yml
-      - cp  app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
- 
       - composer install -n --no-progress --no-scripts
       - composer install -n --no-progress --no-scripts
+      - composer symfony-scripts
       - php bin/console doctrine:schema:update --force
       - php bin/console doctrine:schema:update --force
-      - composer install -n --no-progress 
       - composer dump-autoload --optimize
       - composer dump-autoload --optimize
       - chmod 0777 -R var/logs var/cache var/sessions
       - chmod 0777 -R var/logs var/cache var/sessions
       - php bin/console doctrine:schema:update --force -vvv --env=test
       - php bin/console doctrine:schema:update --force -vvv --env=test

+ 15 - 11
Dockerfile

@@ -10,11 +10,11 @@ RUN rm -f app/config/parameters.yml
 RUN rm -f app/config/url_webservice.yml
 RUN rm -f app/config/url_webservice.yml
 RUN rm -f app/config/hwioauthbundle/parameters.yml
 RUN rm -f app/config/hwioauthbundle/parameters.yml
 
 
-RUN cp app/config/parameters.yml.docker app/config/parameters.yml
-RUN cp app/config/url_webservice.yml.docker app/config/url_webservice.yml
-RUN cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml
-
-RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml
+# estos archivos deben ser generados con su correspondiente .dist desde el composer.
+#RUN cp app/config/parameters.yml.docker app/config/parameters.yml
+#RUN cp app/config/url_webservice.yml.docker app/config/url_webservice.yml
+#RUN cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml
+#RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml
 
 
 RUN rm -rf /opt/ftth/app/config/parameters.yml /opt/ftth/app/config/url_webservice.yml
 RUN rm -rf /opt/ftth/app/config/parameters.yml /opt/ftth/app/config/url_webservice.yml
 
 
@@ -28,11 +28,11 @@ RUN pip install -e /opt/netmiko
 
 
 RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; git clone git@bitbucket.org:ikflowdat/json-wsdl.git /opt/json-wsdl ;  cd /opt/json-wsdl ; composer install --no-scripts --no-interaction --no-progress
 RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; git clone git@bitbucket.org:ikflowdat/json-wsdl.git /opt/json-wsdl ;  cd /opt/json-wsdl ; composer install --no-scripts --no-interaction --no-progress
 
 
-RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
-    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 ;\
-    cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
+#RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
+#    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 ;\
+#    cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
 
 
 RUN apt-get update && apt-get install -yq php-fpm
 RUN apt-get update && apt-get install -yq php-fpm
 RUN sed -i 's#listen = /run/php/php7.0-fpm.sock#listen = 0.0.0.0:9000#g' /etc/php/7.0/fpm/pool.d/www.conf
 RUN sed -i 's#listen = /run/php/php7.0-fpm.sock#listen = 0.0.0.0:9000#g' /etc/php/7.0/fpm/pool.d/www.conf
@@ -41,7 +41,11 @@ RUN sed -i 's#user = www-data#user = root#g' /etc/php/7.0/fpm/pool.d/www.conf
 RUN sed -i 's#group = www-data#group = root#g' /etc/php/7.0/fpm/pool.d/www.conf
 RUN sed -i 's#group = www-data#group = root#g' /etc/php/7.0/fpm/pool.d/www.conf
 RUN mkdir -p /run/php
 RUN mkdir -p /run/php
 
 
-CMD eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress;\
+CMD env ; cp /opt/ftth/keys/fullchain.pem /usr/share/ca-certificates/$HOST_BASE ;\
+    cat /usr/local/share/ca-certificates/$HOST_BASE ;\ 
+    echo $HOST_BASE >> /etc/ca-certificates.conf ;\
+    update-ca-certificates ;\
+    eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress;\
     rm var/cache/* -rf ;\
     rm var/cache/* -rf ;\
     composer run-script post-install-cmd --no-interaction ;\
     composer run-script post-install-cmd --no-interaction ;\
     cat app/config/hwioauthbundle/parameters.yml ;\
     cat app/config/hwioauthbundle/parameters.yml ;\

文件差異過大導致無法顯示
+ 39 - 61
app/DoctrineMigrations/src/template.yml


+ 8 - 8
app/config/bundles/ik/device-bundle/parameters.yml.dist

@@ -1,9 +1,9 @@
 parameters:
 parameters:
-    device_check_url: 'http://%env(HOST_BASE)%/api/devices/check.json'
-    device_post_url: 'http://%env(HOST_BASE)%/api/devices.json'
-    device_delete_post_url: 'http://%env(HOST_BASE)%/api/devices/'
-    device_put_url: 'http://%env(HOST_BASE)%/api/devices/'
-    api_device_check_url: 'http://%env(HOST_BASE)%/api/devices/check.json'
-    api_device_post_url: 'http://%env(HOST_BASE)%/api/devices.json'
-    api_device_delete_post_url: 'http://%env(HOST_BASE)%/api/devices/'
-    api_device_put_url: 'http://%env(HOST_BASE)%/api/devices/'
+    device_check_url: 'https://%env(HOST_BASE)%/api/devices/check.json'
+    device_post_url: 'https://%env(HOST_BASE)%/api/devices.json'
+    device_delete_post_url: 'https://%env(HOST_BASE)%/api/devices/'
+    device_put_url: 'https://%env(HOST_BASE)%/api/devices/'
+    api_device_check_url: 'https://%env(HOST_BASE)%/api/devices/check.json'
+    api_device_post_url: 'https://%env(HOST_BASE)%/api/devices.json'
+    api_device_delete_post_url: 'https://%env(HOST_BASE)%/api/devices/'
+    api_device_put_url: 'https://%env(HOST_BASE)%/api/devices/'

+ 0 - 9
app/config/bundles/ik/device-bundle/parameters.yml.docker

@@ -1,9 +0,0 @@
-parameters:
-    device_check_url: 'http://%env(HOST_BASE)%/api/devices/check.json'
-    device_post_url: 'http://%env(HOST_BASE)%/api/devices.json'
-    device_delete_post_url: 'http://%env(HOST_BASE)%/api/devices/'
-    device_put_url: 'http://%env(HOST_BASE)%/api/devices/'
-    api_device_check_url: 'http://%env(HOST_BASE)%/api/devices/check.json'
-    api_device_post_url: 'http://%env(HOST_BASE)%/api/devices.json'
-    api_device_delete_post_url: 'http://%env(HOST_BASE)%/api/devices/'
-    api_device_put_url: 'http://%env(HOST_BASE)%/api/devices/'

+ 0 - 10
app/config/bundles/ik/device-bundle/parameters.yml.drone

@@ -1,10 +0,0 @@
-parameters:
-    device_check_url: 'http://device.check.url/base/app_dev.php/api/devices/check.json'
-    device_post_url: 'http://device.post.url/base/app_dev.php/api/devices.json'
-    device_delete_post_url: 'http://device.delete.post.url/base/app_dev.php/api/devices/'
-    device_put_url: 'http://device.put.url/base/app_dev.php/api/devices/'
-    api_device_check_url: 'http://base:80/api/devices/check.json'
-    api_device_post_url: 'http://base:80/api/devices.json'
-    api_device_delete_post_url: 'http://base:80/api/devices/'
-    api_device_put_url: 'http://base:80/api/devices/'
- 

+ 1 - 1
src/FTTHBundle/Entity/TrafficProfile.php

@@ -17,7 +17,7 @@ use Symfony\Component\Validator\Constraints as Assert;
  * @ORM\Entity
  * @ORM\Entity
  * @HasLifecycleCallbacks
  * @HasLifecycleCallbacks
  */
  */
-class TrafficProfile implements TenancyIdTraitInterface {
+class TrafficProfile implements TenancyIdTraitInterface, UseOneDefaultInterface{
     use ONUTrait;
     use ONUTrait;
     use TenancyIdTrait;
     use TenancyIdTrait;
 
 

+ 1 - 1
src/FTTHBundle/Entity/VLanID.php

@@ -17,7 +17,7 @@ use Symfony\Component\Validator\Constraints as Assert;
  * @ORM\Entity
  * @ORM\Entity
  * @HasLifecycleCallbacks
  * @HasLifecycleCallbacks
  */
  */
-class VLanID implements TenancyIdTraitInterface
+class VLanID implements TenancyIdTraitInterface, UseOneDefaultInterface
 {
 {
     use ONUTrait;
     use ONUTrait;
     use TenancyIdTrait;
     use TenancyIdTrait;