From 7b91721adbea1887bb8b1992311f8e631d4c8598 Mon Sep 17 00:00:00 2001 From: Vadim Rutkovsky Date: Wed, 23 Oct 2019 15:20:02 +0200 Subject: [PATCH 1/3] Add jobs to build FCOS forks of MCD and installer These jobs will inherit from Origin and publish back to Origin. The release controller will take all 4.3 CI images except these and publish them into origin 4.3. --- .../installer/openshift-installer-fcos.yaml | 140 +++++++ ...penshift-machine-config-operator-fcos.yaml | 41 ++ .../openshift-installer-fcos-postsubmits.yaml | 46 +++ .../openshift-installer-fcos-presubmits.yaml | 359 ++++++++++++++++++ ...hine-config-operator-fcos-postsubmits.yaml | 46 +++ ...chine-config-operator-fcos-presubmits.yaml | 215 +++++++++++ 6 files changed, 847 insertions(+) create mode 100644 ci-operator/config/openshift/installer/openshift-installer-fcos.yaml create mode 100644 ci-operator/config/openshift/machine-config-operator/openshift-machine-config-operator-fcos.yaml create mode 100644 ci-operator/jobs/openshift/installer/openshift-installer-fcos-postsubmits.yaml create mode 100644 ci-operator/jobs/openshift/installer/openshift-installer-fcos-presubmits.yaml create mode 100644 ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-fcos-postsubmits.yaml create mode 100644 ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-fcos-presubmits.yaml diff --git a/ci-operator/config/openshift/installer/openshift-installer-fcos.yaml b/ci-operator/config/openshift/installer/openshift-installer-fcos.yaml new file mode 100644 index 0000000000000..52953d636520f --- /dev/null +++ b/ci-operator/config/openshift/installer/openshift-installer-fcos.yaml @@ -0,0 +1,140 @@ +base_images: + base: + name: "4.3" + namespace: origin + tag: base +build_root: + image_stream_tag: + name: release + namespace: openshift + tag: golang-1.12 +images: +- dockerfile_path: images/installer/Dockerfile.ci + from: base + inputs: + root: + as: + - build + paths: null + to: installer +- dockerfile_path: images/installer-artifacts/Dockerfile.rhel + from: installer + inputs: + root: + as: + - build + paths: null + to: installer-artifacts +- dockerfile_path: images/nested-libvirt/Dockerfile + from: base + inputs: + root: + as: + - build + paths: null + to: libvirt-installer +- dockerfile_path: images/installer/Dockerfile.upi.ci + from: base + inputs: + root: + as: + - build + paths: null + to: upi-installer +- dockerfile_path: images/openstack/Dockerfile.ci + from: base + inputs: + root: + as: + - build + paths: null + to: openstack-installer +- dockerfile_path: images/baremetal/Dockerfile.ci + from: base + inputs: + root: + as: + - build + paths: null + to: baremetal-installer +promotion: + name: "4.3" + namespace: origin +resources: + '*': + limits: + memory: 4Gi + requests: + cpu: 100m + memory: 200Mi + baremetal-installer: + limits: + memory: 9Gi + requests: + cpu: "3" + memory: 5Gi + installer: + limits: + memory: 9Gi + requests: + cpu: "3" + memory: 5Gi + installer-artifacts: + limits: + memory: 9Gi + requests: + cpu: "3" + memory: 5Gi + libvirt-installer: + limits: + memory: 9Gi + requests: + cpu: "3" + memory: 5Gi + openstack-installer: + limits: + memory: 9Gi + requests: + cpu: "3" + memory: 5Gi + unit: + limits: + memory: 9Gi + requests: + cpu: "3" + memory: 5Gi + upi-installer: + limits: + memory: 9Gi + requests: + cpu: "3" + memory: 5Gi +tag_specification: + name: "4.3" + namespace: origin +tests: +- as: unit + commands: go test ./pkg/... + container: + from: src +- as: gofmt + commands: IS_CONTAINER=TRUE ./hack/go-fmt.sh . + container: + from: src +- as: govet + commands: IS_CONTAINER=TRUE ./hack/go-vet.sh ./... + container: + from: src +- as: golint + commands: IS_CONTAINER=TRUE ./hack/go-lint.sh -min_confidence 0.3 $(go list -f '{{ + .ImportPath }}' ./...) + container: + from: src +- as: verify-vendor + commands: IS_CONTAINER=TRUE ./hack/verify-vendor.sh + container: + from: src +- as: e2e-aws + commands: TEST_SUITE=openshift/conformance/parallel run-tests + openshift_installer: + cluster_profile: aws diff --git a/ci-operator/config/openshift/machine-config-operator/openshift-machine-config-operator-fcos.yaml b/ci-operator/config/openshift/machine-config-operator/openshift-machine-config-operator-fcos.yaml new file mode 100644 index 0000000000000..4593e743b26b0 --- /dev/null +++ b/ci-operator/config/openshift/machine-config-operator/openshift-machine-config-operator-fcos.yaml @@ -0,0 +1,41 @@ +base_images: + base: + name: "4.3" + namespace: origin + tag: base +build_root: + image_stream_tag: + name: release + namespace: openshift + tag: golang-1.12 +images: +- dockerfile_path: Dockerfile + from: base + to: machine-config-operator +promotion: + name: "4.3" + namespace: origin +resources: + '*': + limits: + memory: 8Gi + requests: + cpu: 100m + memory: 200Mi +tag_specification: + name: "4.3" + namespace: origin +tests: +- as: unit + commands: make test-unit + container: + from: src +- as: e2e-aws + commands: TEST_SUITE=openshift/conformance/parallel run-tests + openshift_installer: + cluster_profile: aws +- as: verify + commands: | + make verify + container: + from: src diff --git a/ci-operator/jobs/openshift/installer/openshift-installer-fcos-postsubmits.yaml b/ci-operator/jobs/openshift/installer/openshift-installer-fcos-postsubmits.yaml new file mode 100644 index 0000000000000..8ee90a672b65f --- /dev/null +++ b/ci-operator/jobs/openshift/installer/openshift-installer-fcos-postsubmits.yaml @@ -0,0 +1,46 @@ +postsubmits: + openshift/installer: + - agent: kubernetes + branches: + - ^fcos$ + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + name: branch-ci-openshift-installer-fcos-images + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=fcos + - --give-pr-author-access-to-namespace=true + - --org=openshift + - --promote + - --repo=installer + - --resolver-address=http://ci-operator-configresolver + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=[images] + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-installer-fcos.yaml + name: ci-operator-misc-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn diff --git a/ci-operator/jobs/openshift/installer/openshift-installer-fcos-presubmits.yaml b/ci-operator/jobs/openshift/installer/openshift-installer-fcos-presubmits.yaml new file mode 100644 index 0000000000000..ec3dee5431ce2 --- /dev/null +++ b/ci-operator/jobs/openshift/installer/openshift-installer-fcos-presubmits.yaml @@ -0,0 +1,359 @@ +presubmits: + openshift/installer: + - agent: kubernetes + always_run: true + branches: + - fcos + context: ci/prow/e2e-aws + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-installer-fcos-e2e-aws + rerun_command: /test e2e-aws + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=fcos + - --give-pr-author-access-to-namespace=true + - --org=openshift + - --repo=installer + - --resolver-address=http://ci-operator-configresolver + - --secret-dir=/usr/local/e2e-aws-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=e2e-aws + - --template=/usr/local/e2e-aws + command: + - ci-operator + env: + - name: CLUSTER_TYPE + value: aws + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-installer-fcos.yaml + name: ci-operator-misc-configs + - name: JOB_NAME_SAFE + value: e2e-aws + - name: TEST_COMMAND + value: TEST_SUITE=openshift/conformance/parallel run-tests + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/e2e-aws-cluster-profile + name: cluster-profile + - mountPath: /usr/local/e2e-aws + name: job-definition + subPath: cluster-launch-installer-e2e.yaml + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets-aws + - configMap: + name: prow-job-cluster-launch-installer-e2e + name: job-definition + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )e2e-aws,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - fcos + context: ci/prow/gofmt + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-installer-fcos-gofmt + rerun_command: /test gofmt + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=fcos + - --give-pr-author-access-to-namespace=true + - --org=openshift + - --repo=installer + - --resolver-address=http://ci-operator-configresolver + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=gofmt + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-installer-fcos.yaml + name: ci-operator-misc-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )gofmt,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - fcos + context: ci/prow/golint + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-installer-fcos-golint + rerun_command: /test golint + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=fcos + - --give-pr-author-access-to-namespace=true + - --org=openshift + - --repo=installer + - --resolver-address=http://ci-operator-configresolver + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=golint + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-installer-fcos.yaml + name: ci-operator-misc-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )golint,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - fcos + context: ci/prow/govet + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-installer-fcos-govet + rerun_command: /test govet + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=fcos + - --give-pr-author-access-to-namespace=true + - --org=openshift + - --repo=installer + - --resolver-address=http://ci-operator-configresolver + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=govet + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-installer-fcos.yaml + name: ci-operator-misc-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )govet,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - fcos + context: ci/prow/images + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-installer-fcos-images + rerun_command: /test images + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=fcos + - --give-pr-author-access-to-namespace=true + - --org=openshift + - --repo=installer + - --resolver-address=http://ci-operator-configresolver + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=[images] + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-installer-fcos.yaml + name: ci-operator-misc-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )images,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - fcos + context: ci/prow/unit + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-installer-fcos-unit + rerun_command: /test unit + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=fcos + - --give-pr-author-access-to-namespace=true + - --org=openshift + - --repo=installer + - --resolver-address=http://ci-operator-configresolver + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=unit + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-installer-fcos.yaml + name: ci-operator-misc-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )unit,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - fcos + context: ci/prow/verify-vendor + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-installer-fcos-verify-vendor + rerun_command: /test verify-vendor + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=fcos + - --give-pr-author-access-to-namespace=true + - --org=openshift + - --repo=installer + - --resolver-address=http://ci-operator-configresolver + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=verify-vendor + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-installer-fcos.yaml + name: ci-operator-misc-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )verify-vendor,?($|\s.*) diff --git a/ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-fcos-postsubmits.yaml b/ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-fcos-postsubmits.yaml new file mode 100644 index 0000000000000..aa3d321a79b18 --- /dev/null +++ b/ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-fcos-postsubmits.yaml @@ -0,0 +1,46 @@ +postsubmits: + openshift/machine-config-operator: + - agent: kubernetes + branches: + - ^fcos$ + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + name: branch-ci-openshift-machine-config-operator-fcos-images + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=fcos + - --give-pr-author-access-to-namespace=true + - --org=openshift + - --promote + - --repo=machine-config-operator + - --resolver-address=http://ci-operator-configresolver + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=[images] + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-machine-config-operator-fcos.yaml + name: ci-operator-misc-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn diff --git a/ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-fcos-presubmits.yaml b/ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-fcos-presubmits.yaml new file mode 100644 index 0000000000000..3af4747352f3b --- /dev/null +++ b/ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-fcos-presubmits.yaml @@ -0,0 +1,215 @@ +presubmits: + openshift/machine-config-operator: + - agent: kubernetes + always_run: true + branches: + - fcos + context: ci/prow/e2e-aws + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-machine-config-operator-fcos-e2e-aws + rerun_command: /test e2e-aws + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=fcos + - --give-pr-author-access-to-namespace=true + - --org=openshift + - --repo=machine-config-operator + - --resolver-address=http://ci-operator-configresolver + - --secret-dir=/usr/local/e2e-aws-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=e2e-aws + - --template=/usr/local/e2e-aws + command: + - ci-operator + env: + - name: CLUSTER_TYPE + value: aws + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-machine-config-operator-fcos.yaml + name: ci-operator-misc-configs + - name: JOB_NAME_SAFE + value: e2e-aws + - name: TEST_COMMAND + value: TEST_SUITE=openshift/conformance/parallel run-tests + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/e2e-aws-cluster-profile + name: cluster-profile + - mountPath: /usr/local/e2e-aws + name: job-definition + subPath: cluster-launch-installer-e2e.yaml + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets-aws + - configMap: + name: prow-job-cluster-launch-installer-e2e + name: job-definition + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )e2e-aws,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - fcos + context: ci/prow/images + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-machine-config-operator-fcos-images + rerun_command: /test images + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=fcos + - --give-pr-author-access-to-namespace=true + - --org=openshift + - --repo=machine-config-operator + - --resolver-address=http://ci-operator-configresolver + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=[images] + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-machine-config-operator-fcos.yaml + name: ci-operator-misc-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )images,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - fcos + context: ci/prow/unit + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-machine-config-operator-fcos-unit + rerun_command: /test unit + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=fcos + - --give-pr-author-access-to-namespace=true + - --org=openshift + - --repo=machine-config-operator + - --resolver-address=http://ci-operator-configresolver + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=unit + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-machine-config-operator-fcos.yaml + name: ci-operator-misc-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )unit,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - fcos + context: ci/prow/verify + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-machine-config-operator-fcos-verify + rerun_command: /test verify + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=fcos + - --give-pr-author-access-to-namespace=true + - --org=openshift + - --repo=machine-config-operator + - --resolver-address=http://ci-operator-configresolver + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=verify + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-machine-config-operator-fcos.yaml + name: ci-operator-misc-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )verify,?($|\s.*) From b96fc0acd3b025aafefc68d09618f366de3ae776 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Tue, 29 Oct 2019 12:03:00 -0400 Subject: [PATCH 2/3] Release controller should skip certain 4.3 images in promote to origin 4.3 CI is the source for all OKD images except the known list. Publish those directly. Remove release controller definitions for 4.2 and 4.1 OKD which are not valid. Update the hack/build script to be more friendly. --- Makefile | 2 -- .../release-controller/images-origin-4.1.yaml | 5 --- .../release-controller/images-origin-4.2.yaml | 5 --- .../releases/release-ocp-4.3-ci.json | 11 +++++- .../releases/release-origin-4.1.json | 11 ------ .../releases/release-origin-4.2.json | 11 ------ .../releases/release-origin-4.3.json | 3 ++ hack/build | 36 +++++++++++++++++-- 8 files changed, 46 insertions(+), 38 deletions(-) delete mode 100644 ci-operator/infra/openshift/release-controller/images-origin-4.1.yaml delete mode 100644 ci-operator/infra/openshift/release-controller/images-origin-4.2.yaml delete mode 100644 ci-operator/infra/openshift/release-controller/releases/release-origin-4.1.json delete mode 100644 ci-operator/infra/openshift/release-controller/releases/release-origin-4.2.json diff --git a/Makefile b/Makefile index bc3501ac78e2e..bd3e726eee63b 100644 --- a/Makefile +++ b/Makefile @@ -177,10 +177,8 @@ prow-artifacts: .PHONY: prow-artifacts prow-release-controller-definitions: - oc annotate -n origin is/4.1 "release.openshift.io/config=$$(cat ci-operator/infra/openshift/release-controller/releases/release-origin-4.1.json)" --overwrite oc annotate -n ocp is/4.1-art-latest "release.openshift.io/config=$$(cat ci-operator/infra/openshift/release-controller/releases/release-ocp-4.1.json)" --overwrite oc annotate -n ocp is/4.1 "release.openshift.io/config=$$(cat ci-operator/infra/openshift/release-controller/releases/release-ocp-4.1-ci.json)" --overwrite - oc annotate -n origin is/4.2 "release.openshift.io/config=$$(cat ci-operator/infra/openshift/release-controller/releases/release-origin-4.2.json)" --overwrite oc annotate -n ocp is/4.2-art-latest "release.openshift.io/config=$$(cat ci-operator/infra/openshift/release-controller/releases/release-ocp-4.2.json)" --overwrite oc annotate -n ocp is/4.2 "release.openshift.io/config=$$(cat ci-operator/infra/openshift/release-controller/releases/release-ocp-4.2-ci.json)" --overwrite oc annotate -n origin is/4.3 "release.openshift.io/config=$$(cat ci-operator/infra/openshift/release-controller/releases/release-origin-4.3.json)" --overwrite diff --git a/ci-operator/infra/openshift/release-controller/images-origin-4.1.yaml b/ci-operator/infra/openshift/release-controller/images-origin-4.1.yaml deleted file mode 100644 index 082c2df5f558f..0000000000000 --- a/ci-operator/infra/openshift/release-controller/images-origin-4.1.yaml +++ /dev/null @@ -1,5 +0,0 @@ -kind: ImageStream -apiVersion: v1 -metadata: - namespace: origin - name: "4.1" diff --git a/ci-operator/infra/openshift/release-controller/images-origin-4.2.yaml b/ci-operator/infra/openshift/release-controller/images-origin-4.2.yaml deleted file mode 100644 index 2fa2b0268c841..0000000000000 --- a/ci-operator/infra/openshift/release-controller/images-origin-4.2.yaml +++ /dev/null @@ -1,5 +0,0 @@ -kind: ImageStream -apiVersion: v1 -metadata: - namespace: origin - name: "4.2" diff --git a/ci-operator/infra/openshift/release-controller/releases/release-ocp-4.3-ci.json b/ci-operator/infra/openshift/release-controller/releases/release-ocp-4.3-ci.json index 243a9968497fc..5b3f95ab102eb 100644 --- a/ci-operator/infra/openshift/release-controller/releases/release-ocp-4.3-ci.json +++ b/ci-operator/infra/openshift/release-controller/releases/release-ocp-4.3-ci.json @@ -9,7 +9,16 @@ "mirror-to-origin":{ "imageStreamRef":{ "namespace": "origin", - "name": "4.3" + "name": "4.3", + "excludeTags": [ + "machine-config-operator", + "installer", + "installer-artifacts", + "baremetal-installer", + "openstack-installer", + "upi-installer", + "libvirt-installer" + ] } } }, diff --git a/ci-operator/infra/openshift/release-controller/releases/release-origin-4.1.json b/ci-operator/infra/openshift/release-controller/releases/release-origin-4.1.json deleted file mode 100644 index 7cc8c24878b73..0000000000000 --- a/ci-operator/infra/openshift/release-controller/releases/release-origin-4.1.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name":"4.1.0-0.okd", - "to": "release", - "mirrorPrefix": "4.1", - "expires":"72h", - "publish":{ - "tag":{"tagRef":{"name":"4.1"}} - }, - "verify":{ - } -} \ No newline at end of file diff --git a/ci-operator/infra/openshift/release-controller/releases/release-origin-4.2.json b/ci-operator/infra/openshift/release-controller/releases/release-origin-4.2.json deleted file mode 100644 index 289dec851f1f3..0000000000000 --- a/ci-operator/infra/openshift/release-controller/releases/release-origin-4.2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name":"4.2.0-0.okd", - "to": "release", - "mirrorPrefix": "4.2", - "expires":"72h", - "publish":{ - "tag":{"tagRef":{"name":"4.2"}} - }, - "verify":{ - } -} \ No newline at end of file diff --git a/ci-operator/infra/openshift/release-controller/releases/release-origin-4.3.json b/ci-operator/infra/openshift/release-controller/releases/release-origin-4.3.json index 9950ec6f65069..e1614d5df9e0d 100644 --- a/ci-operator/infra/openshift/release-controller/releases/release-origin-4.3.json +++ b/ci-operator/infra/openshift/release-controller/releases/release-origin-4.3.json @@ -7,5 +7,8 @@ "tag":{"tagRef":{"name":"4.3"}} }, "verify":{ + "aws":{ + "prowJob":{"name":"release-openshift-origin-installer-e2e-aws-4.3"} + } } } \ No newline at end of file diff --git a/hack/build b/hack/build index 590730bdd9498..ac457be0281c4 100755 --- a/hack/build +++ b/hack/build @@ -25,6 +25,36 @@ if [[ -n "${2-}" ]]; then ref=$2 fi -${ci} --config "${base}/../ci-operator/config/$org/$repo/$org-$repo-$branch$variant.yaml" --git-ref $ref --target [images] -# TODO: make a command that does all of this for you -# mkpj -config-path core-services/prow/02_config/_config.yaml -job-config-path ./ci-operator/jobs/ -job branch-ci-$org-$repo-$branch-images $( mkpr $org/$repo $branch ) | oc create -f - -n ci +function mkpr { + repo="${1}" + ref="${2}" + + if [[ -z "${2}" ]]; then + echo "error: must specify branch" 1>&2 + exit 1 + fi + branch_ref="$( git ls-remote https://github.com/${repo}.git refs/heads/${ref} | cut -f 1 -d $'\t' )" + if [[ -z "${branch_ref}" ]]; then + echo "error: no ref found for ${ref}" 1>&2 + exit 1 + fi + + if [[ -n "${3-}" ]]; then + pr_ref="$( git ls-remote https://github.com/${repo}.git refs/pull/${3}/head | cut -f 1 -d $'\t' )" + if [[ -z "${pr_ref}" ]]; then + echo "error: no PR ref found for ${3}" 1>&2 + exit 1 + fi + echo "-base-ref ${ref} -base-sha ${branch_ref} -pull-author unknown -pull-number ${3} -pull-sha ${pr_ref}" + exit 0 + fi + + echo "-base-ref ${ref} -base-sha ${branch_ref}" +} + +if [[ -z "${PROW_BUILD-}" ]]; then + ${ci} --config "${base}/../ci-operator/config/$org/$repo/$org-$repo-$branch$variant.yaml" --git-ref $ref --target [images] + exit 0 +fi + +mkpj -config-path core-services/prow/02_config/_config.yaml -job-config-path ./ci-operator/jobs/ -job branch-ci-$org-$repo-$branch-images $( mkpr $org/$repo $branch ) | oc create -f - -n ci | cut -f 2- -d '/' From 17dad789d367d824c9fa95a0a662727c97e6b899 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Tue, 29 Oct 2019 12:30:44 -0400 Subject: [PATCH 3/3] Add -fcos branches to config sync --- core-services/prow/02_config/_plugins.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core-services/prow/02_config/_plugins.yaml b/core-services/prow/02_config/_plugins.yaml index a4ea017408d02..37c1794205c26 100644 --- a/core-services/prow/02_config/_plugins.yaml +++ b/core-services/prow/02_config/_plugins.yaml @@ -1428,6 +1428,9 @@ config_updater: ci-operator/jobs/**/*openshift-4.4*.yaml: name: job-config-4.4 gzip: true + ci-operator/jobs/**/*-fcos-*.yaml: + name: job-config-misc + gzip: true ci-operator/jobs/openshift/kubernetes/*.yaml: name: job-config-misc gzip: true @@ -1501,6 +1504,10 @@ config_updater: name: ci-operator-4.4-configs additional_namespaces: - ci-stg + ci-operator/config/**/*-fcos.yaml: + name: ci-operator-misc-configs + additional_namespaces: + - ci-stg core-services/ci-search/_config.yaml: name: job-config