Skip to content

Commit b178630

Browse files
committed
📂 Update openshift specific files.
1 parent 95d0ef6 commit b178630

24 files changed

+956
-126
lines changed

Makefile

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#This makefile is used by ci-operator
2+
3+
# Copyright 2019 The OpenShift Knative Authors
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
CGO_ENABLED=1
18+
GOOS ?=
19+
GOARCH ?=
20+
TEST_IMAGES=./test/test_images/helloworld knative.dev/serving/test/test_images/grpc-ping knative.dev/serving/test/test_images/multicontainer/servingcontainer knative.dev/serving/test/test_images/multicontainer/sidecarcontainer
21+
TEST=
22+
TEST_IMAGE_TAG ?= latest
23+
24+
install: build
25+
cp ./kn $(GOPATH)/bin
26+
.PHONY: install
27+
28+
build:
29+
GOFLAGS='' ./hack/build.sh -f
30+
.PHONY: build
31+
32+
build-with-platform:
33+
./hack/build.sh -p $(GOOS) $(GOARCH)
34+
.PHONY: build-with-platform
35+
36+
build-cross:
37+
GOFLAGS='' ./hack/build.sh -x
38+
.PHONY: build-cross
39+
40+
build-cross-package: build-cross
41+
GOFLAGS='' ./package_cliartifacts.sh
42+
.PHONY: build-cross-package
43+
44+
test-install:
45+
GOFLAGS='' go install $(TEST_IMAGES)
46+
.PHONY: test-install
47+
48+
test-images:
49+
for img in $(TEST_IMAGES); do \
50+
KO_DOCKER_REPO=$(DOCKER_REPO_OVERRIDE) ko build --tags=$(TEST_IMAGE_TAG) $(KO_FLAGS) -B $$img ; \
51+
done
52+
.PHONY: test-images
53+
54+
test-unit:
55+
GOFLAGS='' ./hack/build.sh -t
56+
.PHONY: test-unit
57+
58+
test-e2e:
59+
GOFLAGS='' ./openshift/e2e-tests-openshift.sh
60+
.PHONY: test-e2e
61+
62+
# Run make DOCKER_REPO_OVERRIDE=<your_repo> test-e2e-local if test images are available
63+
# in the given repository. Make sure you first build and push them there by running `make test-images`.
64+
# Run make BRANCH=<ci_promotion_name> test-e2e-local if test images from the latest CI
65+
# build for this branch should be used. Example: `make BRANCH=knative-v0.17.2 test-e2e-local`.
66+
# If neither DOCKER_REPO_OVERRIDE nor BRANCH are defined the tests will use test images
67+
# from the last nightly build.
68+
# If TEST is defined then only the single test will be run.
69+
test-e2e-local:
70+
./openshift/e2e-tests-local.sh $(TEST)
71+
.PHONY: test-e2e-local
72+
73+
# Generate an aggregated knative release yaml file, as well as a CI file with replaced image references
74+
generate-release:
75+
./openshift/generate.sh
76+
.PHONY: generate-release

OWNERS

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1+
# The OWNERS file is used by prow to automatically merge approved PRs.
2+
3+
# DO NOT EDIT! File generated via https://github.com/openshift-knative/hack/tree/main/config.
4+
15
approvers:
2-
- client-writers
3-
- technical-oversight-committee
4-
- knative-release-leads
6+
- creydr
7+
- dsimansk
8+
- Kaustubh-pande
9+
- maschmid
10+
- mvinkler
11+
- rudyredhat1
12+
513
reviewers:
6-
- client-reviewers
14+
- dsimansk
15+
- Kaustubh-pande
16+
- rudyredhat1

OWNERS_ALIASES

