Skip to content

Commit

Permalink
Add periodic job for Compass integration (kyma-project#1221)
Browse files Browse the repository at this point in the history
  • Loading branch information
kfurgol committed Jul 5, 2019
1 parent 461c71f commit f4f789b
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 1 deletion.
12 changes: 11 additions & 1 deletion development/tools/jobs/kyma/kyma_integration_test.go
Expand Up @@ -362,7 +362,7 @@ func TestKymaIntegrationJobPeriodics(t *testing.T) {
require.NoError(t, err)

periodics := jobConfig.Periodics
assert.Len(t, periodics, 16)
assert.Len(t, periodics, 17)

expName := "orphaned-disks-cleaner"
disksCleanerPeriodic := tester.FindPeriodicJobByName(periodics, expName)
Expand Down Expand Up @@ -602,4 +602,14 @@ func TestKymaIntegrationJobPeriodics(t *testing.T) {
tester.AssertThatContainerHasEnv(t, cont, "KYMA_ALERTS_CHANNEL", "#c4core-kyma-gopher-pr")
tester.AssertThatContainerHasEnvFromSecret(t, cont, "KYMA_ALERTS_SLACK_API_URL", "kyma-alerts-slack-api-url", "secret")

expName = "kyma-gke-compass-integration-periodic"
compassPeriodic := tester.FindPeriodicJobByName(periodics, expName)
require.NotNil(t, compassPeriodic)
assert.True(t, compassPeriodic.Decorate)
assert.Equal(t, "eu.gcr.io/kyma-project/test-infra/kyma-cluster-infra:v20190528-8897828", compassPeriodic.Spec.Containers[0].Image)
tester.AssertThatHasExtraRefTestInfra(t, compassPeriodic.JobBase.UtilityConfig, "master")
tester.AssertThatHasExtraRefs(t, compassPeriodic.JobBase.UtilityConfig, []string{"test-infra"})
tester.AssertThatContainerHasEnv(t, compassPeriodic.Spec.Containers[0], "CLOUDSDK_COMPUTE_ZONE", "europe-west4-b")
tester.AssertThatContainerHasEnv(t, compassPeriodic.Spec.Containers[0], "CUSTOM_INSTALLER_CR_PATH", "/home/prow/go/src/github.com/kyma-project/test-infra/prow/jobs/incubator/compass/resources/installer-cr-cluster-with-compass.yaml.tpl")

}
@@ -0,0 +1,71 @@
apiVersion: "installer.kyma-project.io/v1alpha1"
kind: Installation
metadata:
name: kyma-installation
labels:
action: install
kyma-project.io/installation: ""
finalizers:
- finalizer.installer.kyma-project.io
spec:
version: "__VERSION__"
url: "__URL__"
components:
- name: "cluster-essentials"
namespace: "kyma-system"
- name: "testing"
namespace: "kyma-system"
- name: "istio-init"
namespace: "istio-system"
- name: "istio"
namespace: "istio-system"
- name: "xip-patch"
namespace: "kyma-installer"
- name: "istio-kyma-patch"
namespace: "istio-system"
- name: "knative-serving"
namespace: "knative-serving"
- name: "knative-eventing"
namespace: "knative-eventing"
- name: "prometheus-operator"
namespace: "kyma-system"
- name: "dex"
namespace: "kyma-system"
#- name: "ory"
# namespace: "kyma-system"
- name: "service-catalog"
namespace: "kyma-system"
- name: "service-catalog-addons"
namespace: "kyma-system"
- name: "helm-broker"
namespace: "kyma-system"
- name: "nats-streaming"
namespace: "natss"
- name: "assetstore"
namespace: "kyma-system"
- name: "cms"
namespace: "kyma-system"
- name: "core"
namespace: "kyma-system"
- name: "knative-provisioner-natss"
namespace: "knative-eventing"
- name: "event-bus"
namespace: "kyma-system"
- name: "application-connector-ingress"
namespace: "kyma-system"
- name: "application-connector-helper"
namespace: "kyma-integration"
- name: "application-connector"
namespace: "kyma-integration"
- name: "velero-essentials"
namespace: "kyma-backup"
- name: "velero"
namespace: "kyma-backup"
- name: "logging"
namespace: "kyma-system"
- name: "jaeger"
namespace: "kyma-system"
- name: "monitoring"
namespace: "kyma-system"
- name: "compass"
namespace: "compass-system"
34 changes: 34 additions & 0 deletions prow/jobs/kyma/kyma-integration.yaml
Expand Up @@ -1024,3 +1024,37 @@ periodics:
requests:
memory: 200Mi
cpu: 80m

- name: kyma-gke-compass-integration-periodic
cron: "*/20 * * * *" # "Every 20th minute" //TODO its for testing purpose, change to every day
skip_report: false
decorate: true
path_alias: github.com/kyma-project/kyma
max_concurrency: 10
spec:
containers:
- image: eu.gcr.io/kyma-project/test-infra/kyma-cluster-infra:v20190528-8897828
securityContext:
privileged: true
command:
- "bash"
env:
- name: CLOUDSDK_COMPUTE_ZONE
value: "europe-west4-b"
- name: CUSTOM_INSTALLER_CR_PATH
value: "/home/prow/go/src/github.com/kyma-project/test-infra/prow/jobs/incubator/compass/resources/installer-cr-cluster-with-compass.yaml.tpl"
args:
- "-c"
- "${KYMA_PROJECT_DIR}/test-infra/prow/scripts/cluster-integration/kyma-gke-integration.sh"
resources:
requests:
memory: 200Mi
cpu: 80m
branches:
- ^master$
labels:
preset-build-master: "true"
<<: *gke_job_labels_template
extra_refs:
- <<: *test_infra_ref
base_ref: master
3 changes: 3 additions & 0 deletions prow/scripts/cluster-integration/kyma-gke-integration.sh
Expand Up @@ -167,6 +167,9 @@ KYMA_RESOURCES_DIR="${KYMA_SOURCES_DIR}/installation/resources"

INSTALLER_YAML="${KYMA_RESOURCES_DIR}/installer.yaml"
INSTALLER_CR="${KYMA_RESOURCES_DIR}/installer-cr-cluster.yaml.tpl"
if [[ "${CUSTOM_INSTALLER_CR_PATH}" ]]; then
INSTALLER_CR=${CUSTOM_INSTALLER_CR_PATH}
fi

#Used to detect errors for logging purposes
ERROR_LOGGING_GUARD="true"
Expand Down

0 comments on commit f4f789b

Please sign in to comment.