diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7c4d375fe..06e398a50c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -179,6 +179,7 @@ e2e_test: - export DASHBOARD_URL=`sudo kubectl describe svc dashboard | grep Endpoints | cut -d ":" -f 2` - export HOME_URL=`sudo kubectl describe svc home | grep Endpoints | cut -d ":" -f 2` - export STATUSPAGE_URL=`sudo kubectl describe svc status-page | grep Endpoints | cut -d ":" -f 2` + - export APIDOCS_URL=`sudo kubectl describe svc api-docs | grep Endpoints | cut -d ":" -f 2` - echo ACCOUNTS_URL=$ACCOUNTS_URL - echo BACKEND_URL=$BACKEND_URL - echo DASHBOARD_URL=$DASHBOARD_URL diff --git a/kubernetes/ci/ci-server.yaml b/kubernetes/ci/ci-server.yaml index 7e135b0878..bd54bc0f1a 100644 --- a/kubernetes/ci/ci-server.yaml +++ b/kubernetes/ci/ci-server.yaml @@ -112,6 +112,61 @@ spec: type: LoadBalancer --- +# Fyipe API docs Deployment +apiVersion: apps/v1 +kind: Deployment +metadata: + name: api-docs + labels: + app: api-docs +spec: + selector: + matchLabels: + app: api-docs + replicas: 1 + template: + metadata: + labels: + app: api-docs + spec: + containers: + - image: localhost:32000/api-docs:master + name: api-docs + imagePullPolicy: Always + env: + - name: FYIPE_HOSTED + value: "true" + - name: HOST + value: "accounts" + - name: BACKEND_HOST + value: "backend" + - name: DASHBOARD_HOST + value: "dashboard" + ports: + - containerPort: 1445 + hostPort: 1445 + name: api-docs + restartPolicy: Always + imagePullSecrets: + - name: gitlabcredv2 +--- +# Fyipe API docs Service +apiVersion: v1 +kind: Service +metadata: + labels: + app: api-docs + name: api-docs +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 1445 + selector: + app: api-docs + type: LoadBalancer +--- + # Fyipe Backend Deployment apiVersion: apps/v1 kind: Deployment diff --git a/kubernetes/ci/hosts-setup.sh b/kubernetes/ci/hosts-setup.sh index 9ab35451ef..5a775bd033 100644 --- a/kubernetes/ci/hosts-setup.sh +++ b/kubernetes/ci/hosts-setup.sh @@ -6,5 +6,7 @@ sudo sed -i '/backend/c\' /etc/hosts echo $BACKEND_URL' backend' | sudo tee -a /etc/hosts sudo sed -i '/home/c\' /etc/hosts echo $HOME_URL' home' | sudo tee -a /etc/hosts -sudo sed -i '/statuspage/c\' /etc/hosts -echo $STATUSPAGE_URL' statuspage' | sudo tee -a /etc/hosts \ No newline at end of file +sudo sed -i '/status-page/c\' /etc/hosts +echo $STATUSPAGE_URL' status-page' | sudo tee -a /etc/hosts +sudo sed -i '/api-docs/c\' /etc/hosts +echo $APIDOCS_URL' api-docs' | sudo tee -a /etc/hosts \ No newline at end of file