Commit 17ba48e7 authored by David Mendez's avatar David Mendez

Merge branch 'staging' into 'master'

Add CI to Deploy to staging

See merge request !1
parents a8618220 84a9bca4
Pipeline #93282 passed with stages
in 4 minutes and 4 seconds
This diff is collapsed.
......@@ -39,4 +39,4 @@ services:
target: task-status-daemon
args:
<<: *build_args
image: "${STATUS_DAEMON_IMAGE_TAG:-chembl/es-subset-generator-tasks-daemon:prod}"
\ No newline at end of file
image: "${TASKS_DAEMON_IMAGE_TAG:-chembl/es-subset-generator-tasks-daemon:prod}"
\ No newline at end of file
#!/usr/bin/env python3
# pylint: disable=import-error
"""
Script that runs the functional tests for the app
"""
import argparse
PARSER = argparse.ArgumentParser()
PARSER.add_argument('server_base_path', help='server base path to run the tests against',
default='http://127.0.0.1:5000', nargs='?')
ARGS = PARSER.parse_args()
def run():
"""
Runs all functional tests
"""
print(f'Running functional tests on {ARGS.server_base_path}')
if __name__ == "__main__":
run()
apiVersion: apps/v1
kind: Deployment
metadata:
name: es-subset-generator
namespace: <NAMESPACE>
spec:
replicas: <NUM_REPLICAS>
selector:
matchLabels:
app: es-subset-generator
template:
metadata:
labels:
app: es-subset-generator
spec:
containers:
- name: es-subset-generator-api
image: <SERVER_IMAGE_TAG>
imagePullPolicy: Always
resources:
limits:
cpu: <CPU_LIMIT>
requests:
cpu: <CPU_REQUESTED>
volumeMounts:
- name: run-config
mountPath: '/etc/run_config/'
readOnly: true
- name: gunicorn-config
mountPath: '/etc/gunicorn_config/'
readOnly: true
env:
- name: HTTP_PROXY
value: "<HTTP_PROXY>"
- name: http_proxy
value: "<HTTP_PROXY>"
- name: HTTPS_PROXY
value: "<HTTPS_PROXY>"
- name: https_proxy
value: "<HTTPS_PROXY>"
- name: NO_PROXY
value: "<NO_PROXY>"
- name: no_proxy
value: "<NO_PROXY>"
- name: es-subset-generator-tasks-daemon
image: <TASKS_DAEMON_IMAGE_TAG>
imagePullPolicy: Always
resources:
limits:
cpu: <CPU_LIMIT>
requests:
cpu: <CPU_REQUESTED>
volumeMounts:
- name: run-config
mountPath: '/etc/run_config/'
readOnly: true
- name: gunicorn-config
mountPath: '/etc/gunicorn_config/'
readOnly: true
env:
- name: HTTP_PROXY
value: "<HTTP_PROXY>"
- name: http_proxy
value: "<HTTP_PROXY>"
- name: HTTPS_PROXY
value: "<HTTPS_PROXY>"
- name: https_proxy
value: "<HTTPS_PROXY>"
- name: NO_PROXY
value: "<NO_PROXY>"
- name: no_proxy
value: "<NO_PROXY>"
volumes:
- name: run-config
secret:
secretName: <RUN_CONFIG_SECRET_NAME>
- name: gunicorn-config
secret:
secretName: <GUNICORN_CONFIG_SECRET_NAME>
---
apiVersion: v1
kind: Service
metadata:
name: es-subset-generator
namespace: <NAMESPACE>
spec:
type: NodePort
selector:
app: es-subset-generator
ports:
- port: 5000
targetPort: 5000
"""
WSGI config for the ES Subset Generator API Server.
"""
from app import create_app
FLASK_APP = create_app()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment