Skip to content

Commit b9a258e

Browse files
committed
📂 Update openshift specific files.
1 parent 4ca378f commit b9a258e

24 files changed

+946
-129
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: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
# The OWNERS file is used by prow to automatically merge approved PRs.
2+
13
approvers:
2-
- client-writers
3-
- technical-oversight-committee
4-
- knative-release-leads
4+
- knative-client-approvers
5+
56
reviewers:
6-
- client-reviewers
7+
- knative-client-reviewers

OWNERS_ALIASES

Lines changed: 7 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +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-
- itsmurugappan
7-
client-wg-leads:
2+
knative-client-approvers:
83
- dsimansk
94
- rhuss
10-
client-writers:
11-
- dsimansk
12-
- rhuss
13-
- vyasgun
14-
docs-reviewers:
15-
- nainaz
16-
- skonto
17-
docs-writers:
18-
- csantanapr
19-
- skonto
20-
eventing-reviewers:
21-
- Leo6Leo
22-
- aslom
23-
- cali0707
24-
- creydr
25-
eventing-wg-leads:
26-
- pierDipi
27-
eventing-writers:
28-
- Leo6Leo
29-
- aliok
30-
- cali0707
31-
- creydr
32-
- lionelvillard
33-
- matzew
34-
- pierDipi
35-
func-reviewers:
36-
- jrangelramos
37-
- nainaz
38-
func-writers:
39-
- gauron99
40-
- jrangelramos
41-
- lance
42-
- lkingland
43-
- matejvasek
44-
- matzew
45-
- salaboy
46-
functions-wg-leads:
47-
- lkingland
48-
- salaboy
49-
knative-admin:
50-
- aliok
51-
- cardil
52-
- dprotaso
53-
- dsimansk
54-
- evankanderson
55-
- knative-automation
56-
- knative-prow-releaser-robot
57-
- knative-prow-robot
58-
- knative-prow-updater-robot
59-
- knative-test-reporter-robot
60-
- matzew
61-
- nrrso
62-
- skonto
63-
- upodroid
64-
knative-release-leads:
65-
- dprotaso
66-
- dsimansk
67-
- skonto
68-
knative-robots:
69-
- knative-automation
70-
- knative-prow-releaser-robot
71-
- knative-prow-robot
72-
- knative-prow-updater-robot
73-
- knative-test-reporter-robot
74-
operations-reviewers:
75-
- aliok
76-
- houshengbo
77-
- matzew
78-
operations-wg-leads:
79-
- houshengbo
80-
operations-writers:
81-
- aliok
82-
- houshengbo
83-
- matzew
84-
productivity-leads:
85-
- cardil
86-
- upodroid
87-
productivity-reviewers:
88-
- evankanderson
5+
- Kaustubh-pande
896
- mgencur
90-
productivity-wg-leads:
91-
- cardil
92-
- upodroid
93-
productivity-writers:
94-
- cardil
95-
- upodroid
96-
security-wg-leads:
97-
- davidhadas
98-
- evankanderson
99-
security-writers:
100-
- davidhadas
101-
- evankanderson
102-
serving-approvers:
103-
- dsimansk
104-
- skonto
105-
serving-reviewers:
106-
- skonto
107-
serving-triage:
108-
- skonto
109-
serving-wg-leads:
110-
- dprotaso
111-
serving-writers:
112-
- dprotaso
7+
- pierdipi
8+
- creydr
9+
knative-client-reviewers:
11310
- dsimansk
114-
- skonto
115-
steering-committee:
116-
- aliok
117-
- dprotaso
118-
- evankanderson
119-
- matzew
120-
- nrrso
121-
ux-wg-leads:
122-
- cali0707
123-
- leo6leo
124-
- mmejia02
125-
- zainabhusain227
126-
ux-writers:
127-
- cali0707
128-
- leo6leo
129-
- mmejia02
130-
- zainabhusain227
11+
- rhuss
12+
- Kaustubh-pande
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
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM openshift/origin-base
2+
USER 65532
3+
4+
ADD grpc-ping /ko-app/grpc-ping
5+
6+
ENTRYPOINT ["/ko-app/grpc-ping"]

0 commit comments

Comments
 (0)