From c11dcb2f6dff9e9688d861cac0753ae757c4e0bb Mon Sep 17 00:00:00 2001 From: dsevosty Date: Fri, 21 Apr 2023 18:18:26 +0000 Subject: [PATCH 01/22] it seems ADDITIONAL_BIN_FOLDER_FROM_REPO is used instedof ADDITIONAL_FILES_FROM_REPO_GLOB --- forks/artifacts/Dockerfile.builder.centos9 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/forks/artifacts/Dockerfile.builder.centos9 b/forks/artifacts/Dockerfile.builder.centos9 index 9298d71..005c282 100644 --- a/forks/artifacts/Dockerfile.builder.centos9 +++ b/forks/artifacts/Dockerfile.builder.centos9 @@ -9,7 +9,8 @@ ARG PKG_GO_PATH ARG ARCHITECTURES ARG RPMBUILD_DIR ARG MAKE_ARGS -ARG ADDITIONAL_FILES_FROM_REPO_GLOB +#ARG ADDITIONAL_FILES_FROM_REPO_GLOB +ARG ADDITIONAL_BIN_FOLDER_FROM_REPO RUN yum install -y --setopt=skip_missing_names_on_install=False rpm-build createrepo bsdtar rsync ${INSTALL_PKGS} From 325f5d7d62ec949e4ed6c3a9fa1079f50d31ed7e Mon Sep 17 00:00:00 2001 From: dsevosty Date: Fri, 21 Apr 2023 20:42:58 +0000 Subject: [PATCH 02/22] it seems ADDITIONAL_BIN_FOLDER_FROM_REPO is used instedof ADDITIONAL_FILES_FROM_REPO_GLOB --- forks/artifacts/Dockerfile.builder.centos9 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forks/artifacts/Dockerfile.builder.centos9 b/forks/artifacts/Dockerfile.builder.centos9 index 9298d71..0e4c820 100644 --- a/forks/artifacts/Dockerfile.builder.centos9 +++ b/forks/artifacts/Dockerfile.builder.centos9 @@ -9,7 +9,7 @@ ARG PKG_GO_PATH ARG ARCHITECTURES ARG RPMBUILD_DIR ARG MAKE_ARGS -ARG ADDITIONAL_FILES_FROM_REPO_GLOB +ARG ADDITIONAL_BIN_FOLDER_FROM_REPO RUN yum install -y --setopt=skip_missing_names_on_install=False rpm-build createrepo bsdtar rsync ${INSTALL_PKGS} @@ -49,7 +49,7 @@ RUN mkdir -p "${RPMBUILD_DIR}"/{BUILD,SOURCES,SPECS,SRPMS,rpms}; \ # TODO refactor me. this is currently needed to copy the hyperkube and kubensenter scripts in the hyperkube image RUN mkdir -p /tmp/additional_bins; if [ -n "${ADDITIONAL_BIN_FOLDER_FROM_REPO}" ]; then \ - cp "${ADDITIONAL_BIN_FOLDER_FROM_REPO}/*" /tmp/additional_bins; fi + cp ${ADDITIONAL_BIN_FOLDER_FROM_REPO}/* /tmp/additional_bins; fi FROM registry.ci.openshift.org/ocp/4.11:cli From 03ec707bea0a3799f6ab38d52424bc7037724d9f Mon Sep 17 00:00:00 2001 From: dsevosty Date: Mon, 5 Jun 2023 16:36:12 +0000 Subject: [PATCH 03/22] initial commit of installer artifacts build sequence split --- buildconfigs/02-additional-imagestream.yaml | 6 +++ .../10-installer-artifact-amd64-lnx.yaml | 26 +++++++++ .../10-installer-artifact-amd64-mac.yaml | 26 +++++++++ .../10-installer-artifact-arm64-lnx.yaml | 26 +++++++++ .../10-installer-artifact-arm64-mac.yaml | 26 +++++++++ ...facts.yaml => 20-installer-artifacts.yaml} | 13 +++-- .../{20-artifacts.yaml => 30-artifacts.yaml} | 5 ++ buildconfigs/kustomization.yaml | 53 ++++++++++++++++++- forks/artifacts/installer-artifact.dockerfile | 11 ++++ .../installer-artifacts-metaimage.dockerfile | 15 ++++++ pipelines/build-from-scratch.yaml | 6 +-- 11 files changed, 201 insertions(+), 12 deletions(-) create mode 100644 buildconfigs/10-installer-artifact-amd64-lnx.yaml create mode 100644 buildconfigs/10-installer-artifact-amd64-mac.yaml create mode 100644 buildconfigs/10-installer-artifact-arm64-lnx.yaml create mode 100644 buildconfigs/10-installer-artifact-arm64-mac.yaml rename buildconfigs/{10-installer-artifacts.yaml => 20-installer-artifacts.yaml} (58%) rename buildconfigs/{20-artifacts.yaml => 30-artifacts.yaml} (86%) create mode 100644 forks/artifacts/installer-artifact.dockerfile create mode 100644 forks/artifacts/installer-artifacts-metaimage.dockerfile diff --git a/buildconfigs/02-additional-imagestream.yaml b/buildconfigs/02-additional-imagestream.yaml index e90aefe..9b8f2a4 100644 --- a/buildconfigs/02-additional-imagestream.yaml +++ b/buildconfigs/02-additional-imagestream.yaml @@ -1,3 +1,4 @@ +--- apiVersion: image.openshift.io/v1 kind: ImageStream metadata: @@ -20,3 +21,8 @@ spec: name: 'quay.io/fedora/fedora:36' referencePolicy: type: Local +--- +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + name: installer-artifacts diff --git a/buildconfigs/10-installer-artifact-amd64-lnx.yaml b/buildconfigs/10-installer-artifact-amd64-lnx.yaml new file mode 100644 index 0000000..607640c --- /dev/null +++ b/buildconfigs/10-installer-artifact-amd64-lnx.yaml @@ -0,0 +1,26 @@ +apiVersion: build.openshift.io/v1 +kind: BuildConfig +metadata: + name: installer-artifacts-amd64-lnx + labels: + part-of-artifacts: installer +spec: + source: + type: Git + git: + uri: 'https://github.com/openshift/installer' + ref: release-4.12 + images: [] + strategy: + type: Docker + dockerStrategy: + buildArgs: + - name: "TAGS" + value: "okd" + - name: "TARGET_ARCH" + value: "amd64" + - name: "TARGET_OS" + value: "linux" + output: + to: + name: 'installer-artifacts:amd64-lnx' diff --git a/buildconfigs/10-installer-artifact-amd64-mac.yaml b/buildconfigs/10-installer-artifact-amd64-mac.yaml new file mode 100644 index 0000000..85b7848 --- /dev/null +++ b/buildconfigs/10-installer-artifact-amd64-mac.yaml @@ -0,0 +1,26 @@ +apiVersion: build.openshift.io/v1 +kind: BuildConfig +metadata: + name: installer-artifacts-amd64-mac + labels: + part-of-artifacts: installer +spec: + source: + type: Git + git: + uri: 'https://github.com/openshift/installer' + ref: release-4.12 + images: [] + strategy: + type: Docker + dockerStrategy: + buildArgs: + - name: "TAGS" + value: "okd" + - name: "TARGET_ARCH" + value: "amd64" + - name: "TARGET_OS" + value: "darwin" + output: + to: + name: 'installer-artifacts:amd64-mac' diff --git a/buildconfigs/10-installer-artifact-arm64-lnx.yaml b/buildconfigs/10-installer-artifact-arm64-lnx.yaml new file mode 100644 index 0000000..766a60c --- /dev/null +++ b/buildconfigs/10-installer-artifact-arm64-lnx.yaml @@ -0,0 +1,26 @@ +apiVersion: build.openshift.io/v1 +kind: BuildConfig +metadata: + name: installer-artifacts-arm64-lnx + labels: + part-of-artifacts: installer +spec: + source: + type: Git + git: + uri: 'https://github.com/openshift/installer' + ref: release-4.12 + images: [] + strategy: + type: Docker + dockerStrategy: + buildArgs: + - name: "TAGS" + value: "okd" + - name: "TARGET_ARCH" + value: "arm64" + - name: "TARGET_OS" + value: "linux" + output: + to: + name: 'installer-artifacts:arm64-lnx' diff --git a/buildconfigs/10-installer-artifact-arm64-mac.yaml b/buildconfigs/10-installer-artifact-arm64-mac.yaml new file mode 100644 index 0000000..842c4a8 --- /dev/null +++ b/buildconfigs/10-installer-artifact-arm64-mac.yaml @@ -0,0 +1,26 @@ +apiVersion: build.openshift.io/v1 +kind: BuildConfig +metadata: + name: installer-artifacts-arm64-mac + labels: + part-of-artifacts: installer +spec: + source: + type: Git + git: + uri: 'https://github.com/openshift/installer' + ref: release-4.12 + images: [] + strategy: + type: Docker + dockerStrategy: + buildArgs: + - name: "TAGS" + value: "okd" + - name: "TARGET_ARCH" + value: "arm64" + - name: "TARGET_OS" + value: "darwin" + output: + to: + name: 'installer-artifacts:arm64-mac' diff --git a/buildconfigs/10-installer-artifacts.yaml b/buildconfigs/20-installer-artifacts.yaml similarity index 58% rename from buildconfigs/10-installer-artifacts.yaml rename to buildconfigs/20-installer-artifacts.yaml index 007ee06..adf0dd2 100644 --- a/buildconfigs/10-installer-artifacts.yaml +++ b/buildconfigs/20-installer-artifacts.yaml @@ -3,24 +3,23 @@ kind: BuildConfig metadata: name: installer-artifacts labels: - resources-profile: high change-build-arg-tags: "true" + meta-for: installer-artifacts + skip-release-branch: "true" spec: source: type: Git git: - uri: 'https://github.com/openshift/installer' - ref: release-4.12 +# uri: 'https://github.com/openshift/installer' + uri: https://gitbucket.apps.rs1.dsevosty.info/git/openshift-mirror/okd-project-okd-payload-pipeline.git + ref: release-4.12-ds01 contextDir: . images: [] strategy: type: Docker dockerStrategy: imageOptimizationPolicy: SkipLayers - dockerfilePath: images/installer-artifacts/Dockerfile.rhel - buildArgs: - - name: "TAGS" - value: "okd" + dockerfilePath: code/artifacts/installer-artifacts.dockerfile from: kind: "ImageStreamTag" name: "release:base" diff --git a/buildconfigs/20-artifacts.yaml b/buildconfigs/30-artifacts.yaml similarity index 86% rename from buildconfigs/20-artifacts.yaml rename to buildconfigs/30-artifacts.yaml index ca5dd69..214c565 100644 --- a/buildconfigs/20-artifacts.yaml +++ b/buildconfigs/30-artifacts.yaml @@ -18,6 +18,11 @@ spec: name: 'release:hyperkube' as: - 'release:hyperkube' + - from: + kind: ImageStreamTag + name: 'release:installer-artifacts' + as: + - 'release:installer-artifacts' - from: kind: ImageStreamTag name: 'release:forked-dockerfiles' diff --git a/buildconfigs/kustomization.yaml b/buildconfigs/kustomization.yaml index 1595d15..2e66b40 100644 --- a/buildconfigs/kustomization.yaml +++ b/buildconfigs/kustomization.yaml @@ -49,6 +49,49 @@ patches: target: kind: BuildConfig labelSelector: "builder-replacement!=skip" +# +# part of installer artifacts build sequence +# + - patch: |- + - op: add + path: /metadata/labels + value: + change-build-arg-tags: "true" + part-of-artifacts: installer + resources-profile: high + - op: add + path: /spec/output/to/kind + value: ImageStream + - op: add + path: /spec/source/contextDir + value: "." + - op: add + path: /spec/source/images/- + value: + from: + kind: ImageStreamTag + name: 'release:forked-dockerfiles' + paths: + - sourcePath: /code/artifacts/installer-artifact.dockerfile + destinationDir: images/installer-artifacts + - op: add + path: /spec/strategy/dockerStrategy/imageOptimizationPolicy + value: SkipLayers + - op: add + path: /spec/strategy/dockerStrategy/dockerfilePath + value: images/installer-artifacts/installer-artifact.dockerfile + - op: add + path: /spec/strategy/dockerStrategy/from + value: + kind: "ImageStreamTag" + name: "release:base" + target: + kind: BuildConfig + labelSelector: "part-of-artifacts=installer" +# +# end of installer artifacts build sequence +# + - patch: |- - op: add path: "/spec/source/images/-" @@ -211,7 +254,11 @@ resources: - 10-ibm-vpc-block-csi-driver.yaml - 10-ibm-vpc-node-label-updater.yaml - 10-insights-operator.yaml - - 10-installer-artifacts.yaml +# - 10-installer-artifacts.yaml + - 10-installer-artifact-amd64-lnx.yaml + - 10-installer-artifact-amd64-mac.yaml + - 10-installer-artifact-arm64-lnx.yaml + - 10-installer-artifact-arm64-mac.yaml - 10-installer.yaml - 10-ironic-agent.yaml - 10-ironic-hardware-inventory-recorder.yaml @@ -280,12 +327,14 @@ resources: - 10-vsphere-problem-detector.yaml - 20-agent-installer-api-server.yaml - 20-agent-installer-csr-approver.yaml - - 20-artifacts.yaml +# - 20-artifacts.yaml - 20-deployer.yaml - 20-haproxy-router.yaml - 20-machine-os-images.yaml + - 20-installer-artifacts.yaml - 20-ovn-kubernetes-base.yaml - 20-tools.yaml + - 30-artifacts.yaml - 30-fedora-coreos.yaml - 30-network-tools.yaml - 30-ovn-kubernetes-microshift.yaml diff --git a/forks/artifacts/installer-artifact.dockerfile b/forks/artifacts/installer-artifact.dockerfile new file mode 100644 index 0000000..7597a64 --- /dev/null +++ b/forks/artifacts/installer-artifact.dockerfile @@ -0,0 +1,11 @@ +# +# it is part of the build sequence of installer-artifacts metapackage for a particular architecture and operating system +# +FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.20-openshift-4.14 +ARG TAGS="" +ARG TARGET_OS=linux +ARG TARGET_ARCH=amd64 + +WORKDIR /go/src/github.com/openshift/installer +COPY . . +RUN GOOS=${TARGET_OS} GOARCH=${TARGET_ARCH} DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh diff --git a/forks/artifacts/installer-artifacts-metaimage.dockerfile b/forks/artifacts/installer-artifacts-metaimage.dockerfile new file mode 100644 index 0000000..41187e9 --- /dev/null +++ b/forks/artifacts/installer-artifacts-metaimage.dockerfile @@ -0,0 +1,15 @@ +# +# this is an installer-artifacts final metaimage, which contains all openshift-installer binaries (except baremetalm why?) +# + +FROM installer-artifacts:amd64-lnx AS linuxbuilder +FROM installer-artifacts:arm64-lnx AS linuxarmbuilder +FROM installer-artifacts:amd64-mac AS macbuilder +FROM installer-artifacts:arm64-mac AS macarmbuilder + +FROM registry.ci.openshift.org/ocp/4.12:installer + +COPY --from=linuxarmbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/linux_arm64/openshift-install +COPY --from=linuxbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/linux_amd64/openshift-install +COPY --from=macarmbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/mac_arm64/openshift-install +COPY --from=macbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/mac/openshift-install diff --git a/pipelines/build-from-scratch.yaml b/pipelines/build-from-scratch.yaml index 497e5a2..1f4d845 100644 --- a/pipelines/build-from-scratch.yaml +++ b/pipelines/build-from-scratch.yaml @@ -212,6 +212,7 @@ spec: - installer-artifacts - installer - hyperkube + - ovn-kubernetes-base - name: batch-02 timeout: "2h0m0s" runAfter: @@ -223,13 +224,11 @@ spec: value: - agent-installer-api-server - agent-installer-csr-approver - - artifacts - tools - haproxy-router - - ovn-kubernetes - - ovn-kubernetes-base - machine-os-images - deployer + - ovn-kubernetes - name: batch-03 timeout: "1h0m0s" runAfter: @@ -239,6 +238,7 @@ spec: params: - name: build_configs value: + - artifacts - tests - network-tools - ovn-kubernetes-microshift From 8e5d3d30e3c68a47cf37d9fb5060da003bb27386 Mon Sep 17 00:00:00 2001 From: dsevosty Date: Mon, 5 Jun 2023 16:55:18 +0000 Subject: [PATCH 04/22] 4.14 -> 4.12 --- forks/artifacts/installer-artifact.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forks/artifacts/installer-artifact.dockerfile b/forks/artifacts/installer-artifact.dockerfile index 7597a64..4a24b1d 100644 --- a/forks/artifacts/installer-artifact.dockerfile +++ b/forks/artifacts/installer-artifact.dockerfile @@ -1,7 +1,7 @@ # # it is part of the build sequence of installer-artifacts metapackage for a particular architecture and operating system # -FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.20-openshift-4.14 +FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.20-openshift-4.12 ARG TAGS="" ARG TARGET_OS=linux ARG TARGET_ARCH=amd64 From a12189243234e7002f0b7e618952ff999762c486 Mon Sep 17 00:00:00 2001 From: dsevosty Date: Mon, 5 Jun 2023 16:59:22 +0000 Subject: [PATCH 05/22] go 1.20 -> 1.19 --- forks/artifacts/installer-artifact.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forks/artifacts/installer-artifact.dockerfile b/forks/artifacts/installer-artifact.dockerfile index 4a24b1d..05773ae 100644 --- a/forks/artifacts/installer-artifact.dockerfile +++ b/forks/artifacts/installer-artifact.dockerfile @@ -1,7 +1,7 @@ # # it is part of the build sequence of installer-artifacts metapackage for a particular architecture and operating system # -FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.20-openshift-4.12 +FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.12 ARG TAGS="" ARG TARGET_OS=linux ARG TARGET_ARCH=amd64 From 893de12cc71315f5ba9a716f82eb78183a545e5b Mon Sep 17 00:00:00 2001 From: dsevosty Date: Mon, 5 Jun 2023 17:14:41 +0000 Subject: [PATCH 06/22] TARGET -> TGT --- forks/artifacts/installer-artifact.dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/forks/artifacts/installer-artifact.dockerfile b/forks/artifacts/installer-artifact.dockerfile index 05773ae..1941b1e 100644 --- a/forks/artifacts/installer-artifact.dockerfile +++ b/forks/artifacts/installer-artifact.dockerfile @@ -3,9 +3,9 @@ # FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.12 ARG TAGS="" -ARG TARGET_OS=linux -ARG TARGET_ARCH=amd64 +ARG TGT_OS=linux +ARG TGT_ARCH=amd64 WORKDIR /go/src/github.com/openshift/installer COPY . . -RUN GOOS=${TARGET_OS} GOARCH=${TARGET_ARCH} DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh +RUN GOOS=${TGT_OS} GOARCH=${TGT_ARCH} DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh From 887234ec5bb5a36c8a1e968ff314a809d14407ed Mon Sep 17 00:00:00 2001 From: dsevosty Date: Mon, 5 Jun 2023 17:34:58 +0000 Subject: [PATCH 07/22] debug --- forks/artifacts/installer-artifact.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forks/artifacts/installer-artifact.dockerfile b/forks/artifacts/installer-artifact.dockerfile index 1941b1e..9160994 100644 --- a/forks/artifacts/installer-artifact.dockerfile +++ b/forks/artifacts/installer-artifact.dockerfile @@ -8,4 +8,4 @@ ARG TGT_ARCH=amd64 WORKDIR /go/src/github.com/openshift/installer COPY . . -RUN GOOS=${TGT_OS} GOARCH=${TGT_ARCH} DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh +RUN GOOS=linux GOARCH=amd64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh From f1d260490b3143064d44e42787335af2595a0fee Mon Sep 17 00:00:00 2001 From: dsevosty Date: Mon, 5 Jun 2023 17:46:18 +0000 Subject: [PATCH 08/22] debug2 --- forks/artifacts/installer-artifact.dockerfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/forks/artifacts/installer-artifact.dockerfile b/forks/artifacts/installer-artifact.dockerfile index 9160994..c8a60fe 100644 --- a/forks/artifacts/installer-artifact.dockerfile +++ b/forks/artifacts/installer-artifact.dockerfile @@ -1,11 +1,16 @@ -# -# it is part of the build sequence of installer-artifacts metapackage for a particular architecture and operating system -# -FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.12 +FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.12 AS linuxbuilder + ARG TAGS="" ARG TGT_OS=linux ARG TGT_ARCH=amd64 WORKDIR /go/src/github.com/openshift/installer + COPY . . -RUN GOOS=linux GOARCH=amd64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh + +RUN \ + go version + GOOS=linux GOARCH=amd64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh +# +# it is part of the build sequence of installer-artifacts metapackage for a particular architecture and operating system +# From 055af53afe31d28d48eb23d040942fc91840c317 Mon Sep 17 00:00:00 2001 From: dsevosty Date: Mon, 5 Jun 2023 18:00:02 +0000 Subject: [PATCH 09/22] debug3 --- forks/artifacts/installer-artifact.dockerfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/forks/artifacts/installer-artifact.dockerfile b/forks/artifacts/installer-artifact.dockerfile index c8a60fe..e6d1a77 100644 --- a/forks/artifacts/installer-artifact.dockerfile +++ b/forks/artifacts/installer-artifact.dockerfile @@ -1,16 +1,17 @@ +# +# it is part of the build sequence of installer-artifacts metapackage for a particular architecture and operating system +# FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.12 AS linuxbuilder ARG TAGS="" -ARG TGT_OS=linux -ARG TGT_ARCH=amd64 +ARG TARGET_OS=linux +ARG TARGET_ARCH=amd64 WORKDIR /go/src/github.com/openshift/installer COPY . . RUN \ - go version - GOOS=linux GOARCH=amd64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh -# -# it is part of the build sequence of installer-artifacts metapackage for a particular architecture and operating system -# + go env GOHOSTARCH ; \ + set -x ; \ + GOOS=${TARGET_OS} GOARCH=${TARGET_ARCH} DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh From 29e322d23cb7a4a499fbbb566ea76c833c802da0 Mon Sep 17 00:00:00 2001 From: dsevosty Date: Mon, 5 Jun 2023 21:25:16 +0000 Subject: [PATCH 10/22] fix: --- buildconfigs/06-cli.yaml | 3 +- buildconfigs/10-cli-artifacts.yaml | 3 +- .../10-installer-artifact-amd64-lnx.yaml | 4 +-- .../10-installer-artifact-amd64-mac.yaml | 4 +-- .../10-installer-artifact-arm64-lnx.yaml | 4 +-- .../10-installer-artifact-arm64-mac.yaml | 4 +-- buildconfigs/20-installer-artifacts.yaml | 33 ++++++++++++++++--- buildconfigs/kustomization.yaml | 4 +-- forks/artifacts/installer-artifact.dockerfile | 7 ++-- .../installer-artifacts-metaimage.dockerfile | 18 +++++----- variants/fcos/kustomization.yaml | 17 +++------- 11 files changed, 56 insertions(+), 45 deletions(-) diff --git a/buildconfigs/06-cli.yaml b/buildconfigs/06-cli.yaml index 3f0ad60..16593c8 100644 --- a/buildconfigs/06-cli.yaml +++ b/buildconfigs/06-cli.yaml @@ -43,8 +43,7 @@ spec: - name: ARCHITECTURES value: "" - name: MAKE_ARGS - value: >- - -e --warn-undefined-variables + value: -e --warn-undefined-variables - name: INSTALL_PKGS value: "krb5-devel" - name: INSTALL_PKGS_RUNTIME diff --git a/buildconfigs/10-cli-artifacts.yaml b/buildconfigs/10-cli-artifacts.yaml index cde2a31..47f1175 100644 --- a/buildconfigs/10-cli-artifacts.yaml +++ b/buildconfigs/10-cli-artifacts.yaml @@ -38,8 +38,7 @@ spec: - name: ARCHITECTURES value: "x86_64 aarch64 s390x ppc64le" - name: MAKE_ARGS - value: >- - cross-build --warn-undefined-variables + value: "cross-build --warn-undefined-variables" - name: INSTALL_PKGS value: "krb5-devel" - name: INSTALL_PKGS_RUNTIME diff --git a/buildconfigs/10-installer-artifact-amd64-lnx.yaml b/buildconfigs/10-installer-artifact-amd64-lnx.yaml index 607640c..143964d 100644 --- a/buildconfigs/10-installer-artifact-amd64-lnx.yaml +++ b/buildconfigs/10-installer-artifact-amd64-lnx.yaml @@ -15,12 +15,10 @@ spec: type: Docker dockerStrategy: buildArgs: - - name: "TAGS" - value: "okd" - name: "TARGET_ARCH" value: "amd64" - name: "TARGET_OS" value: "linux" output: to: - name: 'installer-artifacts:amd64-lnx' + name: 'artifacts:installer-amd64-lnx' diff --git a/buildconfigs/10-installer-artifact-amd64-mac.yaml b/buildconfigs/10-installer-artifact-amd64-mac.yaml index 85b7848..4fa979d 100644 --- a/buildconfigs/10-installer-artifact-amd64-mac.yaml +++ b/buildconfigs/10-installer-artifact-amd64-mac.yaml @@ -15,12 +15,10 @@ spec: type: Docker dockerStrategy: buildArgs: - - name: "TAGS" - value: "okd" - name: "TARGET_ARCH" value: "amd64" - name: "TARGET_OS" value: "darwin" output: to: - name: 'installer-artifacts:amd64-mac' + name: 'artifacts:installer-amd64-mac' diff --git a/buildconfigs/10-installer-artifact-arm64-lnx.yaml b/buildconfigs/10-installer-artifact-arm64-lnx.yaml index 766a60c..6f9e731 100644 --- a/buildconfigs/10-installer-artifact-arm64-lnx.yaml +++ b/buildconfigs/10-installer-artifact-arm64-lnx.yaml @@ -15,12 +15,10 @@ spec: type: Docker dockerStrategy: buildArgs: - - name: "TAGS" - value: "okd" - name: "TARGET_ARCH" value: "arm64" - name: "TARGET_OS" value: "linux" output: to: - name: 'installer-artifacts:arm64-lnx' + name: 'artifacts:installer-arm64-lnx' diff --git a/buildconfigs/10-installer-artifact-arm64-mac.yaml b/buildconfigs/10-installer-artifact-arm64-mac.yaml index 842c4a8..d24492e 100644 --- a/buildconfigs/10-installer-artifact-arm64-mac.yaml +++ b/buildconfigs/10-installer-artifact-arm64-mac.yaml @@ -15,12 +15,10 @@ spec: type: Docker dockerStrategy: buildArgs: - - name: "TAGS" - value: "okd" - name: "TARGET_ARCH" value: "arm64" - name: "TARGET_OS" value: "darwin" output: to: - name: 'installer-artifacts:arm64-mac' + name: 'artifacts:installer-arm64-mac' diff --git a/buildconfigs/20-installer-artifacts.yaml b/buildconfigs/20-installer-artifacts.yaml index adf0dd2..5480368 100644 --- a/buildconfigs/20-installer-artifacts.yaml +++ b/buildconfigs/20-installer-artifacts.yaml @@ -3,8 +3,10 @@ kind: BuildConfig metadata: name: installer-artifacts labels: + builder-replacement: skip change-build-arg-tags: "true" meta-for: installer-artifacts + resources-profile: low skip-release-branch: "true" spec: source: @@ -12,17 +14,38 @@ spec: git: # uri: 'https://github.com/openshift/installer' uri: https://gitbucket.apps.rs1.dsevosty.info/git/openshift-mirror/okd-project-okd-payload-pipeline.git - ref: release-4.12-ds01 - contextDir: . - images: [] + ref: split-merge + contextDir: forks + images: + - as: + - artifacts:installer-amd64-lnx + from: + kind: ImageStreamTag + name: artifacts:installer-amd64-lnx + - as: + - artifacts:installer-amd64-mac + from: + kind: ImageStreamTag + name: artifacts:installer-amd64-mac + - as: + - artifacts:installer-arm64-lnx + from: + kind: ImageStreamTag + name: artifacts:installer-arm64-lnx + - as: + - artifacts:installer-arm64-mac + from: + kind: ImageStreamTag + name: artifacts:installer-arm64-mac strategy: type: Docker dockerStrategy: - imageOptimizationPolicy: SkipLayers - dockerfilePath: code/artifacts/installer-artifacts.dockerfile + buildArgs: [] + dockerfilePath: artifacts/installer-artifacts-metaimage.dockerfile from: kind: "ImageStreamTag" name: "release:base" + imageOptimizationPolicy: SkipLayers output: to: kind: ImageStreamTag diff --git a/buildconfigs/kustomization.yaml b/buildconfigs/kustomization.yaml index 2e66b40..756c151 100644 --- a/buildconfigs/kustomization.yaml +++ b/buildconfigs/kustomization.yaml @@ -61,7 +61,7 @@ patches: resources-profile: high - op: add path: /spec/output/to/kind - value: ImageStream + value: ImageStreamTag - op: add path: /spec/source/contextDir value: "." @@ -84,7 +84,7 @@ patches: path: /spec/strategy/dockerStrategy/from value: kind: "ImageStreamTag" - name: "release:base" + name: "release:builder" target: kind: BuildConfig labelSelector: "part-of-artifacts=installer" diff --git a/forks/artifacts/installer-artifact.dockerfile b/forks/artifacts/installer-artifact.dockerfile index e6d1a77..150bf2a 100644 --- a/forks/artifacts/installer-artifact.dockerfile +++ b/forks/artifacts/installer-artifact.dockerfile @@ -1,7 +1,7 @@ # # it is part of the build sequence of installer-artifacts metapackage for a particular architecture and operating system # -FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.12 AS linuxbuilder +FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.12 AS builder ARG TAGS="" ARG TARGET_OS=linux @@ -12,6 +12,9 @@ WORKDIR /go/src/github.com/openshift/installer COPY . . RUN \ - go env GOHOSTARCH ; \ set -x ; \ GOOS=${TARGET_OS} GOARCH=${TARGET_ARCH} DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh + +FROM scratch + +COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install / \ No newline at end of file diff --git a/forks/artifacts/installer-artifacts-metaimage.dockerfile b/forks/artifacts/installer-artifacts-metaimage.dockerfile index 41187e9..a4d7db5 100644 --- a/forks/artifacts/installer-artifacts-metaimage.dockerfile +++ b/forks/artifacts/installer-artifacts-metaimage.dockerfile @@ -2,14 +2,16 @@ # this is an installer-artifacts final metaimage, which contains all openshift-installer binaries (except baremetalm why?) # -FROM installer-artifacts:amd64-lnx AS linuxbuilder -FROM installer-artifacts:arm64-lnx AS linuxarmbuilder -FROM installer-artifacts:amd64-mac AS macbuilder -FROM installer-artifacts:arm64-mac AS macarmbuilder +FROM artifacts:installer-amd64-lnx AS linuxamd64 +FROM artifacts:installer-arm64-lnx AS linuxarm64 +FROM artifacts:installer-amd64-mac AS macamd64 +FROM artifacts:installer-arm64-mac AS macarm64 FROM registry.ci.openshift.org/ocp/4.12:installer -COPY --from=linuxarmbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/linux_arm64/openshift-install -COPY --from=linuxbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/linux_amd64/openshift-install -COPY --from=macarmbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/mac_arm64/openshift-install -COPY --from=macbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/mac/openshift-install +COPY --from=linuxamd64 /openshift-install /usr/share/openshift/linux_amd64/openshift-install +COPY --from=linuxarm64 /openshift-install /usr/share/openshift/linux_arm64/openshift-install +COPY --from=macarm64 /openshift-install /usr/share/openshift/mac_arm64/openshift-install + +# or mac_amd64? +COPY --from=macamd64 /openshift-install /usr/share/openshift/mac/openshift-install diff --git a/variants/fcos/kustomization.yaml b/variants/fcos/kustomization.yaml index aaa24a5..d152da7 100644 --- a/variants/fcos/kustomization.yaml +++ b/variants/fcos/kustomization.yaml @@ -9,18 +9,11 @@ resources: patches: - patch: |- - apiVersion: build.openshift.io/v1 - kind: BuildConfig - metadata: - name: not-used - labels: - change-build-arg-tags: "" - spec: - strategy: - dockerStrategy: - buildArgs: - - name: "TAGS" - value: "fcos" + - op: add + path: /spec/strategy/dockerStrategy/buildArgs/- + value: + name: "TAGS" + value: "fcos" target: labelSelector: "change-build-arg-tags==true" kind: BuildConfig From 85db2bb65170549dff2977be18a103d682022521 Mon Sep 17 00:00:00 2001 From: dsevosty Date: Mon, 5 Jun 2023 22:13:24 +0000 Subject: [PATCH 11/22] temporary image stream for artifacts --- buildconfigs/02-additional-imagestream.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildconfigs/02-additional-imagestream.yaml b/buildconfigs/02-additional-imagestream.yaml index 9b8f2a4..ce9227b 100644 --- a/buildconfigs/02-additional-imagestream.yaml +++ b/buildconfigs/02-additional-imagestream.yaml @@ -25,4 +25,4 @@ spec: apiVersion: image.openshift.io/v1 kind: ImageStream metadata: - name: installer-artifacts + name: artifacts From 9dd07ac5f6bdaa5d846c78b9433c5d7961897e79 Mon Sep 17 00:00:00 2001 From: dsevosty Date: Tue, 6 Jun 2023 10:12:22 +0000 Subject: [PATCH 12/22] bc names become more accurate --- buildconfigs/10-installer-artifact-amd64-lnx.yaml | 2 +- buildconfigs/10-installer-artifact-amd64-mac.yaml | 2 +- buildconfigs/10-installer-artifact-arm64-lnx.yaml | 2 +- buildconfigs/10-installer-artifact-arm64-mac.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/buildconfigs/10-installer-artifact-amd64-lnx.yaml b/buildconfigs/10-installer-artifact-amd64-lnx.yaml index 143964d..d1bf7e4 100644 --- a/buildconfigs/10-installer-artifact-amd64-lnx.yaml +++ b/buildconfigs/10-installer-artifact-amd64-lnx.yaml @@ -1,7 +1,7 @@ apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: - name: installer-artifacts-amd64-lnx + name: installer-artifact-amd64-lnx labels: part-of-artifacts: installer spec: diff --git a/buildconfigs/10-installer-artifact-amd64-mac.yaml b/buildconfigs/10-installer-artifact-amd64-mac.yaml index 4fa979d..c052ebd 100644 --- a/buildconfigs/10-installer-artifact-amd64-mac.yaml +++ b/buildconfigs/10-installer-artifact-amd64-mac.yaml @@ -1,7 +1,7 @@ apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: - name: installer-artifacts-amd64-mac + name: installer-artifact-amd64-mac labels: part-of-artifacts: installer spec: diff --git a/buildconfigs/10-installer-artifact-arm64-lnx.yaml b/buildconfigs/10-installer-artifact-arm64-lnx.yaml index 6f9e731..2015ba9 100644 --- a/buildconfigs/10-installer-artifact-arm64-lnx.yaml +++ b/buildconfigs/10-installer-artifact-arm64-lnx.yaml @@ -1,7 +1,7 @@ apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: - name: installer-artifacts-arm64-lnx + name: installer-artifact-arm64-lnx labels: part-of-artifacts: installer spec: diff --git a/buildconfigs/10-installer-artifact-arm64-mac.yaml b/buildconfigs/10-installer-artifact-arm64-mac.yaml index d24492e..3001638 100644 --- a/buildconfigs/10-installer-artifact-arm64-mac.yaml +++ b/buildconfigs/10-installer-artifact-arm64-mac.yaml @@ -1,7 +1,7 @@ apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: - name: installer-artifacts-arm64-mac + name: installer-artifact-arm64-mac labels: part-of-artifacts: installer spec: From a457014bfb5090f0984849b9f941459f93cf15e0 Mon Sep 17 00:00:00 2001 From: dsevosty Date: Tue, 6 Jun 2023 10:13:02 +0000 Subject: [PATCH 13/22] bc names become more accurate again --- buildconfigs/10-network-interface-bond-cni.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildconfigs/10-network-interface-bond-cni.yaml b/buildconfigs/10-network-interface-bond-cni.yaml index c74b678..319b235 100644 --- a/buildconfigs/10-network-interface-bond-cni.yaml +++ b/buildconfigs/10-network-interface-bond-cni.yaml @@ -1,7 +1,7 @@ apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: - name: bond-cni + name: network-interface-bond-cni spec: source: type: Git From 550aeeebd4567def84529f1c9c8b226529046ca2 Mon Sep 17 00:00:00 2001 From: dsevosty Date: Tue, 6 Jun 2023 10:16:02 +0000 Subject: [PATCH 14/22] add: OCP_VERSION to buildArgs to avoid defaulting from dockerfile --- buildconfigs/kustomization.yaml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/buildconfigs/kustomization.yaml b/buildconfigs/kustomization.yaml index 756c151..9e5201f 100644 --- a/buildconfigs/kustomization.yaml +++ b/buildconfigs/kustomization.yaml @@ -18,6 +18,15 @@ patches: target: kind: BuildConfig name: etcd + - patch: |- + - op: add + path: /spec/strategy/dockerStrategy/buildArgs + value: + - name: OCP_VERSION + value: "4.13" + target: + kind: BuildConfig + name: base # The next patch will replace the build-stage images used by the upstream repositories' Dockerfiles with the okd builder one. # In particular, each stage extending from an image contained in the `as` array below will start from the ImageStreamTag release:builder # In the future, we may change this to be more specific to the builder image features. E.g., we may need one builder image per golang version. @@ -56,9 +65,11 @@ patches: - op: add path: /metadata/labels value: + builder-replacement: skip change-build-arg-tags: "true" part-of-artifacts: installer resources-profile: high + skip-replace-cli: "true" - op: add path: /spec/output/to/kind value: ImageStreamTag @@ -81,10 +92,14 @@ patches: path: /spec/strategy/dockerStrategy/dockerfilePath value: images/installer-artifacts/installer-artifact.dockerfile - op: add - path: /spec/strategy/dockerStrategy/from - value: - kind: "ImageStreamTag" - name: "release:builder" + path: /spec/source/dockerfile + value: | + FROM scratch + # - op: add + # path: /spec/strategy/dockerStrategy/from + # value: + # kind: "ImageStreamTag" + # name: "release:builder" target: kind: BuildConfig labelSelector: "part-of-artifacts=installer" From 7c423560fdeeb691378cfaf69e6d48c50bbbe73f Mon Sep 17 00:00:00 2001 From: dsevosty Date: Tue, 6 Jun 2023 10:18:40 +0000 Subject: [PATCH 15/22] bc reodred in pipeline tasks due to splitting installer-artifacts build to particular builds --- forks/artifacts/installer-artifact.dockerfile | 4 ++- .../installer-artifacts-metaimage.dockerfile | 2 +- pipelines/build-from-scratch.yaml | 26 ++++++++++++++++--- pipelines/full-rebuild.yaml | 2 +- variants/fcos/kustomization.yaml | 2 +- 5 files changed, 28 insertions(+), 8 deletions(-) diff --git a/forks/artifacts/installer-artifact.dockerfile b/forks/artifacts/installer-artifact.dockerfile index 150bf2a..45f60eb 100644 --- a/forks/artifacts/installer-artifact.dockerfile +++ b/forks/artifacts/installer-artifact.dockerfile @@ -14,7 +14,9 @@ COPY . . RUN \ set -x ; \ GOOS=${TARGET_OS} GOARCH=${TARGET_ARCH} DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh - +# +# copy result binary to blank image to avoid locat huge commit overhead and container registry fill +# FROM scratch COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install / \ No newline at end of file diff --git a/forks/artifacts/installer-artifacts-metaimage.dockerfile b/forks/artifacts/installer-artifacts-metaimage.dockerfile index a4d7db5..6303d82 100644 --- a/forks/artifacts/installer-artifacts-metaimage.dockerfile +++ b/forks/artifacts/installer-artifacts-metaimage.dockerfile @@ -1,5 +1,5 @@ # -# this is an installer-artifacts final metaimage, which contains all openshift-installer binaries (except baremetalm why?) +# this is an installer-artifacts final metaimage, which contains all openshift-installer binaries (except baremetal, is it needed to add here?) # FROM artifacts:installer-amd64-lnx AS linuxamd64 diff --git a/pipelines/build-from-scratch.yaml b/pipelines/build-from-scratch.yaml index 1f4d845..0f8a49a 100644 --- a/pipelines/build-from-scratch.yaml +++ b/pipelines/build-from-scratch.yaml @@ -19,6 +19,10 @@ spec: - name: max_concurrent_builds type: string default: "8" + - name: new-release-dry-run + description: Dry run of release task + type: string + default: "false" workspaces: - name: push-credentials tasks: @@ -140,6 +144,10 @@ spec: - ibm-vpc-node-label-updater - ibmcloud-machine-controllers - insights-operator + - installer-artifact-amd64-lnx + - installer-artifact-amd64-mac + - installer-artifact-arm64-lnx + - installer-artifact-arm64-mac - ironic-agent - ironic-machine-os-downloader - ironic-static-ip-manager @@ -159,7 +167,7 @@ spec: - multus-route-override-cni - multus-whereabouts-ipam-cni - must-gather - - bond-cni + - network-interface-bond-cni - network-metrics-daemon - nutanix-machine-controllers - oauth-apiserver @@ -209,14 +217,24 @@ spec: - sdn - console - baremetal-installer - - installer-artifacts +# - installer-artifacts - installer - hyperkube - ovn-kubernetes-base - - name: batch-02 + - name: meta-image timeout: "2h0m0s" runAfter: - batch-01 + taskRef: + name: batch-build + params: + - name: build_configs + value: + - installer-artifacts + - name: batch-02 + timeout: "2h0m0s" + runAfter: + - meta-image taskRef: name: batch-build params: @@ -229,6 +247,7 @@ spec: - machine-os-images - deployer - ovn-kubernetes + - artifacts - name: batch-03 timeout: "1h0m0s" runAfter: @@ -238,7 +257,6 @@ spec: params: - name: build_configs value: - - artifacts - tests - network-tools - ovn-kubernetes-microshift diff --git a/pipelines/full-rebuild.yaml b/pipelines/full-rebuild.yaml index 33ff823..d64ab30 100644 --- a/pipelines/full-rebuild.yaml +++ b/pipelines/full-rebuild.yaml @@ -255,7 +255,7 @@ spec: - multus-route-override-cni - multus-whereabouts-ipam-cni - must-gather - - bond-cni + - network-interface-bond-cni - network-metrics-daemon - nutanix-machine-controllers - oauth-apiserver diff --git a/variants/fcos/kustomization.yaml b/variants/fcos/kustomization.yaml index d152da7..f136bf7 100644 --- a/variants/fcos/kustomization.yaml +++ b/variants/fcos/kustomization.yaml @@ -43,7 +43,7 @@ patches: name: release - patch: |- - op: add - path: "/spec/tasks/3/params/0/value/-" + path: "/spec/tasks/4/params/0/value/-" value: fedora-coreos target: From f545ee258893401b08d6d96cd560078c99c76735 Mon Sep 17 00:00:00 2001 From: dsevosty Date: Wed, 7 Jun 2023 20:48:06 +0000 Subject: [PATCH 16/22] fix: wrong repo --- buildconfigs/20-installer-artifacts.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/buildconfigs/20-installer-artifacts.yaml b/buildconfigs/20-installer-artifacts.yaml index 5480368..b4d7dc1 100644 --- a/buildconfigs/20-installer-artifacts.yaml +++ b/buildconfigs/20-installer-artifacts.yaml @@ -12,9 +12,8 @@ spec: source: type: Git git: -# uri: 'https://github.com/openshift/installer' - uri: https://gitbucket.apps.rs1.dsevosty.info/git/openshift-mirror/okd-project-okd-payload-pipeline.git - ref: split-merge + uri: https://github.com/okd-project/okd-payload-pipeline.git + ref: main contextDir: forks images: - as: From 3dba42c348ee563d511c55ef04d3103389f2dd37 Mon Sep 17 00:00:00 2001 From: dsevosty Date: Wed, 7 Jun 2023 21:09:00 +0000 Subject: [PATCH 17/22] build outdated images feature added --- pipelines/01-batch-build-task.yaml | 83 ++++++++++++++++++++++++++++-- pipelines/build-from-scratch.yaml | 14 +++++ 2 files changed, 92 insertions(+), 5 deletions(-) diff --git a/pipelines/01-batch-build-task.yaml b/pipelines/01-batch-build-task.yaml index 46e8cc4..ce27835 100644 --- a/pipelines/01-batch-build-task.yaml +++ b/pipelines/01-batch-build-task.yaml @@ -1,3 +1,4 @@ +--- apiVersion: tekton.dev/v1beta1 kind: Task metadata: @@ -10,6 +11,9 @@ spec: - name: max_concurrent_builds type: string default: "8" + - name: build_outdated_only + type: string + default: "" steps: - name: builds image: image-registry.openshift-image-registry.svc:5000/openshift/cli:latest @@ -17,24 +21,93 @@ spec: env: - name: "MAX_PROCESSES" value: "$(params.max_concurrent_builds)" + - name: "BUILD_OUTDATED_ONLY" + value: "$(params.build_outdated_only)" timeout: 4h0m0s script: | #!/bin/bash - set -x - join() { + #set -x + + function is_build_outdated() { + local bc="$1" + + case $BUILD_OUTDATED_ONLY in + [Tt][Rr][Uu][Ee]|[Yy][Ee][Ss]) + ;; + *) + return 1 + ;; + esac + + local git_ref git_uri source_commit_id + local is_meta image_commit_id is_tag + + eval $(oc get bc $bc -o jsonpath='{"git_ref="}{.spec.source.git.ref}{"\ngit_uri="}{.spec.source.git.uri}{"\nis_meta="}{.metadata.labels.meta-for}{"\nis_tag="}{.spec.output.to.name}{"\n"}') + + [ -z "$is_meta" ] || return 1 + + # git ls-remote $git_uri -b $git_ref + source_commit_id=$(\ + curl \ + -d '0013command=ls-refs000800010008peel000bsymrefs0000' \ + --http1.1 \ + -H 'Accept: application/x-git-upload-pack-result' \ + -H 'Content-Type: application/x-git-upload-pack-request' \ + -H 'Git-Protocol: version=2' \ + -H 'Pragma: no-cache' \ + -H 'User-Agent: git/2.39.2' \ + -H 'Content-Length: 50' \ + "$git_uri/git-upload-pack" \ + 2> /dev/null | \ + awk "/refs\/[^\/]+\/${git_ref}$/ { print \$1; }" | \ + sed 's/....//') + + oc get istag $is_tag 1> /dev/null 2>&1 || return 1 + + istag_commit_id=$(oc describe istag $is_tag | awk -F= '/io.openshift.build.commit.id/ { print $2; }') + + if [ "$source_commit_id" = "$istag_commit_id" -a "${#source_commit_id}" = "40" ] ; then + echo "[$(get-cur-dat)] istag $is_tag is up-to-date (commit_id=$istag_commit_id)" + return 0 + fi + return 1 + } + + function get-cur-dat() { + echo -n $(date +%Y%m%d%H%M%S) + } + + function join() { wait -n code="$?" if [ $code -gt 0 ] && [ $code != "127" ]; then - # when $code = 127 the shell has no children processes. - exit "$code" + exit "$code" fi COUNTER=$(( COUNTER - 1 )) } + function start_build() { + local bc=$1 + local rc + local output + + echo "[$(get-cur-dat)] Build '$bc': start" + output=$(oc start-build $bc -w) + rc=$? + if [ "$rc" = "0" -o "$rc" = "127" ]; then + echo "[$(get-cur-dat)] Build '$bc': success($rc)" + else + echo -e $output + echo "[$(get-cur-dat)] Build '$bc': fail($rc)" + fi + exit $rc + } + COUNTER=0 for BUILD in "$@"; do - oc start-build "${BUILD}" -w & + is_build_outdated "${BUILD}" && continue + start_build "${BUILD}" & COUNTER=$(( COUNTER + 1 )) while [ $COUNTER -ge "$MAX_PROCESSES" ]; do join diff --git a/pipelines/build-from-scratch.yaml b/pipelines/build-from-scratch.yaml index 0f8a49a..9bd2ad8 100644 --- a/pipelines/build-from-scratch.yaml +++ b/pipelines/build-from-scratch.yaml @@ -19,6 +19,10 @@ spec: - name: max_concurrent_builds type: string default: "8" + - name: build_outdated_only + default: "" + description: Build or not up-to-date images + type: string - name: new-release-dry-run description: Dry run of release task type: string @@ -30,6 +34,8 @@ spec: taskRef: name: batch-build params: + - name: build_outdated_only + value: "false" - name: max_concurrent_builds value: "1" - name: build_configs @@ -45,6 +51,8 @@ spec: taskRef: name: batch-build params: + - name: build_outdated_only + value: "$(params.build_outdated_only)" - name: max_concurrent_builds value: "$(params.max_concurrent_builds)" - name: build_configs @@ -238,6 +246,8 @@ spec: taskRef: name: batch-build params: + - name: build_outdated_only + value: "$(params.build_outdated_only)" - name: build_configs value: - agent-installer-api-server @@ -255,6 +265,8 @@ spec: taskRef: name: batch-build params: + - name: build_outdated_only + value: "$(params.build_outdated_only)" - name: build_configs value: - tests @@ -277,3 +289,5 @@ spec: value: $(params.result-image) - name: release-image-name value: $(params.result-image-name) + - name: new-release-dry-run + value: $(params.new-release-dry-run) From 0b1f1c25eeb8339436ef697743d792fb0d99febd Mon Sep 17 00:00:00 2001 From: dsevosty Date: Fri, 9 Jun 2023 10:07:25 +0000 Subject: [PATCH 18/22] fix: wrong task index --- variants/fcos/kustomization.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variants/fcos/kustomization.yaml b/variants/fcos/kustomization.yaml index f136bf7..e9c2896 100644 --- a/variants/fcos/kustomization.yaml +++ b/variants/fcos/kustomization.yaml @@ -43,7 +43,7 @@ patches: name: release - patch: |- - op: add - path: "/spec/tasks/4/params/0/value/-" + path: "/spec/tasks/4/params/1/value/-" value: fedora-coreos target: From 5d9c23e3768d09f8df8030f2c947ae68497706ad Mon Sep 17 00:00:00 2001 From: dsevosty Date: Fri, 9 Jun 2023 10:07:52 +0000 Subject: [PATCH 19/22] fix: wrong identation --- pipelines/build-from-scratch.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelines/build-from-scratch.yaml b/pipelines/build-from-scratch.yaml index 9bd2ad8..c0b0e11 100644 --- a/pipelines/build-from-scratch.yaml +++ b/pipelines/build-from-scratch.yaml @@ -289,5 +289,5 @@ spec: value: $(params.result-image) - name: release-image-name value: $(params.result-image-name) - - name: new-release-dry-run - value: $(params.new-release-dry-run) + - name: new-release-dry-run + value: $(params.new-release-dry-run) From 1fa4dcb01b293d99fb81f5b4cc9467c205c9d776 Mon Sep 17 00:00:00 2001 From: dsevosty Date: Fri, 9 Jun 2023 13:43:38 +0000 Subject: [PATCH 20/22] avoid butter oil --- buildconfigs/20-installer-artifacts.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildconfigs/20-installer-artifacts.yaml b/buildconfigs/20-installer-artifacts.yaml index b4d7dc1..7318789 100644 --- a/buildconfigs/20-installer-artifacts.yaml +++ b/buildconfigs/20-installer-artifacts.yaml @@ -12,7 +12,7 @@ spec: source: type: Git git: - uri: https://github.com/okd-project/okd-payload-pipeline.git + uri: https://github.com/okd-project/okd-payload-pipeline ref: main contextDir: forks images: From 61b37c1b09318e21749c3fbae550c9c365d22ee2 Mon Sep 17 00:00:00 2001 From: dsevosty Date: Sun, 11 Jun 2023 07:43:54 +0000 Subject: [PATCH 21/22] okd-rpms reworked to be a hard links for neseccary rpms at release:artifacts bundle --- buildconfigs/01-imagestream.yaml | 4 ++ buildconfigs/02-additional-imagestream.yaml | 18 ++--- buildconfigs/03-forked-dockerfiles.yaml | 1 + buildconfigs/05-base.yaml | 1 + buildconfigs/06-cli.yaml | 1 + buildconfigs/10-baremetal-installer.yaml | 1 + buildconfigs/10-cli-artifacts.yaml | 1 + buildconfigs/10-hyperkube.yaml | 1 + buildconfigs/10-installer.yaml | 1 + buildconfigs/10-ironic.yaml | 10 +-- buildconfigs/10-machine-config-operator.yaml | 1 + buildconfigs/10-ovirt-installer.yaml | 1 + .../{30-artifacts.yaml => 20-artifacts.yaml} | 43 ++++++++--- buildconfigs/kustomization.yaml | 3 +- forks/artifacts/Dockerfile.centos9 | 35 +++++++++ .../installer-artifacts-metaimage.dockerfile | 13 ++-- pipelines/build-from-scratch.yaml | 72 ++++++++++--------- variants/fcos/kustomization.yaml | 28 +++++++- variants/scos/kustomization.yaml | 7 ++ 19 files changed, 173 insertions(+), 69 deletions(-) rename buildconfigs/{30-artifacts.yaml => 20-artifacts.yaml} (52%) diff --git a/buildconfigs/01-imagestream.yaml b/buildconfigs/01-imagestream.yaml index a5c76f1..47f8081 100644 --- a/buildconfigs/01-imagestream.yaml +++ b/buildconfigs/01-imagestream.yaml @@ -6,6 +6,10 @@ spec: lookupPolicy: local: true tags: + - name: okd-rpms + from: + kind: ImageStreamTag + name: release:artifacts - name: kuryr-cni from: kind: DockerImage diff --git a/buildconfigs/02-additional-imagestream.yaml b/buildconfigs/02-additional-imagestream.yaml index e5a290e..cf4ceda 100644 --- a/buildconfigs/02-additional-imagestream.yaml +++ b/buildconfigs/02-additional-imagestream.yaml @@ -15,14 +15,16 @@ spec: type: Local importPolicy: importMode: PreserveOriginal # Needs OKD 4.13 - - name: fedora36 - from: - kind: DockerImage - name: 'quay.io/fedora/fedora:36' - referencePolicy: - type: Local - importPolicy: - importMode: PreserveOriginal # Needs OKD 4.13 +# upstream already resides on fedora:37 (Dockerfile.okd -> Dockerfile.fcos) +# while scos is being built by Dockerfile.scos +# - name: fedora36 +# from: +# kind: DockerImage +# name: 'quay.io/fedora/fedora:36' +# referencePolicy: +# type: Local +# importPolicy: +# importMode: PreserveOriginal # Needs OKD 4.13 --- apiVersion: image.openshift.io/v1 kind: ImageStream diff --git a/buildconfigs/03-forked-dockerfiles.yaml b/buildconfigs/03-forked-dockerfiles.yaml index f23cca1..a4e6ffe 100644 --- a/buildconfigs/03-forked-dockerfiles.yaml +++ b/buildconfigs/03-forked-dockerfiles.yaml @@ -3,6 +3,7 @@ kind: BuildConfig metadata: name: forked-dockerfiles labels: + builder-replacement: skip skip-release-branch: "true" skip-replace-cli: "true" spec: diff --git a/buildconfigs/05-base.yaml b/buildconfigs/05-base.yaml index b1e8412..b99cc98 100644 --- a/buildconfigs/05-base.yaml +++ b/buildconfigs/05-base.yaml @@ -3,6 +3,7 @@ kind: BuildConfig metadata: name: base labels: + builder-replacement: skip # TODO: do we need branch cut for this? skip-release-branch: "true" skip-replace-cli: "true" diff --git a/buildconfigs/06-cli.yaml b/buildconfigs/06-cli.yaml index 16593c8..4c37303 100644 --- a/buildconfigs/06-cli.yaml +++ b/buildconfigs/06-cli.yaml @@ -56,6 +56,7 @@ spec: value: > OpenShift is a platform for developing, building, and deploying containerized applications. + # are these tag really necessary here? - name: TAGS value: openshift,cli - name: VERSIONS diff --git a/buildconfigs/10-baremetal-installer.yaml b/buildconfigs/10-baremetal-installer.yaml index d0443a2..810e9aa 100644 --- a/buildconfigs/10-baremetal-installer.yaml +++ b/buildconfigs/10-baremetal-installer.yaml @@ -25,6 +25,7 @@ spec: imageOptimizationPolicy: SkipLayers dockerfilePath: images/baremetal/Dockerfile.centos9 buildArgs: + # are these tag really necessary here? - name: "TAGS" value: "baremetal libvirt okd" from: diff --git a/buildconfigs/10-cli-artifacts.yaml b/buildconfigs/10-cli-artifacts.yaml index 47f1175..18d22cc 100644 --- a/buildconfigs/10-cli-artifacts.yaml +++ b/buildconfigs/10-cli-artifacts.yaml @@ -51,6 +51,7 @@ spec: value: > OpenShift is a platform for developing, building, and deploying containerized applications. + # are these tag really necessary here? - name: TAGS value: openshift,cli - name: VERSIONS diff --git a/buildconfigs/10-hyperkube.yaml b/buildconfigs/10-hyperkube.yaml index 1cf46cb..8a7d314 100644 --- a/buildconfigs/10-hyperkube.yaml +++ b/buildconfigs/10-hyperkube.yaml @@ -57,6 +57,7 @@ spec: value: > OpenShift is a platform for developing, building, and deploying containerized applications. + # are these tag really necessary here? - name: TAGS value: openshift,hyperkube - name: VERSIONS diff --git a/buildconfigs/10-installer.yaml b/buildconfigs/10-installer.yaml index d128f9b..d9d6db9 100644 --- a/buildconfigs/10-installer.yaml +++ b/buildconfigs/10-installer.yaml @@ -19,6 +19,7 @@ spec: imageOptimizationPolicy: SkipLayers dockerfilePath: images/installer/Dockerfile.ci buildArgs: + # are those tag really necessary here? seems "no" - name: "TAGS" value: "okd" from: diff --git a/buildconfigs/10-ironic.yaml b/buildconfigs/10-ironic.yaml index 0d70470..d8773bf 100644 --- a/buildconfigs/10-ironic.yaml +++ b/buildconfigs/10-ironic.yaml @@ -10,11 +10,11 @@ spec: ref: release-4.12 contextDir: . images: - - from: - kind: ImageStreamTag - name: 'tools:fedora36' - as: - - 'fedora:35' +# - from: +# kind: ImageStreamTag +# name: 'tools:fedora36' +# as: +# - 'fedora:35' - from: kind: ImageStreamTag name: 'tools:centos9' diff --git a/buildconfigs/10-machine-config-operator.yaml b/buildconfigs/10-machine-config-operator.yaml index d1c9280..62ad0b7 100644 --- a/buildconfigs/10-machine-config-operator.yaml +++ b/buildconfigs/10-machine-config-operator.yaml @@ -18,6 +18,7 @@ spec: imageOptimizationPolicy: SkipLayers dockerfilePath: Dockerfile buildArgs: + # are these tag really necessary here? seems "no" - name: "TAGS" value: "okd" from: diff --git a/buildconfigs/10-ovirt-installer.yaml b/buildconfigs/10-ovirt-installer.yaml index fd5d386..7a44527 100644 --- a/buildconfigs/10-ovirt-installer.yaml +++ b/buildconfigs/10-ovirt-installer.yaml @@ -19,6 +19,7 @@ spec: imageOptimizationPolicy: SkipLayers dockerfilePath: images/installer/Dockerfile.ci buildArgs: + # are those tag really necessary here? seems no - name: "TAGS" value: "okd" from: diff --git a/buildconfigs/30-artifacts.yaml b/buildconfigs/20-artifacts.yaml similarity index 52% rename from buildconfigs/30-artifacts.yaml rename to buildconfigs/20-artifacts.yaml index 214c565..9865e23 100644 --- a/buildconfigs/30-artifacts.yaml +++ b/buildconfigs/20-artifacts.yaml @@ -3,8 +3,16 @@ kind: BuildConfig metadata: name: artifacts labels: + builder-replacement: skip + change-build-arg-tags: "true" + resources-profile: low skip-release-branch: "true" + skip-replace-cli: "true" spec: + output: + to: + kind: ImageStreamTag + name: 'release:artifacts' source: contextDir: . images: @@ -18,11 +26,31 @@ spec: name: 'release:hyperkube' as: - 'release:hyperkube' - - from: + - as: + - artifacts:installer-amd64-lnx + from: kind: ImageStreamTag - name: 'release:installer-artifacts' - as: - - 'release:installer-artifacts' + name: artifacts:installer-amd64-lnx + - as: + - artifacts:installer-amd64-mac + from: + kind: ImageStreamTag + name: artifacts:installer-amd64-mac + - as: + - artifacts:installer-arm64-lnx + from: + kind: ImageStreamTag + name: artifacts:installer-arm64-lnx + - as: + - artifacts:installer-arm64-mac + from: + kind: ImageStreamTag + name: artifacts:installer-arm64-mac + #- from: + # kind: ImageStreamTag + # name: 'release:installer-artifacts' + # as: + # - 'release:installer-artifacts' - from: kind: ImageStreamTag name: 'release:forked-dockerfiles' @@ -32,12 +60,9 @@ spec: strategy: type: Docker dockerStrategy: - imageOptimizationPolicy: SkipLayers + buildArgs: [] dockerfilePath: Dockerfile.centos9 from: kind: "ImageStreamTag" name: "release:base" - output: - to: - kind: ImageStreamTag - name: 'release:artifacts' + imageOptimizationPolicy: SkipLayers diff --git a/buildconfigs/kustomization.yaml b/buildconfigs/kustomization.yaml index 9e5201f..5585103 100644 --- a/buildconfigs/kustomization.yaml +++ b/buildconfigs/kustomization.yaml @@ -342,14 +342,13 @@ resources: - 10-vsphere-problem-detector.yaml - 20-agent-installer-api-server.yaml - 20-agent-installer-csr-approver.yaml -# - 20-artifacts.yaml + - 20-artifacts.yaml - 20-deployer.yaml - 20-haproxy-router.yaml - 20-machine-os-images.yaml - 20-installer-artifacts.yaml - 20-ovn-kubernetes-base.yaml - 20-tools.yaml - - 30-artifacts.yaml - 30-fedora-coreos.yaml - 30-network-tools.yaml - 30-ovn-kubernetes-microshift.yaml diff --git a/forks/artifacts/Dockerfile.centos9 b/forks/artifacts/Dockerfile.centos9 index 9d19aa2..fccb0f9 100644 --- a/forks/artifacts/Dockerfile.centos9 +++ b/forks/artifacts/Dockerfile.centos9 @@ -1,7 +1,42 @@ +FROM fedora:37 AS crio + +ARG CRIO_VERSION=1.25 +ARG TAGS="" + +RUN \ + set -x ; \ + mkdir -p /rpms && \ + [ "$TAGS" = "fcos" ] || exit 0 ; \ + dnf install -y dnf-plugins-core && \ + dnf module enable -y cri-o:${CRIO_VERSION} && \ + dnf download -y cri-o cri-tools --destdir /rpms/$(uname -m) && \ + dnf clean all + FROM release:base +## is it necessary here? will release:installer-artifacts istag (offically at payload) be merged with the release:artifacts istag (currently not in payload) +#COPY --from=artifacts:installer-amd64-lnx /openshift-install /usr/share/openshift/linux_amd64/openshift-install +#COPY --from=artifacts:installer-arm64-lnx /openshift-install /usr/share/openshift/linux_arm64/openshift-install +#COPY --from=artifacts:installer-amd64-mac /openshift-install /usr/share/openshift/mac_arm64/openshift-install + COPY --from=release:cli-artifacts /srv/ /srv/ COPY --from=release:hyperkube /srv/ /srv/ +COPY --from=crio /rpms /tmp/rpms # TODO: the /srv/repo/ structure is slightly different than the origin-artifacts' structure and # this should lead to issues for the current consumers of this image: they should look for /srv/$(arch)/my_package.rpm + +RUN \ + set -x ; \ + if [ -d /tmp/rpms/$(uname -m) ] ; then \ + mkdir -p /rpms && \ + for r in /tmp/rpms/$(uname -m)/* ; do \ + mv -v $r /rpms/$(basename $r) ; \ + done ; \ + fi ; \ + if [ -d /srv/repo/$(uname -m) ] ; then \ + mkdir -p /rpms && \ + for r in /srv/repo/$(uname -m)/* ; do \ + ln -v $r /rpms/$(basename $r) ; \ + done ; \ + fi ; diff --git a/forks/artifacts/installer-artifacts-metaimage.dockerfile b/forks/artifacts/installer-artifacts-metaimage.dockerfile index 6303d82..69bcffd 100644 --- a/forks/artifacts/installer-artifacts-metaimage.dockerfile +++ b/forks/artifacts/installer-artifacts-metaimage.dockerfile @@ -2,16 +2,11 @@ # this is an installer-artifacts final metaimage, which contains all openshift-installer binaries (except baremetal, is it needed to add here?) # -FROM artifacts:installer-amd64-lnx AS linuxamd64 -FROM artifacts:installer-arm64-lnx AS linuxarm64 -FROM artifacts:installer-amd64-mac AS macamd64 -FROM artifacts:installer-arm64-mac AS macarm64 - FROM registry.ci.openshift.org/ocp/4.12:installer -COPY --from=linuxamd64 /openshift-install /usr/share/openshift/linux_amd64/openshift-install -COPY --from=linuxarm64 /openshift-install /usr/share/openshift/linux_arm64/openshift-install -COPY --from=macarm64 /openshift-install /usr/share/openshift/mac_arm64/openshift-install +COPY --from=artifacts:installer-amd64-lnx /openshift-install /usr/share/openshift/linux_amd64/openshift-install +COPY --from=artifacts:installer-arm64-lnx /openshift-install /usr/share/openshift/linux_arm64/openshift-install +COPY --from=artifacts:installer-amd64-mac /openshift-install /usr/share/openshift/mac_arm64/openshift-install # or mac_amd64? -COPY --from=macamd64 /openshift-install /usr/share/openshift/mac/openshift-install +COPY --from=artifacts:installer-arm64-mac /openshift-install /usr/share/openshift/mac/openshift-install diff --git a/pipelines/build-from-scratch.yaml b/pipelines/build-from-scratch.yaml index c0b0e11..39f7f94 100644 --- a/pipelines/build-from-scratch.yaml +++ b/pipelines/build-from-scratch.yaml @@ -57,6 +57,8 @@ spec: value: "$(params.max_concurrent_builds)" - name: build_configs value: + - agent-installer-api-server + - agent-installer-csr-approver - agent-installer-node-agent - agent-installer-orchestrator - alibaba-cloud-controller-manager @@ -78,10 +80,12 @@ spec: - azure-file-csi-driver-operator - azure-file-csi-driver - azure-machine-controllers + - baremetal-installer - baremetal-machine-controllers - baremetal-operator - baremetal-runtimecfg - branding + - cli-artifacts - cloud-credential-operator - cloud-network-config-controller - cluster-authentication-operator @@ -107,6 +111,7 @@ spec: - cluster-machine-approver - cluster-monitoring-operator - cluster-network-operator + - cluster-node-tuning-operator - cluster-openshift-apiserver-operator - cluster-openshift-controller-manager-operator - cluster-policy-controller @@ -115,10 +120,11 @@ spec: - cluster-update-keys - cluster-version-operator - configmap-reloader + - console - console-operator - container-networking-plugins - - contour-operator - contour + - contour-operator - coredns - csi-driver-manila-operator - csi-driver-manila @@ -145,6 +151,7 @@ spec: - gcp-pd-csi-driver-operator - gcp-pd-csi-driver - haproxy-router-base + - hyperkube - hypershift - ibm-cloud-controller-manager - ibm-vpc-block-csi-driver-operator @@ -152,25 +159,29 @@ spec: - ibm-vpc-node-label-updater - ibmcloud-machine-controllers - insights-operator - - installer-artifact-amd64-lnx - - installer-artifact-amd64-mac - - installer-artifact-arm64-lnx - - installer-artifact-arm64-mac + - installer + - ironic - ironic-agent + - ironic-hardware-inventory-recorder + - installer-artifact-amd64-lnx - ironic-machine-os-downloader - ironic-static-ip-manager - k8s-prometheus-adapter - keepalived-ipfailover + - installer-artifact-amd64-mac - kube-proxy - kube-rbac-proxy - kube-state-metrics - kube-storage-version-migrator - local-storage-static-provisioner + - installer-artifact-arm64-lnx + - libvirt-machine-controllers - machine-api-operator - machine-config-operator - machine-image-customization-controller - multus-admission-controller - multus-cni + - installer-artifact-arm64-mac - multus-networkpolicy - multus-route-override-cni - multus-whereabouts-ipam-cni @@ -182,7 +193,6 @@ spec: - oauth-proxy - oauth-server - oc-mirror - - cli-artifacts - openshift-apiserver - openshift-controller-manager - openshift-state-metrics @@ -193,10 +203,12 @@ spec: - openstack-machine-controllers - operator-lifecycle-manager - operator-marketplace + - operator-registry - ovirt-csi-driver-operator - ovirt-csi-driver - ovirt-installer - ovirt-machine-controllers + - ovn-kubernetes-base - pod - powervs-cloud-controller-manager - powervs-machine-controllers @@ -209,6 +221,7 @@ spec: - prometheus - route-controller-manager - service-ca-operator + - sdn - telemeter - thanos - vsphere-cloud-controller-manager @@ -217,32 +230,22 @@ spec: - vsphere-csi-driver-syncer - vsphere-csi-driver - vsphere-problem-detector - - cluster-node-tuning-operator - - ironic - - ironic-hardware-inventory-recorder - - libvirt-machine-controllers - - operator-registry - - sdn - - console - - baremetal-installer # - installer-artifacts - - installer - - hyperkube - - ovn-kubernetes-base - - name: meta-image - timeout: "2h0m0s" - runAfter: - - batch-01 - taskRef: - name: batch-build - params: - - name: build_configs - value: - - installer-artifacts +# - name: meta-images +# timeout: "2h0m0s" +# runAfter: +# - batch-01 +# taskRef: +# name: batch-build +# params: +# - name: build_configs +# value: +# - installer-artifacts - name: batch-02 timeout: "2h0m0s" runAfter: - - meta-image + - batch-01 +# - meta-images taskRef: name: batch-build params: @@ -250,14 +253,14 @@ spec: value: "$(params.build_outdated_only)" - name: build_configs value: - - agent-installer-api-server - - agent-installer-csr-approver - - tools + - installer-artifacts + - artifacts + - deployer - haproxy-router - machine-os-images - - deployer - ovn-kubernetes - - artifacts + - ovn-kubernetes-microshift + - tools - name: batch-03 timeout: "1h0m0s" runAfter: @@ -269,9 +272,8 @@ spec: value: "$(params.build_outdated_only)" - name: build_configs value: - - tests - network-tools - - ovn-kubernetes-microshift + - tests - name: new-release timeout: "2h0m0s" runAfter: diff --git a/variants/fcos/kustomization.yaml b/variants/fcos/kustomization.yaml index e9c2896..267bcbc 100644 --- a/variants/fcos/kustomization.yaml +++ b/variants/fcos/kustomization.yaml @@ -17,6 +17,18 @@ patches: target: labelSelector: "change-build-arg-tags==true" kind: BuildConfig + - patch: |- + - op: add + path: /spec/source/images/- + value: + from: + kind: ImageStreamTag + name: 'tools:fedora37' + as: + - 'fedora:37' + target: + kind: BuildConfig + name: artifacts - patch: |- - op: add path: "/spec/tags/-" @@ -27,6 +39,20 @@ patches: name: quay.io/fedora/fedora-coreos:next-devel referencePolicy: type: Source + # + # fc37 is necessary to build ironic and okd-rpms + - op: add + path: /spec/tags/- + value: + from: + kind: DockerImage + name: registry.fedoraproject.org/fedora:37 + #importPolicy: + # scheduled: true + # importMode: PreserveOriginal # Needs OKD 4.13 + name: fedora37 + referencePolicy: + type: Local target: kind: ImageStream name: tools @@ -43,7 +69,7 @@ patches: name: release - patch: |- - op: add - path: "/spec/tasks/4/params/1/value/-" + path: "/spec/tasks/3/params/1/value/-" value: fedora-coreos target: diff --git a/variants/scos/kustomization.yaml b/variants/scos/kustomization.yaml index f5e99d2..d8e3bbc 100644 --- a/variants/scos/kustomization.yaml +++ b/variants/scos/kustomization.yaml @@ -6,6 +6,13 @@ resources: - ../../pipelines patches: + - patch: |- + - op: add + path: /spec/strategy/dockerStrategy/dockerfilePath + value: Dockerfile.scos + target: + kind: BuildConfig + name: ironic - patch: |- apiVersion: build.openshift.io/v1 kind: BuildConfig From 68344c056454665e8986c35a980db42341d4e833 Mon Sep 17 00:00:00 2001 From: dsevosty Date: Sun, 11 Jun 2023 08:09:43 +0000 Subject: [PATCH 22/22] always rebuild the resulting image since the included might have changed --- buildconfigs/20-artifacts.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/buildconfigs/20-artifacts.yaml b/buildconfigs/20-artifacts.yaml index 9865e23..595bd14 100644 --- a/buildconfigs/20-artifacts.yaml +++ b/buildconfigs/20-artifacts.yaml @@ -5,6 +5,7 @@ metadata: labels: builder-replacement: skip change-build-arg-tags: "true" + meta-for: installer resources-profile: low skip-release-branch: "true" skip-replace-cli: "true"