Commit c8618426 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Improved GitLab CI pipeline for initial integration testing of context and device services

parent d0674ec9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ stages:

# include the individual .gitlab-ci.yml of each micro-service
include: 
  - local: '/src/manifests/.gitlab-ci.yml'
  #- local: '/src/monitoring/.gitlab-ci.yml'
  - local: '/src/context/.gitlab-ci.yml'
  - local: '/src/device/.gitlab-ci.yml'
+12 −3
Original line number Diff line number Diff line
# Deployment of dependencies in Kubernetes Cluster
# Deployment of the dependency services in Kubernetes Cluster

dependencies all:
  stage: dependencies
  script:
    - kubectl version
    - kubectl get all
    - kubectl apply -f "manifests/prometheus.yaml"
    - kubectl get all
  when: manual

dependencies context_device:
  stage: dependencies
  script:
    - kubectl version
    - kubectl get all
    - kubectl apply -f "manifests/redisdb.yaml"
    - kubectl delete pods --selector app=redisdb
    - kubectl apply -f "manifests/redis.yaml"
    - kubectl get all
  when: manual
+4 −4
Original line number Diff line number Diff line
@@ -15,19 +15,19 @@ data:
      - role: pod
        namespaces:
          names:
          - teraflow-development
          - gitlab-ci
    - job_name: 'teraflow-metrics-service'
      kubernetes_sd_configs:
      - role: service
        namespaces:
          names:
          - teraflow-development
          - gitlab-ci
    - job_name: 'teraflow-metrics-endpoints'
      kubernetes_sd_configs:
      - role: endpoints
        namespaces:
          names:
          - teraflow-development
          - gitlab-ci
---
apiVersion: apps/v1
kind: Deployment
@@ -71,7 +71,7 @@ spec:
  selector:
    app: prometheus
  ports:
  - name: prometheus-http
  - name: http
    protocol: TCP
    port: 9090
    targetPort: 9090
+7 −7
Original line number Diff line number Diff line
@@ -2,20 +2,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
  name: redisdb
  name: redis
spec:
  selector:
    matchLabels:
      app: redisdb
      app: redis
  replicas: 1
  template:
    metadata:
      labels:
        app: redisdb
        app: redis
        version: v1
    spec:
      containers:
      - name: redisdb
      - name: redis
        image: redis:6.2
        ports:
        - containerPort: 6379
@@ -23,13 +23,13 @@ spec:
apiVersion: v1
kind: Service
metadata:
  name: redisdb
  name: redis
  labels:
    app: redisdb
    app: redis
spec:
  type: ClusterIP
  selector:
    app: redisdb
    app: redis
  ports:
  - name: redis
    protocol: TCP
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ deploy context:
  needs:
    - build context
    - test context
    - dependencies all
    - dependencies context_device
  script:
    - kubectl version
Loading