Commit e1c1ad73 authored by Carlos Natalino's avatar Carlos Natalino
Browse files

Removing deploy step from the webui component.

parent 50ea8491
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -12,8 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import grpc, logging, queue, threading, time
import logging
import queue
import threading
import time
from typing import Callable

import grpc

from common.proto.context_pb2 import Empty
from common.tools.grpc.Tools import grpc_message_to_json_string
from context.client.ContextClient import ContextClient
@@ -44,7 +50,7 @@ class _Collector(threading.Thread):
                for event in self._stream:
                    if self._log_events_received:
                        str_event = grpc_message_to_json_string(event)
                        LOGGER.info('[_collect] event: {:s}'.format(str_event))
                        LOGGER.info(f'[_collect] event: {str_event:s}')
                    timestamp = event.event.timestamp.timestamp
                    self._events_queue.put_nowait((timestamp, event))
            except grpc.RpcError as e:
+24 −24
Original line number Diff line number Diff line
@@ -80,27 +80,27 @@ unit test webui:
        junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml

# Deployment of the service in Kubernetes Cluster
deploy webui:
  variables:
    IMAGE_NAME: 'webui' # name of the microservice
    IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
  stage: deploy
  needs:
    - unit test webui
    # - integ_test execute
  script:
    - 'sed -i "s/$IMAGE_NAME:.*/$IMAGE_NAME:$IMAGE_TAG/" manifests/${IMAGE_NAME}service.yaml'
    - kubectl version
    - kubectl get all
    - kubectl apply -f "manifests/${IMAGE_NAME}service.yaml"
    - kubectl get all
  # environment:
  #   name: test
  #   url: https://example.com
  #   kubernetes:
  #     namespace: test
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
      when: manual    
    - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
      when: manual
# deploy webui:
#   variables:
#     IMAGE_NAME: 'webui' # name of the microservice
#     IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
#   stage: deploy
#   needs:
#     - unit test webui
#     # - integ_test execute
#   script:
#     - 'sed -i "s/$IMAGE_NAME:.*/$IMAGE_NAME:$IMAGE_TAG/" manifests/${IMAGE_NAME}service.yaml'
#     - kubectl version
#     - kubectl get all
#     - kubectl apply -f "manifests/${IMAGE_NAME}service.yaml"
#     - kubectl get all
#   # environment:
#   #   name: test
#   #   url: https://example.com
#   #   kubernetes:
#   #     namespace: test
#   rules:
#     - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
#       when: manual    
#     - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
#       when: manual