Skip to content

Commit

Permalink
📂 Update openshift specific files.
Browse files Browse the repository at this point in the history
  • Loading branch information
serverless-qe committed Jan 26, 2025
1 parent e5ee272 commit 2f69a2d
Show file tree
Hide file tree
Showing 24 changed files with 945 additions and 141 deletions.
76 changes: 76 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#This makefile is used by ci-operator

# Copyright 2019 The OpenShift Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

CGO_ENABLED=1
GOOS ?=
GOARCH ?=
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
TEST=
TEST_IMAGE_TAG ?= latest

install: build
cp ./kn $(GOPATH)/bin
.PHONY: install

build:
GOFLAGS='' ./hack/build.sh -f
.PHONY: build

build-with-platform:
./hack/build.sh -p $(GOOS) $(GOARCH)
.PHONY: build-with-platform

build-cross:
GOFLAGS='' ./hack/build.sh -x
.PHONY: build-cross

build-cross-package: build-cross
GOFLAGS='' ./package_cliartifacts.sh
.PHONY: build-cross-package

test-install:
GOFLAGS='' go install $(TEST_IMAGES)
.PHONY: test-install

test-images:
for img in $(TEST_IMAGES); do \
KO_DOCKER_REPO=$(DOCKER_REPO_OVERRIDE) ko build --tags=$(TEST_IMAGE_TAG) $(KO_FLAGS) -B $$img ; \
done
.PHONY: test-images

test-unit:
GOFLAGS='' ./hack/build.sh -t
.PHONY: test-unit

test-e2e:
GOFLAGS='' ./openshift/e2e-tests-openshift.sh
.PHONY: test-e2e

# Run make DOCKER_REPO_OVERRIDE=<your_repo> test-e2e-local if test images are available
# in the given repository. Make sure you first build and push them there by running `make test-images`.
# Run make BRANCH=<ci_promotion_name> test-e2e-local if test images from the latest CI
# build for this branch should be used. Example: `make BRANCH=knative-v0.17.2 test-e2e-local`.
# If neither DOCKER_REPO_OVERRIDE nor BRANCH are defined the tests will use test images
# from the last nightly build.
# If TEST is defined then only the single test will be run.
test-e2e-local:
./openshift/e2e-tests-local.sh $(TEST)
.PHONY: test-e2e-local

# Generate an aggregated knative release yaml file, as well as a CI file with replaced image references
generate-release:
./openshift/generate.sh
.PHONY: generate-release
9 changes: 5 additions & 4 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# The OWNERS file is used by prow to automatically merge approved PRs.

approvers:
- client-writers
- technical-oversight-committee
- knative-release-leads
- knative-client-approvers

reviewers:
- client-reviewers
- knative-client-reviewers
144 changes: 7 additions & 137 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
@@ -1,142 +1,12 @@
# This file is auto-generated from peribolos.
# Do not modify this file, instead modify peribolos/knative.yaml

aliases:
client-reviewers:
- itsmurugappan
client-wg-leads:
knative-client-approvers:
- dsimansk
- rhuss
client-writers:
- dsimansk
- rhuss
- vyasgun
docs-reviewers:
- nainaz
- skonto
docs-writers:
- csantanapr
- skonto
eventing-reviewers:
- Leo6Leo
- aslom
- cali0707
- creydr
eventing-wg-leads:
- pierDipi
eventing-writers:
- Leo6Leo
- aliok
- cali0707
- creydr
- lionelvillard
- matzew
- pierDipi
func-reviewers:
- jrangelramos
- nainaz
func-writers:
- gauron99
- jrangelramos
- lance
- lkingland
- matejvasek
- matzew
- salaboy
functions-wg-leads:
- lkingland
- salaboy
knative-admin:
- aliok
- cardil
- davidhadas
- dprotaso
- dsimansk
- evankanderson
- knative-automation
- knative-prow-releaser-robot
- knative-prow-robot
- knative-prow-updater-robot
- knative-test-reporter-robot
- nainaz
- psschwei
- salaboy
- skonto
- upodroid
knative-release-leads:
- dprotaso
- dsimansk
- skonto
knative-robots:
- knative-automation
- knative-prow-releaser-robot
- knative-prow-robot
- knative-prow-updater-robot
- knative-test-reporter-robot
operations-reviewers:
- aliok
- houshengbo
- matzew
operations-wg-leads:
- houshengbo
operations-writers:
- aliok
- houshengbo
- matzew
productivity-leads:
- cardil
- upodroid
productivity-reviewers:
- evankanderson
- Kaustubh-pande
- mgencur
productivity-wg-leads:
- cardil
- upodroid
productivity-writers:
- cardil
- upodroid
security-wg-leads:
- davidhadas
- evankanderson
security-writers:
- davidhadas
- evankanderson
serving-approvers:
- skonto
serving-reviewers:
- skonto
serving-triage:
- skonto
serving-wg-leads:
- dprotaso
serving-writers:
- dprotaso
- skonto
steering-committee:
- aliok
- davidhadas
- dprotaso
- dsimansk
- evankanderson
- nainaz
- psschwei
- salaboy
technical-oversight-committee:
- aliok
- davidhadas
- dprotaso
- pierdipi
- creydr
knative-client-reviewers:
- dsimansk
- evankanderson
- nainaz
- psschwei
- salaboy
ux-wg-leads:
- cali0707
- leo6leo
- mmejia02
- zainabhusain227
ux-writers:
- cali0707
- leo6leo
- mmejia02
- zainabhusain227
- rhuss
- Kaustubh-pande
24 changes: 24 additions & 0 deletions openshift/ci-operator/build-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2019 The OpenShift Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Dockerfile to bootstrap build and test in openshift-ci
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder

