diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 68874eb9..d41ad965 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,7 +42,7 @@ test_dev: - python ./config-generate.py ${CARA_INSTANCE} --output-directory ./${CARA_INSTANCE}/expected - python ./config-normalise.py ./${CARA_INSTANCE}/actual ./${CARA_INSTANCE}/actual-normed - python ./config-normalise.py ./${CARA_INSTANCE}/expected ./${CARA_INSTANCE}/expected-normed - - diff -u ./test-cara/actual-normed/ ./${CARA_INSTANCE}/expected-normed/ + - diff -u ./${CARA_INSTANCE}/actual-normed/ ./${CARA_INSTANCE}/expected-normed/ artifacts: paths: @@ -59,6 +59,15 @@ check_openshift_config_test-cara: OC_TOKEN: "${OPENSHIFT_CONFIG_CHECKER_TOKEN_TEST_CARA}" +check_openshift_config_prod: + extends: .test_openshift_config + variables: + CARA_INSTANCE: 'cara' + BRANCH: 'master' + OC_SERVER: openshift.cern.ch + OC_TOKEN: "${OPENSHIFT_CONFIG_CHECKER_TOKEN_PROD}" + + # A development installation of CARA tested with pytest. test_dev-39: variables: diff --git a/app-config/openshift/buildconfig.yaml b/app-config/openshift/buildconfig.yaml index f1f6b8f0..52dd8380 100644 --- a/app-config/openshift/buildconfig.yaml +++ b/app-config/openshift/buildconfig.yaml @@ -41,6 +41,9 @@ namespace: openshift type: Source triggers: + - type: ImageChange + imageChange: {} + - type: ConfigChange - generic: secretReference: name: gitlab-cara-webhook-secret diff --git a/app-config/openshift/deploymentconfig.yaml b/app-config/openshift/deploymentconfig.yaml index a473f6a6..fcdd97e1 100644 --- a/app-config/openshift/deploymentconfig.yaml +++ b/app-config/openshift/deploymentconfig.yaml @@ -73,6 +73,7 @@ kind: DeploymentConfig metadata: name: cara-app + labels: {app: cara-app} spec: replicas: 1 template: @@ -81,16 +82,18 @@ app: cara-app spec: containers: - - name: cara-app + - name: cara-webservice env: - name: APP_NAME value: cara-voila - image: '${PROJECT_NAME}/cara-app' + image: '${PROJECT_NAME}/cara-webservice' ports: - containerPort: 8080 protocol: TCP imagePullPolicy: Always - resources: {} + resources: + limits: { cpu: '1', memory: 1Gi } + requests: { cpu: 1m, memory: 512Mi } terminationMessagePath: /dev/termination-log terminationMessagePolicy: File dnsPolicy: ClusterFirst @@ -117,10 +120,10 @@ imageChangeParams: automatic: true containerNames: - - cara-app + - cara-webservice from: kind: ImageStreamTag - name: 'cara-app:latest' + name: 'cara-webservice:latest' namespace: ${PROJECT_NAME} - apiVersion: v1 @@ -165,7 +168,6 @@ selector: app: cara-router triggers: - - type: ConfigChange - type: ImageChange imageChangeParams: automatic: true @@ -181,6 +183,9 @@ kind: DeploymentConfig metadata: name: cara-webservice + labels: + image: cara-webservice + app: cara-webservice spec: replicas: 1 template: @@ -196,6 +201,8 @@ secretKeyRef: key: COOKIE_SECRET name: auth-service-secrets + - name: REPORT_PARALLELISM + value: '3' - name: APP_NAME value: cara-webservice - name: CARA_CALCULATOR_PREFIX @@ -260,6 +267,9 @@ kind: DeploymentConfig metadata: name: cara-calculator-open + labels: + image: cara-webservice + app: cara-calculator-open spec: replicas: 1 template: