From 86fc55083cb45c8b67c3f88d661a134388a83047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Barcarol=20Guimar=C3=A3es?= Date: Tue, 16 Apr 2019 12:39:24 +0000 Subject: [PATCH] rehearse: add integration test for profiles --- .../test-deploy/test-profile/vars.yaml | 1 + test/pj-rehearse-integration/expected.yaml | 110 ++++++++++++++++++ ...uper-duper-cluster-profile-presubmits.yaml | 59 ++++++++++ .../test-deploy/test-profile/vars-origin.yaml | 1 + .../test-deploy/test-profile/vars.yaml | 1 + 5 files changed, 172 insertions(+) create mode 100644 test/pj-rehearse-integration/candidate/cluster/test-deploy/test-profile/vars.yaml create mode 100644 test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-cluster-profile-presubmits.yaml create mode 100644 test/pj-rehearse-integration/master/cluster/test-deploy/test-profile/vars-origin.yaml create mode 100644 test/pj-rehearse-integration/master/cluster/test-deploy/test-profile/vars.yaml diff --git a/test/pj-rehearse-integration/candidate/cluster/test-deploy/test-profile/vars.yaml b/test/pj-rehearse-integration/candidate/cluster/test-deploy/test-profile/vars.yaml new file mode 100644 index 00000000..5ea2ed41 --- /dev/null +++ b/test/pj-rehearse-integration/candidate/cluster/test-deploy/test-profile/vars.yaml @@ -0,0 +1 @@ +changed diff --git a/test/pj-rehearse-integration/expected.yaml b/test/pj-rehearse-integration/expected.yaml index 7c6d7456..eb0d7cb3 100644 --- a/test/pj-rehearse-integration/expected.yaml +++ b/test/pj-rehearse-integration/expected.yaml @@ -130,6 +130,17 @@ ci.openshift.org/rehearse-pull: "1234" created-by-pj-rehearse: "true" name: rehearse-hnq8xb9r-test-template +- data: + vars-origin.yaml: | + vars-origin.yaml + vars.yaml: | + changed + metadata: + creationTimestamp: null + labels: + ci.openshift.org/rehearse-pull: "1234" + created-by-pj-rehearse: "true" + name: rehearse-cluster-profile-test-profile-47224 - apiVersion: prow.k8s.io/v1 kind: ProwJob metadata: @@ -228,6 +239,105 @@ status: startTime: "2019-03-06T22:03:01Z" state: triggered +- apiVersion: prow.k8s.io/v1 + kind: ProwJob + metadata: + annotations: + prow.k8s.io/job: rehearse-1234-pull-ci-super-duper-cluster-profile-test-profile + creationTimestamp: null + labels: + ci.openshift.org/rehearse: "1234" + created-by-prow: "true" + prow.k8s.io/job: rehearse-1234-pull-ci-super-duper-cluster-profile-test-profile + prow.k8s.io/refs.org: openshift + prow.k8s.io/refs.pull: "1234" + prow.k8s.io/refs.repo: release + prow.k8s.io/type: presubmit + name: aa2b50c7-4b4e-11e9-b014-e86a6403f52c + namespace: test-namespace + spec: + agent: kubernetes + cluster: default + context: ci/rehearse/openshift/origin/cluster-profile/test-profile + decoration_config: + gcs_configuration: + bucket: origin-ci-test + default_org: openshift + default_repo: origin + path_strategy: single + gcs_credentials_secret: gce-sa-credentials-gcs-publisher + grace_period: 15000000000 + skip_cloning: true + timeout: 14400000000000 + utility_images: + clonerefs: gcr.io/k8s-prow/clonerefs:v20190129-0a3c54c + entrypoint: gcr.io/k8s-prow/entrypoint:v20190129-0a3c54c + initupload: gcr.io/k8s-prow/initupload:v20190129-0a3c54c + sidecar: gcr.io/k8s-prow/sidecar:v20190129-0a3c54c + job: rehearse-1234-pull-ci-super-duper-cluster-profile-test-profile + namespace: test-namespace + pod_spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --give-pr-author-access-to-namespace=true + - --secret-dir=/usr/local/test-profile-cluster-profile + - --target=test-profile + - --template=/usr/local/test-profile + - --git-ref=openshift/origin@cluster-profile + command: + - ci-operator + env: + - name: CLUSTER_TYPE + value: gcp + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: super-duper-test-profile.yaml + name: ci-operator-configs + - name: JOB_NAME_SAFE + value: test-profile + - name: TEST_COMMAND + value: make test + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/test-profile-cluster-profile + name: cluster-profile + - mountPath: /usr/local/test-profile + name: job-definition + subPath: test-template.yaml + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets-test-profile + - configMap: + name: rehearse-cluster-profile-test-profile-47224 + - configMap: + name: rehearse-hnq8xb9r-test-template + name: job-definition + refs: + base_ref: master + base_sha: a1e0de27c562d86647c901554094d12d7c358ba8 + org: openshift + pulls: + - author: petr-muller + number: 1234 + sha: 7c0b9788f819121ac637fa3f8a319d0bc2cda73e + repo: release + report: true + rerun_command: /test pj-rehearse + type: presubmit + status: + startTime: "2019-02-11T17:02:53Z" + state: triggered - apiVersion: prow.k8s.io/v1 kind: ProwJob metadata: diff --git a/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-cluster-profile-presubmits.yaml b/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-cluster-profile-presubmits.yaml new file mode 100644 index 00000000..3207888f --- /dev/null +++ b/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-cluster-profile-presubmits.yaml @@ -0,0 +1,59 @@ +presubmits: + openshift/origin: + - agent: kubernetes + always_run: false + branches: + - cluster-profile + context: ci/prow/test-profile + decorate: true + decoration_config: + skip_cloning: true + name: pull-ci-super-duper-cluster-profile-test-profile + rerun_command: /test test-profile + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --give-pr-author-access-to-namespace=true + - --secret-dir=/usr/local/test-profile-cluster-profile + - --target=test-profile + - --template=/usr/local/test-profile + command: + - ci-operator + env: + - name: CLUSTER_TYPE + value: gcp + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: super-duper-test-profile.yaml + name: ci-operator-configs + - name: JOB_NAME_SAFE + value: test-profile + - name: TEST_COMMAND + value: make test + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/test-profile-cluster-profile + name: cluster-profile + - mountPath: /usr/local/test-profile + name: job-definition + subPath: test-template.yaml + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets-test-profile + - configMap: + name: cluster-profile-test-profile + - configMap: + name: prow-job-cluster-launch-src + name: job-definition + trigger: '(?m)^/test (?:.*? )?test-profile(?: .*?)?$' diff --git a/test/pj-rehearse-integration/master/cluster/test-deploy/test-profile/vars-origin.yaml b/test/pj-rehearse-integration/master/cluster/test-deploy/test-profile/vars-origin.yaml new file mode 100644 index 00000000..3b6afe8a --- /dev/null +++ b/test/pj-rehearse-integration/master/cluster/test-deploy/test-profile/vars-origin.yaml @@ -0,0 +1 @@ +vars-origin.yaml diff --git a/test/pj-rehearse-integration/master/cluster/test-deploy/test-profile/vars.yaml b/test/pj-rehearse-integration/master/cluster/test-deploy/test-profile/vars.yaml new file mode 100644 index 00000000..dd4b1820 --- /dev/null +++ b/test/pj-rehearse-integration/master/cluster/test-deploy/test-profile/vars.yaml @@ -0,0 +1 @@ +vars.yaml