Skip to content

Commit

Permalink
📂 Update openshift specific files.
Browse files Browse the repository at this point in the history
  • Loading branch information
alanfx committed Mar 2, 2020
1 parent b95f40e commit 3faaa1f
Show file tree
Hide file tree
Showing 15 changed files with 589 additions and 8 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM rhel8/go-toolset:1.12.8 AS builder
WORKDIR /opt/app-root/src/go/src/github.com/knative/client
USER root
COPY . .
RUN TAG="v0.10.0" make build

FROM ubi8:8-released
COPY --from=builder /opt/app-root/src/go/src/github.com/knative/client/kn /ko-app/kn

LABEL \
com.redhat.component="openshift-serverless-1-tech-preview-client-kn-rhel8-container" \
name="openshift-serverless-1-tech-preview/client-kn-rhel8" \
version="0.10.0" \
summary="Red Hat OpenShift Serverless 1 kn CLI" \
description="CLI client 'kn' for managing Red Hat OpenShift Serverless 1" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 kn CLI" \
io.k8s.description="CLI client 'kn' for managing Red Hat OpenShift Serverless 1" \
io.openshift.build.source-location="https://github.com/openshift/knative-client" \
maintainer="[email protected]"

ENTRYPOINT ["/ko-app/kn"]
43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#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=0
GOOS=linux

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

build:
./hack/build.sh -f
.PHONY: build

build-cross:
./hack/build.sh -x
.PHONY: build-cross

test-unit:
./hack/build.sh -t
.PHONY: test-unit

test-e2e:
./openshift/e2e-tests-openshift.sh
.PHONY: test-e2e

# Generates a ci-operator configuration for a specific branch.
generate-ci-config:
./openshift/ci-operator/generate-ci-config.sh $(BRANCH) > ci-operator-config.yaml
.PHONY: generate-ci-config
14 changes: 6 additions & 8 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# The OWNERS file is used by prow to automatically merge approved PRs.

approvers:
- sixolet
- cppforlife
- rhuss
- maximilien
- navidshaikh
# TOC members as a fallback
- mattmoor
- evankanderson
- knative-client-approvers

reviewers:
- knative-client-reviewers
17 changes: 17 additions & 0 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
aliases:
knative-client-approvers:
- alanfx
- bbrowning
- markusthoemmes
- vdemeester
- matzew
- rhuss
- navidshaikh
knative-client-reviewers:
- alanfx
- bbrowning
- markusthoemmes
- vdemeester
- matzew
- rhuss
- navidshaikh
8 changes: 8 additions & 0 deletions container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
go:
modules:
- module: github.com/knative/client
image_build_method: imagebuilder
platforms:
only:
- x86_64
20 changes: 20 additions & 0 deletions content_sets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file is managed by the OpenShift Image Tool: https://github.com/openshift/enterprise-images,
# by the OpenShift Continuous Delivery team (#aos-art on CoreOS Slack).
# Any manual changes will be overwritten by OIT on the next build.
#
# This is a file defining which content sets (yum repositories) are needed to
# update content in this image. Data provided here helps determine which images
# are vulnerable to specific CVEs. Generally you should only need to update this
# file when:
# 1. You start depending on a new product
# 2. You are preparing new product release and your content sets will change
#
# See https://mojo.redhat.com/docs/DOC-1023066 for more information on
# maintaining this file and the format and examples
#
# You should have one top level item for each architecture being built. Most
# likely this will be x86_64 and ppc64le initially.
---
x86_64:
- rhel-8-for-x86_64-baseos-rpms
- rhel-8-for-x86_64-appstream-rpms
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 openshift/origin-release:golang-1.13

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

RUN yum install -y kubectl ansible

# Allow runtime users to add entries to /etc/passwd
RUN chmod g+rw /etc/passwd
7 changes: 7 additions & 0 deletions openshift/ci-operator/build-image/kubernetes.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
49 changes: 49 additions & 0 deletions openshift/ci-operator/generate-ci-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/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.

branch=${1-'master'}

cat <<EOF
tag_specification:
name: '4.1'
namespace: ocp
promotion:
cluster: https://api.ci.openshift.org
namespace: openshift
name: $branch
base_images:
base:
name: '4.0'
namespace: ocp
tag: base
build_root:
project_image:
dockerfile_path: openshift/ci-operator/build-image/Dockerfile
canonical_go_repository: github.com/knative/client
binary_build_commands: make build
tests:
- as: e2e
commands: "make test-e2e"
openshift_installer_src:
cluster_profile: aws
resources:
'*':
limits:
memory: 4Gi
requests:
cpu: 100m
memory: 200Mi
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 3faaa1f

Please sign in to comment.