Skip to content

Commit

Permalink
Merge pull request #37 from aleskandro/build-configs-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vrutkovs authored May 2, 2023
2 parents c4a34dc + 95fb3e0 commit a1c1361
Show file tree
Hide file tree
Showing 19 changed files with 74 additions and 186 deletions.
3 changes: 3 additions & 0 deletions buildconfigs/03-forked-dockerfiles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: forked-dockerfiles
labels:
skip-release-branch: "true"
skip-replace-cli: "true"
spec:
source:
type: Git
Expand Down
6 changes: 4 additions & 2 deletions buildconfigs/04-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ metadata:
name: builder
labels:
builder-replacement: skip
skip-release-branch: "true"
skip-replace-cli: "true"
spec:
source:
type: Git
git:
uri: 'https://github.com/okd-project/images'
ref: main
contextDir: .
contextDir: builder
images: []
strategy:
type: Docker
dockerStrategy:
imageOptimizationPolicy: SkipLayers
dockerfilePath: okd-builder.Dockerfile
dockerfilePath: Dockerfile
from:
kind: "ImageStreamTag"
name: "tools:centos9"
Expand Down
21 changes: 9 additions & 12 deletions buildconfigs/05-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,26 @@ apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: base
labels:
# TODO: do we need branch cut for this?
skip-release-branch: "true"
skip-replace-cli: "true"
spec:
source:
type: Git
git:
uri: 'https://github.com/openshift/images'
ref: release-4.12
uri: 'https://github.com/okd-project/images'
ref: main
contextDir: base
images:
- from:
kind: ImageStreamTag
name: 'release:forked-dockerfiles'
paths:
- sourcePath: /code/base/Dockerfile.centos9
destinationDir: "./base"
images: []
strategy:
type: Docker
dockerStrategy:
imageOptimizationPolicy: SkipLayers
dockerfilePath: Dockerfile.centos9
dockerfilePath: Dockerfile
from:
kind: "ImageStreamTag"
name: "release:builder"

name: "tools:centos9"
output:
to:
kind: ImageStreamTag
Expand Down
2 changes: 2 additions & 0 deletions buildconfigs/10-cli.yaml → buildconfigs/06-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: cli
labels:
skip-replace-cli: "true"
spec:
source:
type: Git
Expand Down
2 changes: 2 additions & 0 deletions buildconfigs/10-branding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: branding
labels:
skip-release-branch: "true"
spec:
source:
type: Git
Expand Down
2 changes: 2 additions & 0 deletions buildconfigs/10-cloud-credential-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: cloud-credential-operator
labels:
resources-profile: high
spec:
source:
type: Git
Expand Down
2 changes: 2 additions & 0 deletions buildconfigs/10-console.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: console
labels:
resources-profile: high
spec:
source:
type: Git
Expand Down
2 changes: 2 additions & 0 deletions buildconfigs/10-etcd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: etcd
labels:
skip-release-branch: "true"
spec:
source:
type: Git
Expand Down
3 changes: 3 additions & 0 deletions buildconfigs/10-machine-config-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ spec:
dockerStrategy:
imageOptimizationPolicy: SkipLayers
dockerfilePath: Dockerfile
buildArgs:
- name: "TAGS"
value: "okd"
from:
kind: "ImageStreamTag"
name: "release:base"
Expand Down
13 changes: 5 additions & 8 deletions buildconfigs/10-sdn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,18 @@ spec:
uri: 'https://github.com/openshift/sdn'
ref: release-4.12
contextDir: .
images:
- from:
kind: ImageStreamTag
name: 'release:forked-dockerfiles'
paths:
- sourcePath: /code/sdn/Dockerfile.centos9
destinationDir: "./images/sdn"
images: []
strategy:
type: Docker
dockerStrategy:
imageOptimizationPolicy: SkipLayers
dockerfilePath: images/sdn/Dockerfile.centos9
dockerfilePath: images/sdn/Dockerfile.rhel
from:
kind: "ImageStreamTag"
name: "release:base"
buildArgs:
- name: ovsver
value: "2.17"
output:
to:
kind: ImageStreamTag
Expand Down
2 changes: 2 additions & 0 deletions buildconfigs/20-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: artifacts
labels:
skip-release-branch: "true"
spec:
source:
contextDir: .
Expand Down
6 changes: 3 additions & 3 deletions buildconfigs/20-ovn-kubernetes-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ spec:
type: Docker
dockerStrategy:
imageOptimizationPolicy: SkipLayers
dockerfilePath: Dockerfile.base
dockerfilePath: Dockerfile.base.rhel9
from:
kind: "ImageStreamTag"
name: "release:base"
buildArgs:
- name: ovsver
value: 2.17.0-31.el9s
value: 3.1.0-17.el9s
- name: ovnver
value: 22.06.0-16.el9s
value: 22.03.0-22.el9s
output:
to:
kind: ImageStreamTag
Expand Down
2 changes: 1 addition & 1 deletion buildconfigs/30-network-tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
kind: ImageStreamTag
name: 'release:ovn-kubernetes'
as:
- 'registry.ci.openshift.org/ocp/4.12:ovn-kubernetes'
- registry.ci.openshift.org/ocp/4.13:ovn-kubernetes-rhel-9
strategy:
type: Docker
dockerStrategy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,15 @@ spec:
uri: 'https://github.com/openshift/ovn-kubernetes'
ref: release-4.12
contextDir: .
images:
- from:
kind: ImageStreamTag
name: 'release:forked-dockerfiles'
paths:
- sourcePath: /code/ovn-kubernetes/Dockerfile.centos9
destinationDir: "."
images: []
strategy:
type: Docker
dockerStrategy:
imageOptimizationPolicy: SkipLayers
dockerfilePath: Dockerfile.centos9
dockerfilePath: Dockerfile.rhel9
from:
kind: "ImageStreamTag"
name: "release:base"
name: "release:ovn-kubernetes-base"
output:
to:
kind: ImageStreamTag
Expand Down
33 changes: 30 additions & 3 deletions buildconfigs/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ kind: Kustomization
namespace: okd