# Add kubernetes repository
ADD openshift/ci-operator/build-image/kubernetes.repo /etc/yum.repos.d/

RUN yum install -y kubectl httpd-tools

# Allow runtime users to add entries to /etc/passwd
RUN chmod g+rw /etc/passwd
6 changes: 6 additions & 0 deletions openshift/ci-operator/build-image/kubernetes.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[kubernetes]
name=Kubernetes
baseurl=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/
enabled=1
gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/repodata/repomd.xml.key
104 changes: 104 additions & 0 deletions openshift/ci-operator/generate-ci-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#!/bin/bash

# Copyright 2019 The OpenShift Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

if [ -n "$1" ]; then
# Use provided branch value
branch=$1
else
# Use current branch otherwise
branch=$(git rev-parse --abbrev-ref HEAD)
fi
version=$(echo ${branch} | cut -d '-' -f 2)
tag=${version:-'main'}
promotion=${branch/release/knative}

cat <<EOF
base_images:
base:
name: ubi-minimal
namespace: ocp
tag: "8"
binary_build_commands: |
TAG=${tag} make install
TAG=${tag} make build-cross
build_root:
project_image:
dockerfile_path: openshift/ci-operator/build-image/Dockerfile
canonical_go_repository: github.com/knative/client
images:
- dockerfile_path: openshift/ci-operator/knative-images/client/Dockerfile
from: base
inputs:
bin:
paths:
- destination_dir: .
source_path: /go/bin/kn
to: knative-client
- dockerfile_path: openshift/ci-operator/knative-images/client/Dockerfile.cliartifacts
inputs:
bin:
paths:
- destination_dir: .
source_path: /go/src/github.com/knative/client/kn-linux-amd64
- destination_dir: .
source_path: /go/src/github.com/knative/client/kn-linux-arm64
- destination_dir: .
source_path: /go/src/github.com/knative/client/kn-linux-ppc64le
- destination_dir: .
source_path: /go/src/github.com/knative/client/kn-linux-s390x
- destination_dir: .
source_path: /go/src/github.com/knative/client/kn-darwin-amd64
- destination_dir: .
source_path: /go/src/github.com/knative/client/kn-windows-amd64.exe
- destination_dir: .
source_path: /go/src/github.com/knative/client/LICENSE
- destination_dir: .
source_path: /go/src/github.com/knative/client/package_cliartifacts.sh
to: kn-cli-artifacts
- dockerfile_path: openshift/ci-operator/knative-test-images/helloworld/Dockerfile
from: base
inputs:
test-bin:
paths:
- destination_dir: .
source_path: /go/bin/helloworld
to: knative-client-test-helloworld
promotion:
name: $promotion
namespace: openshift
resources:
'*':
requests:
memory: 2Gi
tag_specification:
name: "4.5"
namespace: ocp
test_binary_build_commands: make test-install
tests:
- as: e2e-aws-ocp-45
steps:
cluster_profile: aws
test:
- as: test
cli: latest
commands: make test-e2e
from: src
resources:
requests:
cpu: 100m
memory: 200Mi
workflow: ipi-aws
EOF
5 changes: 5 additions & 0 deletions openshift/ci-operator/knative-images/client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
USER 65532

ADD kn /ko-app/kn
ENTRYPOINT ["/ko-app/kn"]
Loading

0 comments on commit 2f69a2d

Please sign in to comment.