From ad5196b58da5645ad22129b776120c4b2788159c Mon Sep 17 00:00:00 2001 From: Pablo Acevedo Montserrat Date: Wed, 22 Feb 2023 16:42:49 +0100 Subject: [PATCH 1/4] USHIFT-901: Merge periodics and presubmits for 4.12 in one file --- .../openshift-microshift-release-4.12.yaml | 52 +- ...ft-microshift-release-4.12__periodics.yaml | 219 ---- ...ift-microshift-release-4.12-periodics.yaml | 1052 +---------------- ...t-microshift-release-4.12-postsubmits.yaml | 1 + ...ft-microshift-release-4.12-presubmits.yaml | 80 +- 5 files changed, 79 insertions(+), 1325 deletions(-) delete mode 100644 ci-operator/config/openshift/microshift/openshift-microshift-release-4.12__periodics.yaml diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.12.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.12.yaml index fcd31533614b3..091b501cff924 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.12.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.12.yaml @@ -11,6 +11,10 @@ base_images: name: "4.12" namespace: ocp tag: tests + ubi-minimal: + name: ubi-minimal + namespace: ocp + tag: "8" build_root: image_stream_tag: name: release @@ -63,12 +67,53 @@ images: - destination_dir: . source_path: /usr/bin/openshift-tests to: dependency-payload +- dockerfile_literal: | + # build + FROM ubi-minimal + ENV YQ_URL=https://github.com/mikefarah/yq/releases/download/v4.26.1/yq_linux_amd64 + ENV YQ_HASH=9e35b817e7cdc358c1fcd8498f3872db169c3303b61645cc1faf972990f37582 + RUN echo -n "${YQ_HASH} -" > /tmp/sum.txt ; \ + if ! (curl -Ls "${YQ_URL}" | tee /tmp/yq | sha256sum -c /tmp/sum.txt &>/dev/null); then \ + echo "ERROR: Expected file at ${YQ_URL} to have checksum ${YQ_HASH} but instead got $(sha256sum /tmp/sum.txt ; \ - if ! (curl -Ls "${YQ_URL}" | tee /tmp/yq | sha256sum -c /tmp/sum.txt &>/dev/null); then \ - echo "ERROR: Expected file at ${YQ_URL} to have checksum ${YQ_HASH} but instead got $(sha256sum Date: Wed, 22 Feb 2023 16:43:22 +0100 Subject: [PATCH 2/4] USHIFT-901: Merge periodics and presubmits for 4.13 in one file --- .../openshift-microshift-main__periodics.yaml | 149 --------- .../openshift-microshift-release-4.13.yaml | 52 ++- .../openshift-microshift-main-periodics.yaml | 316 ------------------ .../openshift-microshift-main-presubmits.yaml | 52 --- ...ift-microshift-release-4.13-periodics.yaml | 56 ++++ ...t-microshift-release-4.13-postsubmits.yaml | 1 + ...ft-microshift-release-4.13-presubmits.yaml | 28 ++ 7 files changed, 134 insertions(+), 520 deletions(-) delete mode 100644 ci-operator/config/openshift/microshift/openshift-microshift-main__periodics.yaml delete mode 100644 ci-operator/jobs/openshift/microshift/openshift-microshift-main-periodics.yaml create mode 100644 ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-periodics.yaml diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-main__periodics.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-main__periodics.yaml deleted file mode 100644 index 645bda7ae0fb1..0000000000000 --- a/ci-operator/config/openshift/microshift/openshift-microshift-main__periodics.yaml +++ /dev/null @@ -1,149 +0,0 @@ -base_images: - cli: - name: "4.13" - namespace: ocp - tag: cli - libvirt-installer: - name: "4.13" - namespace: ocp - tag: libvirt-installer - test-bin: - name: "4.13" - namespace: ocp - tag: tests - ubi-minimal: - name: ubi-minimal - namespace: ocp - tag: "8" -build_root: - image_stream_tag: - name: release - namespace: openshift - tag: rhel-8-release-golang-1.19-openshift-4.13 -images: -- dockerfile_literal: | - FROM libvirt-installer - COPY validate-microshift /tmp/validate-microshift - from: libvirt-installer - inputs: - src: - paths: - - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/validate-microshift - to: microshift-validate -- dockerfile_literal: | - FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.19-openshift-4.13 as builder - RUN dnf install --setopt=tsflags=nodocs -y \ - rpm-build glibc-static gcc selinux-policy-devel util-linux && \ - dnf clean all && \ - rm -rf /var/cache/dnf/* - RUN ls -lA - RUN make rpm - FROM libvirt-installer - USER root - ENV HOME=/tmp/secret - RUN dnf install -y jq && dnf clean all && rm -rf /var/cache/dnf/* - ENV PAYLOAD_PATH=$HOME/payload - WORKDIR $PAYLOAD_PATH - COPY --from=builder /go/src/github.com/openshift/microshift/scripts/devenv-builder/configure-vm.sh usr/bin/configure-vm.sh - RUN chmod 755 usr/bin/configure-vm.sh - COPY oc openshift-tests usr/bin/ - RUN chmod 755 usr/bin/oc && ln -rs usr/bin/oc usr/bin/kubectl - COPY --from=builder /go/src/github.com/openshift/microshift/_output/rpmbuild/RPMS/*/*.rpm packages/ - RUN tar -cvf payload.tar . && chmod -R a+rw "${HOME}" - inputs: - cli: - paths: - - destination_dir: . - source_path: /usr/bin/oc - libvirt-installer: - as: - - libvirt-installer - src: - as: - - registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.19-openshift-4.13 - test-bin: - paths: - - destination_dir: . - source_path: /usr/bin/openshift-tests - to: dependency-payload -- dockerfile_literal: | - # build - FROM ubi-minimal - ENV YQ_URL=https://github.com/mikefarah/yq/releases/download/v4.26.1/yq_linux_amd64 - ENV YQ_HASH=9e35b817e7cdc358c1fcd8498f3872db169c3303b61645cc1faf972990f37582 - RUN echo -n "${YQ_HASH} -" > /tmp/sum.txt ; \ - if ! (curl -Ls "${YQ_URL}" | tee /tmp/yq | sha256sum -c /tmp/sum.txt &>/dev/null); then \ - echo "ERROR: Expected file at ${YQ_URL} to have checksum ${YQ_HASH} but instead got $(sha256sum /tmp/sum.txt ; \ + if ! (curl -Ls "${YQ_URL}" | tee /tmp/yq | sha256sum -c /tmp/sum.txt &>/dev/null); then \ + echo "ERROR: Expected file at ${YQ_URL} to have checksum ${YQ_HASH} but instead got $(sha256sum Date: Fri, 3 Mar 2023 14:35:11 +0100 Subject: [PATCH 3/4] USHIFT-901: Use nightly releases for rebase --- .../microshift/openshift-microshift-release-4.12.yaml | 9 ++++++--- .../microshift/openshift-microshift-release-4.13.yaml | 9 ++++++--- .../openshift-microshift-release-4.12-periodics.yaml | 1 - .../openshift-microshift-release-4.12-postsubmits.yaml | 1 - .../openshift-microshift-release-4.12-presubmits.yaml | 7 ------- .../openshift-microshift-release-4.13-periodics.yaml | 1 - .../openshift-microshift-release-4.13-postsubmits.yaml | 1 - .../openshift-microshift-release-4.13-presubmits.yaml | 7 ------- .../rebase/openshift-microshift-rebase-ref.yaml | 6 +++--- 9 files changed, 15 insertions(+), 27 deletions(-) diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.12.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.12.yaml index 091b501cff924..3a253d283a6a1 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.12.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.12.yaml @@ -103,14 +103,14 @@ promotion: name: "4.12" namespace: ocp releases: - arm64-latest: + nightly-amd64: candidate: - architecture: arm64 product: ocp stream: nightly version: "4.12" - latest: + nightly-arm64: candidate: + architecture: arm64 product: ocp stream: nightly version: "4.12" @@ -121,6 +121,9 @@ resources: requests: cpu: 100m memory: 200Mi +tag_specification: + name: "4.12" + namespace: ocp tests: - as: verify commands: make verify diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml index b902bd24d8ed4..08eff3d48299d 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml @@ -103,14 +103,14 @@ promotion: name: "4.13" namespace: ocp releases: - arm64-latest: + nightly-amd64: candidate: - architecture: arm64 product: ocp stream: nightly version: "4.13" - latest: + nightly-arm64: candidate: + architecture: arm64 product: ocp stream: nightly version: "4.13" @@ -121,6 +121,9 @@ resources: requests: cpu: 100m memory: 200Mi +tag_specification: + name: "4.13" + namespace: ocp tests: - as: verify cluster: build02 diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.12-periodics.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.12-periodics.yaml index 2b1fb8a8ea575..19056b4392754 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.12-periodics.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.12-periodics.yaml @@ -11,7 +11,6 @@ periodics: repo: microshift labels: ci.openshift.io/generator: prowgen - job-release: "4.12" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: periodic-ci-openshift-microshift-release-4.12-rebase-on-nightlies spec: diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.12-postsubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.12-postsubmits.yaml index a31b8f9fa49a1..2eb629e6b588f 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.12-postsubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.12-postsubmits.yaml @@ -11,7 +11,6 @@ postsubmits: labels: ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen - job-release: "4.12" max_concurrency: 1 name: branch-ci-openshift-microshift-release-4.12-images spec: diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.12-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.12-presubmits.yaml index c3c7b4315f292..b24017e672f30 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.12-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.12-presubmits.yaml @@ -15,7 +15,6 @@ presubmits: ci-operator.openshift.io/cloud-cluster-profile: gcp ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen - job-release: "4.12" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.12-e2e-openshift-conformance-reduced rerun_command: /test e2e-openshift-conformance-reduced @@ -95,7 +94,6 @@ presubmits: ci-operator.openshift.io/cloud: gcp ci-operator.openshift.io/cloud-cluster-profile: gcp ci.openshift.io/generator: prowgen - job-release: "4.12" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.12-e2e-reboot rerun_command: /test e2e-reboot @@ -175,7 +173,6 @@ presubmits: ci-operator.openshift.io/cloud: gcp ci-operator.openshift.io/cloud-cluster-profile: gcp ci.openshift.io/generator: prowgen - job-release: "4.12" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.12-e2e-router-smoke-test optional: true @@ -254,7 +251,6 @@ presubmits: skip_cloning: true labels: ci.openshift.io/generator: prowgen - job-release: "4.12" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.12-images rerun_command: /test images @@ -305,7 +301,6 @@ presubmits: skip_cloning: true labels: ci.openshift.io/generator: prowgen - job-release: "4.12" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.12-test-srpm rerun_command: /test test-srpm @@ -356,7 +351,6 @@ presubmits: skip_cloning: true labels: ci.openshift.io/generator: prowgen - job-release: "4.12" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.12-test-unit rerun_command: /test test-unit @@ -406,7 +400,6 @@ presubmits: skip_cloning: true labels: ci.openshift.io/generator: prowgen - job-release: "4.12" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.12-verify rerun_command: /test verify diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-periodics.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-periodics.yaml index 5391e0b430b08..3659dc285a29b 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-periodics.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-periodics.yaml @@ -11,7 +11,6 @@ periodics: repo: microshift labels: ci.openshift.io/generator: prowgen - job-release: "4.13" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: periodic-ci-openshift-microshift-release-4.13-rebase-on-nightlies spec: diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-postsubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-postsubmits.yaml index 3c8f610d1efa5..c7dc80b2872a3 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-postsubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-postsubmits.yaml @@ -11,7 +11,6 @@ postsubmits: labels: ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen - job-release: "4.13" max_concurrency: 1 name: branch-ci-openshift-microshift-release-4.13-images spec: diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml index 22438792c89e2..ae61fc8a43124 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml @@ -15,7 +15,6 @@ presubmits: ci-operator.openshift.io/cloud-cluster-profile: gcp ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen - job-release: "4.13" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.13-e2e-openshift-conformance-reduced rerun_command: /test e2e-openshift-conformance-reduced @@ -96,7 +95,6 @@ presubmits: ci-operator.openshift.io/cloud-cluster-profile: gcp ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen - job-release: "4.13" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.13-e2e-reboot rerun_command: /test e2e-reboot @@ -177,7 +175,6 @@ presubmits: ci-operator.openshift.io/cloud-cluster-profile: gcp ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen - job-release: "4.13" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.13-e2e-router-smoke-test optional: true @@ -256,7 +253,6 @@ presubmits: skip_cloning: true labels: ci.openshift.io/generator: prowgen - job-release: "4.13" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.13-images rerun_command: /test images @@ -308,7 +304,6 @@ presubmits: labels: ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen - job-release: "4.13" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.13-test-srpm rerun_command: /test test-srpm @@ -360,7 +355,6 @@ presubmits: labels: ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen - job-release: "4.13" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.13-test-unit rerun_command: /test test-unit @@ -411,7 +405,6 @@ presubmits: labels: ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen - job-release: "4.13" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-release-4.13-verify rerun_command: /test verify diff --git a/ci-operator/step-registry/openshift/microshift/rebase/openshift-microshift-rebase-ref.yaml b/ci-operator/step-registry/openshift/microshift/rebase/openshift-microshift-rebase-ref.yaml index bd11bd75d8ba2..cabc96d40c78d 100644 --- a/ci-operator/step-registry/openshift/microshift/rebase/openshift-microshift-rebase-ref.yaml +++ b/ci-operator/step-registry/openshift/microshift/rebase/openshift-microshift-rebase-ref.yaml @@ -5,9 +5,9 @@ ref: grace_period: 30m commands: openshift-microshift-rebase-commands.sh dependencies: - - name: "release:latest" + - name: "release:nightly-amd64" env: "OPENSHIFT_RELEASE_IMAGE" - - name: "release:arm64-latest" + - name: "release:nightly-arm64" env: "OPENSHIFT_RELEASE_IMAGE_ARM" resources: requests: @@ -21,4 +21,4 @@ ref: namespace: test-credentials mount_path: /secrets/pr-creds documentation: |- - This step rebases MicroShift to release:latest and release:arm64-latest, respectively. Requires a pull-secret for the app.ci registry and credentials to push a branch and create a PR on MicroShift repository. + This step rebases MicroShift to release:nightly-amd64 and release:nightly-arm64, respectively. Requires a pull-secret for the app.ci registry and credentials to push a branch and create a PR on MicroShift repository. From cc2c1d0172429800ec2daae44cf59f8a80d7c150 Mon Sep 17 00:00:00 2001 From: Pablo Acevedo Montserrat Date: Tue, 7 Mar 2023 16:04:03 +0100 Subject: [PATCH 4/4] USHIFT-901: Merge periodics and presubmits for main in one file --- .../microshift/openshift-microshift-main.yaml | 49 +++++++++++++++++ .../openshift-microshift-main-periodics.yaml | 55 +++++++++++++++++++ .../openshift-microshift-main-presubmits.yaml | 21 +++++++ 3 files changed, 125 insertions(+) create mode 100644 ci-operator/jobs/openshift/microshift/openshift-microshift-main-periodics.yaml diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml index 1ed035766c4d2..4331acfad1e65 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml @@ -11,6 +11,10 @@ base_images: name: "4.14" namespace: ocp tag: tests + ubi-minimal: + name: ubi-minimal + namespace: ocp + tag: "8" build_root: image_stream_tag: name: release @@ -63,12 +67,53 @@ images: - destination_dir: . source_path: /usr/bin/openshift-tests to: dependency-payload +- dockerfile_literal: | + # build + FROM ubi-minimal + ENV YQ_URL=https://github.com/mikefarah/yq/releases/download/v4.26.1/yq_linux_amd64 + ENV YQ_HASH=9e35b817e7cdc358c1fcd8498f3872db169c3303b61645cc1faf972990f37582 + RUN echo -n "${YQ_HASH} -" > /tmp/sum.txt ; \ + if ! (curl -Ls "${YQ_URL}" | tee /tmp/yq | sha256sum -c /tmp/sum.txt &>/dev/null); then \ + echo "ERROR: Expected file at ${YQ_URL} to have checksum ${YQ_HASH} but instead got $(sha256sum