patches:
- patch: |-
- op: replace
path: "/spec/source/git/ref"
value: release-4.13
target:
kind: BuildConfig
labelSelector: "skip-release-branch!=true"
- patch: |-
- op: replace
path: "/spec/source/git/ref"
value: openshift-4.13
target:
kind: BuildConfig
name: etcd
# 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.
Expand All @@ -15,15 +29,27 @@ patches:
kind: "ImageStreamTag"
name: "release:builder"
as:
- 'registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.20-openshift-4.13'
- 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.20-openshift-4.13'
- 'registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.19-openshift-4.13'
- 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.13'
- 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.12'
- 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.18-openshift-4.12'
- 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.18-openshift-4.11'
- 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.17-openshift-4.11'
- 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.17-openshift-4.10'
- 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.10'
- 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.9'
- 'registry.ci.openshift.org/ocp/builder:rhel-8-base-nodejs-openshift-4.13'
- 'registry.ci.openshift.org/ocp/builder:rhel-8-etcd-golang-1.16'
- 'registry.ci.openshift.org/openshift/release:golang-1.17'
- 'registry.ci.openshift.org/openshift/release:golang-1.18'
- 'registry.ci.openshift.org/openshift/release:golang-1.19'
- 'registry.ci.openshift.org/openshift/release:golang-1.20'
target:
kind: BuildConfig
labelSelector: "builder-replacement!=skip"
- patch: |-
- op: add
path: "/spec/source/images/-"
value:
Expand All @@ -33,9 +59,10 @@ patches:
as:
- 'registry.ci.openshift.org/ocp/4.11:cli'
- 'registry.ci.openshift.org/ocp/4.12:cli'
- 'registry.ci.openshift.org/ocp/4.13:cli'
target:
kind: BuildConfig
labelSelector: "builder-replacement!=skip"
labelSelector: "skip-replace-cli!=true"
# TODO: tune resources req/lim
- patch: |-
- op: add
Expand Down Expand Up @@ -82,6 +109,7 @@ resources:
- 03-forked-dockerfiles.yaml
- 04-builder.yaml
- 05-base.yaml
- 06-cli.yaml
- 10-agent-installer-node-agent.yaml
- 10-agent-installer-orchestrator.yaml
- 10-alibaba-cloud-controller-manager.yaml
Expand Down Expand Up @@ -109,7 +137,6 @@ resources:
- 10-baremetal-runtimecfg.yaml
- 10-branding.yaml
- 10-cli-artifacts.yaml
- 10-cli.yaml
- 10-cloud-credential-operator.yaml
- 10-cloud-network-config-controller.yaml
- 10-cluster-authentication-operator.yaml
Expand Down Expand Up @@ -257,12 +284,12 @@ resources:
- 20-deployer.yaml
- 20-haproxy-router.yaml
- 20-machine-os-images.yaml
- 20-ovn-kubernetes.yaml
- 20-ovn-kubernetes-base.yaml
- 20-tools.yaml
- 30-fedora-coreos.yaml
- 30-network-tools.yaml
- 30-ovn-kubernetes-microshift.yaml
- 30-ovn-kubernetes.yaml
- 30-tests.yaml
- failing-20-kuryr-cni-base.yaml
- failing-20-kuryr-cni.yaml
Expand Down
20 changes: 0 additions & 20 deletions forks/base/Dockerfile.centos9

This file was deleted.

Loading

0 comments on commit a1c1361

Please sign in to comment.