Lines changed: 8 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,126 +1,12 @@
1-
# This file is auto-generated from peribolos.
2-
# Do not modify this file, instead modify peribolos/knative.yaml
3-
41
aliases:
5-
client-reviewers: []
6-
client-wg-leads:
2+
knative-client-approvers:
73
- dsimansk
8-
client-writers:
9-
- dsimansk
10-
docs-reviewers:
11-
- nainaz
12-
- skonto
13-
docs-writers:
14-
- skonto
15-
eventing-reviewers:
16-
- Leo6Leo
17-
- aslom
18-
- cali0707
19-
- creydr
20-
eventing-wg-leads:
21-
- creydr
22-
- pierDipi
23-
eventing-writers:
24-
- Leo6Leo
25-
- aliok
26-
- cali0707
27-
- creydr
28-
- matzew
29-
- pierDipi
30-
func-reviewers:
31-
- jrangelramos
32-
- nainaz
33-
func-writers:
34-
- gauron99
35-
- jrangelramos
36-
- lkingland
37-
- matejvasek
38-
- matzew
39-
- salaboy
40-
functions-wg-leads:
41-
- lkingland
42-
- salaboy
43-
knative-admin:
44-
- aliok
45-
- arsenetar
46-
- cardil
47-
- dprotaso
48-
- dsimansk
49-
- evankanderson
50-
- gauron99
51-
- knative-automation
52-
- knative-prow-releaser-robot
53-
- knative-prow-robot
54-
- knative-prow-updater-robot
55-
- knative-test-reporter-robot
56-
- matzew
57-
- skonto
58-
- upodroid
59-
knative-release-leads:
60-
- dprotaso
61-
- dsimansk
62-
- gauron99
63-
- skonto
64-
knative-robots:
65-
- knative-automation
66-
- knative-prow-releaser-robot
67-
- knative-prow-robot
68-
- knative-prow-updater-robot
69-
- knative-test-reporter-robot
70-
operations-reviewers:
71-
- aliok
72-
- houshengbo
73-
- matzew
74-
operations-wg-leads:
75-
- houshengbo
76-
operations-writers:
77-
- aliok
78-
- houshengbo
79-
- matzew
80-
productivity-leads:
81-
- cardil
82-
- upodroid
83-
productivity-reviewers:
84-
- evankanderson
4+
- Kaustubh-pande
855
- mgencur
86-
productivity-wg-leads:
87-
- cardil
88-
- upodroid
89-
productivity-writers:
90-
- cardil
91-
- upodroid
92-
security-wg-leads:
93-
- davidhadas
94-
- evankanderson
95-
security-writers:
96-
- davidhadas
97-
- evankanderson
98-
serving-approvers:
99-
- dsimansk
100-
- skonto
101-
serving-reviewers:
102-
- skonto
103-
serving-triage:
104-
- skonto
105-
serving-wg-leads:
106-
- dprotaso
107-
serving-writers:
108-
- dprotaso
6+
- pierdipi
7+
- creydr
8+
- rudyredhat1
9+
knative-client-reviewers:
10910
- dsimansk
110-
- skonto
111-
steering-committee:
112-
- aliok
113-
- arsenetar
114-
- dprotaso
115-
- evankanderson
116-
- matzew
117-
ux-wg-leads:
118-
- Leo6Leo
119-
- cali0707
120-
- mmejia02
121-
- zainabhusain227
122-
ux-writers:
123-
- Leo6Leo
124-
- cali0707
125-
- mmejia02
126-
- zainabhusain227
11+
- Kaustubh-pande
12+
- rudyredhat1
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# DO NOT EDIT! Generated Dockerfile.
2+
3+
FROM registry.ci.openshift.org/ocp/4.17:cli-artifacts as tools
4+
5+
# Dockerfile to bootstrap build and test in openshift-ci
6+
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.23-openshift-4.19 as builder
7+
8+
ARG TARGETARCH
9+
10+
COPY --from=tools /usr/share/openshift/linux_$TARGETARCH/oc.rhel8 /usr/bin/oc
11+
12+
RUN ln -s /usr/bin/oc /usr/bin/kubectl
13+
14+
RUN yum install -y httpd-tools
15+
16+
RUN wget https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && \
17+
chmod 700 ./get-helm-3
18+
19+
RUN ./get-helm-3 --version v3.11.3 --no-sudo && helm version
20+
21+
RUN GOFLAGS='' go install github.com/mikefarah/yq/v3@latest
22+
RUN GOFLAGS='' go install -tags="exclude_graphdriver_btrfs containers_image_openpgp" github.com/containers/skopeo/cmd/[email protected]
23+
24+
# go install creates $GOPATH/.cache with root permissions, we delete it here
25+
# to avoid permission issues with the runtime users
26+
RUN rm -rf $GOPATH/.cache
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[kubernetes]
2+
name=Kubernetes
3+
baseurl=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/
4+
enabled=1
5+
gpgcheck=1
6+
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/repodata/repomd.xml.key
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
#!/bin/bash
2+
3+
# Copyright 2019 The OpenShift Knative Authors
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
if [ -n "$1" ]; then
18+
# Use provided branch value
19+
branch=$1
20+
else
21+
# Use current branch otherwise
22+
branch=$(git rev-parse --abbrev-ref HEAD)
23+
fi
24+
version=$(echo ${branch} | cut -d '-' -f 2)
25+
tag=${version:-'main'}
26+
promotion=${branch/release/knative}
27+
28+
cat <<EOF
29+
base_images:
30+
base:
31+
name: ubi-minimal
32+
namespace: ocp
33+
tag: "8"
34+
binary_build_commands: |
35+
TAG=${tag} make install
36+
TAG=${tag} make build-cross
37+
build_root:
38+
project_image:
39+
dockerfile_path: openshift/ci-operator/build-image/Dockerfile
40+
canonical_go_repository: github.com/knative/client
41+
images:
42+
- dockerfile_path: openshift/ci-operator/knative-images/client/Dockerfile
43+
from: base
44+
inputs:
45+
bin:
46+
paths:
47+
- destination_dir: .
48+
source_path: /go/bin/kn
49+
to: knative-client
50+
- dockerfile_path: openshift/ci-operator/knative-images/client/Dockerfile.cliartifacts
51+
inputs:
52+
bin:
53+
paths:
54+
- destination_dir: .
55+
source_path: /go/src/github.com/knative/client/kn-linux-amd64
56+
- destination_dir: .
57+
source_path: /go/src/github.com/knative/client/kn-linux-arm64
58+
- destination_dir: .
59+
source_path: /go/src/github.com/knative/client/kn-linux-ppc64le
60+
- destination_dir: .
61+
source_path: /go/src/github.com/knative/client/kn-linux-s390x
62+
- destination_dir: .
63+
source_path: /go/src/github.com/knative/client/kn-darwin-amd64
64+
- destination_dir: .
65+
source_path: /go/src/github.com/knative/client/kn-windows-amd64.exe
66+
- destination_dir: .
67+
source_path: /go/src/github.com/knative/client/LICENSE
68+
- destination_dir: .
69+
source_path: /go/src/github.com/knative/client/package_cliartifacts.sh
70+
to: kn-cli-artifacts
71+
- dockerfile_path: openshift/ci-operator/knative-test-images/helloworld/Dockerfile
72+
from: base
73+
inputs:
74+
test-bin:
75+
paths:
76+
- destination_dir: .
77+
source_path: /go/bin/helloworld
78+
to: knative-client-test-helloworld
79+
promotion:
80+
name: $promotion
81+
namespace: openshift
82+
resources:
83+
'*':
84+
requests:
85+
memory: 2Gi
86+
tag_specification:
87+
name: "4.5"
88+
namespace: ocp
89+
test_binary_build_commands: make test-install
90+
tests:
91+
- as: e2e-aws-ocp-45
92+
steps:
93+
cluster_profile: aws
94+
test:
95+
- as: test
96+
cli: latest
97+
commands: make test-e2e
98+
from: src
99+
resources:
100+
requests:
101+
cpu: 100m
102+
memory: 200Mi
103+
workflow: ipi-aws
104+
EOF
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
2+
USER 65532
3+
4+
ADD kn /ko-app/kn
5+
ENTRYPOINT ["/ko-app/kn"]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM registry.ci.openshift.org/ocp/ubi-minimal:8 AS packager
2+
WORKDIR /opt/app-root/src/go/src/github.com/knative/client
3+
4+
ADD package_cliartifacts.sh LICENSE kn-*-* ./
5+
RUN microdnf install -y zip tar gzip && \
6+
bash package_cliartifacts.sh
7+
8+
FROM registry.ci.openshift.org/ocp/ubi-minimal:8
9+
WORKDIR /opt/app-root/src/go/src/github.com/knative/client
10+
RUN mkdir -p /usr/share/kn/{linux_amd64,linux_arm64,linux_ppc64le,linux_s390x,macos_amd64,macos_arm64,windows}
11+
12+
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-linux-amd64.tar.gz /usr/share/kn/linux_amd64/
13+
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-linux-arm64.tar.gz /usr/share/kn/linux_arm64/
14+
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-linux-ppc64le.tar.gz /usr/share/kn/linux_ppc64le/
15+
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-linux-s390x.tar.gz /usr/share/kn/linux_s390x/
16+
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-macos-amd64.tar.gz /usr/share/kn/macos_amd64/
17+
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-macos-arm64.tar.gz /usr/share/kn/macos_arm64/
18+
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-windows-amd64.zip /usr/share/kn/windows/
19+
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/LICENSE /usr/share/kn/LICENSE

0 commit comments

Comments
 (0)