From b05a2aaf116fd4d261b963114b2ede3c7245ecc9 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 11:19:27 +0300 Subject: [PATCH 01/14] Add OpenShift specific scripts Signed-off-by: Ali Ok --- .gitignore | 8 + Makefile | 27 +++ OWNERS | 13 +- OWNERS_ALIASES | 270 +------------------------- README.md | 210 +------------------- RELEASE.md | 2 + openshift/e2e-tests.sh | 16 ++ openshift/generate.sh | 12 ++ openshift/project.yaml | 3 + openshift/release/generate-release.sh | 26 +++ openshift/release/resolve.sh | 31 +++ 11 files changed, 140 insertions(+), 478 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 RELEASE.md create mode 100644 openshift/e2e-tests.sh create mode 100644 openshift/generate.sh create mode 100644 openshift/project.yaml create mode 100644 openshift/release/generate-release.sh create mode 100644 openshift/release/resolve.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..2eab4a88 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +bazel-* +*~ +.idea/ +.vscode/ +.DS_Store +*.swp +*-resolved.yaml + diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..d276d337 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +#This makefile is used by ci-operator + +CGO_ENABLED=0 +GOOS=linux +CORE_IMAGES=$(shell find ./backends/cmd -name main.go | sed 's|/main.go||') +BRANCH= +TEST= +IMAGE= +TEST_IMAGE_TAG ?= latest + +# Guess location of openshift/release repo. NOTE: override this if it is not correct. +OPENSHIFT=${CURDIR}/../../github.com/openshift/release + +install: + for img in $(CORE_IMAGES); do \ + go install $$img ; \ + done +.PHONY: install + +test-e2e: + sh openshift/e2e-tests.sh +.PHONY: test-e2e + +# Generate an aggregated knative release yaml file, as well as a CI file with replaced image references +generate-release: + ./openshift/release/generate-release.sh +.PHONY: generate-release diff --git a/OWNERS b/OWNERS index f3ea797e..e0466c2e 100644 --- a/OWNERS +++ b/OWNERS @@ -1,11 +1,8 @@ -# Sponsored by the Eventing WG -# At least one WG lead from https://github.com/knative/community/blob/main/working-groups/WORKING-GROUPS.md#eventing -# must be in the "approvers" list. +# The OWNERS file is used by prow to automatically merge approved PRs. + approvers: -- technical-oversight-committee -- knative-release-leads -- eventing-writers -- backstage-plugins-writers +- eventing-approvers reviewers: -- backstage-plugins-reviewers +- eventing-reviewers + diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index 7c956c15..584bb908 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -1,275 +1,17 @@ -# This file is auto-generated from peribolos. -# Do not modify this file, instead modify peribolos/knative-extensions.yaml - aliases: - backstage-plugins-reviewers: + eventing-approvers: - aliok - - cali0707 - - leo6leo + - creydr + - matzew - pierdipi - backstage-plugins-writers: - - aliok - - cali0707 + - dsimansky - leo6leo - - pierdipi - client-wg-leads: - - dsimansk - - navidshaikh - - rhuss - client-writers: - - dsimansk - - navidshaikh - - rhuss - discovery-approvers: - - lberk - docs-writers: - - csantanapr - - retocode - - skonto - eventing-autoscaler-keda-approvers: [] - eventing-awssqs-approvers: - - lberk - - matzew - eventing-ceph-approvers: - - lberk - - matzew - eventing-couchdb-approvers: - - lberk - - lionelvillard - - matzew - eventing-github-approvers: - - lberk - - matzew - eventing-gitlab-approvers: - - lberk - - matzew - - sebgoa - eventing-kafka-approvers: - - aliok - - lberk - - matzew - - pierDipi - eventing-kafka-broker-approvers: - - aliok - - matzew - - pierDipi - eventing-kafka-broker-reviewers: - - Leo6Leo - cali0707 - eventing-kafka-writers: [] - eventing-kogito-approvers: - - ricardozanini - eventing-natss-approvers: - - astelmashenko - - dan-j - - zhaojizhuang - eventing-prometheus-approvers: - - lberk - - matzew - eventing-rabbitmq-approvers: - - Zerpet - - ikavgo - - mkuratczyk - eventing-redis-approvers: - - aavarghese - - lionelvillard - - matzew eventing-reviewers: - - Leo6Leo - - cali0707 - - creydr - eventing-wg-leads: - - pierDipi - eventing-writers: - aliok - - cali0707 - creydr - - lionelvillard - matzew - - odacremolbap - - pierDipi - func-tastic-approvers: - - lance - - lkingland - - matejvasek - - nainaz - - salaboy - functastic-writers: - - lance - - lkingland - - matejvasek - - nainaz - - salaboy - function-runtime-approvers: - - lance - - lkingland - - matejvasek - - nainaz - - salaboy - function-runtime-writers: - - lance - - lkingland - - matejvasek - - nainaz - - salaboy - homebrew-kn-plugins-approvers: - - dsimansk - - maximilien - - rhuss - kn-plugin-admin-approvers: - - maximilien - - navidshaikh - - rhuss - - zhanggbj - kn-plugin-diag-approvers: - - cdlliuy - - maximilien - - navidshaikh - kn-plugin-event-approvers: - - cardil - - rhuss - kn-plugin-migration-approvers: - - maximilien - kn-plugin-operator-approvers: - - dsimansk - - houshengbo - - maximilien - - rhuss - kn-plugin-quickstart-approvers: - - dsimansk - - navidshaikh - - psschwei - - rhuss - kn-plugin-sample-approvers: - - maximilien - - navidshaikh - - rhuss - kn-plugin-service-log-approvers: - - rhuss - kn-plugin-source-kafka-approvers: - - daisy-ycguo - - dsimansk - - maximilien - - navidshaikh - - rhuss - kn-plugin-source-kamelet-approvers: - - christophd - - rhuss - knative-admin: - - Cali0707 - - Leo6Leo - - ReToCode - - aliok - - cardil - - creydr - - davidhadas - - dprotaso - - dsimansk - - evankanderson - - knative-automation - - knative-prow-releaser-robot - - knative-prow-robot - - knative-prow-updater-robot - - knative-test-reporter-robot - - krsna-m - - nainaz - - pierDipi - - psschwei - - salaboy - - skonto - - upodroid - knative-release-leads: - - Cali0707 - - Leo6Leo - - ReToCode - - creydr - - dsimansk - - pierDipi - - skonto - knative-robots: - - knative-automation - - knative-prow-releaser-robot - - knative-prow-robot - - knative-prow-updater-robot - - knative-test-reporter-robot - net-certmanager-approvers: [] - net-contour-approvers: - - KauzClay - - dprotaso - net-gateway-api-approvers: - - dprotaso - net-http01-approvers: [] - net-istio-approvers: - - skonto - net-kourier-approvers: - - skonto - operations-wg-leads: - - houshengbo - operations-writers: - - dprotaso - - houshengbo - - upodroid - productivity-leads: - - cardil - - upodroid - productivity-wg-leads: - - cardil - - upodroid - productivity-writers: - - cardil - - krsna-m - - upodroid - security-guard-approvers: - - davidhadas - - maximilien - - psschwei - - rhuss - security-wg-leads: - - davidhadas - - evankanderson - security-writers: - - davidhadas - - evankanderson - serving-approvers: - - psschwei - - skonto - serving-progressive-rollout-approvers: - - alexagriffith - - houshengbo - - sukumargaonkar - - yuzisun - serving-reviewers: - - izabelacg - - retocode - - skonto - serving-triage: - - izabelacg - - retocode - - skonto - serving-wg-leads: - - dprotaso - serving-writers: - - dprotaso - - psschwei - - skonto - steering-committee: - - aliok - - evankanderson - - nainaz - - salaboy - technical-oversight-committee: - - davidhadas - - dprotaso - - dsimansk - - krsna-m - - psschwei - ux-wg-leads: - - cali0707 + - pierdipi + - dsimansky - leo6leo - - mmejia02 - - zainabhusain227 - ux-writers: - cali0707 - - leo6leo - - mmejia02 - - zainabhusain227 diff --git a/README.md b/README.md index 5d24541c..a4a58f79 100644 --- a/README.md +++ b/README.md @@ -1,208 +1,6 @@ -# Knative Backstage Plugins +# Openshift Knative Backstage plugins -This repository contains a set of Backstage plugins for Knative and their respective backends. +This repository holds Openshift's fork of +[`knative-extensions/backstage-plugins`](https://github.com/knative-extensions/backstage-plugins) with additions and +fixes needed only for the OpenShift side of things. -## Installation and usage - -### Event Mesh plugin - -See [Event Mesh plugin README file](./backstage/plugins/knative-event-mesh-backend/README.md) for more information. - -## Development - -### Event Mesh plugin - -The architecture of the plugin is as follows: -``` - Kubernetes Backstage -┌────────────────────┐ ┌───────────────────────────────────────────────┐ -│ │ │ Plugin │ -│ ┌───────────────┐ │ │ ┌─────────────────┐ ┌───────────────┐ │ -│ │ │ │ │ │ │ │ │ │ -│ │ Backend ◄──┼────┐ │ │ ┌─────────────┐ │ │ │ │ -│ │ │ │ │ │ │ │ │ │ │ │ │ -│ └───────┬───────┘ │ └──────┼─┼─┤ Provider ├─┼────────► │ │ -│ │ │ │ │ │ │ │ │ │ │ -│ │ │ │ │ └─────────────┘ │ │ │ │ -│ │ │ │ │ │ │ │ │ -│ ┌───────▼───────┐ │ │ │ │ │ │ │ -│ │ │ │ │ │ ┌────────┼────────┤ Catalog │ │ -│ │ API Server │ │ │ │ │ │ │ │ │ -│ │ │ │ │ │ │ │ │ │ │ -│ └───────────────┘ │ │ │ ┌──────▼──────┐ │ │ │ │ -│ │ │ │ │ │ │ │ │ │ -└────────────────────┘ │ │ │ Processor ├─┼────────► │ │ - │ │ │ │ │ │ │ │ - │ │ └─────────────┘ │ │ │ │ - │ │ │ │ │ │ - │ └─────────────────┘ └───────────────┘ │ - └───────────────────────────────────────────────┘ -``` - -The plugin use providers (and possibly other mechanisms) to communicate with a special backend-for-frontend. - -This backend talks to the Kubernetes API server to get information about the resources in the cluster. - -```mermaid ---- -title: Overall ---- -flowchart TD - Start --> FetchBrokers - FetchBrokers --> ProcessBrokers - ProcessBrokers --> FetchEventTypes - FetchEventTypes --> ProcessEventTypes - ProcessEventTypes --> FetchTriggers - FetchTriggers --> ProcessTriggers -``` - -## Processing the brokers - -```mermaid ---- -title: ProcessBrokers ---- -flowchart LR - GetNextBroker --> CreateDTO -``` - -## Processing the event types - -```mermaid ---- -title: ProcessEventTypes ---- -flowchart TD - GetEventType[Get next event type] - CheckRef{spec.ref exists?} - RefIsABrokerInTheBrokerMap{ref is a broker in the previously
built broker map?} - RegisterEventType[Add event type to broker DTO's `providedEventTypes` list] - DontRegisterEventType[Don't relate the event type to any broker] - Done[Done] - - GetEventType --> CheckRef - CheckRef --> |Yes| RefIsABrokerInTheBrokerMap - RefIsABrokerInTheBrokerMap --> |Yes| RegisterEventType - - CheckRef --> |No| DontRegisterEventType - RefIsABrokerInTheBrokerMap --> |No| DontRegisterEventType - RegisterEventType --> Done - DontRegisterEventType --> Done -``` - -## Processing the triggers - -```mermaid ---- -title: ProcessTriggers ---- -flowchart TD - GetTrigger[Get next trigger] - CheckSubscriberRef{spec.subscriber.ref
exists?} - FetchSubscriberRef[Fetch subscriber resource] - CheckSubscriberLabel{Subscriber has the
Backstage label} - CheckEventType{Trigger has an
event type} - RegisterSingleRelation[Register `ConsumedBy` relation
for eventType and subscriber] - RegisterRelation[Register `ConsumedBy` relation
for eventType and subscriber] - - - Ignore[Ignore trigger] - - Done[Done] - - GetTrigger --> CheckSubscriberRef - CheckSubscriberRef --> |Yes| FetchSubscriberRef - FetchSubscriberRef --> CheckSubscriberLabel - CheckSubscriberLabel --> |Yes| CheckEventType - CheckEventType --> |Yes| RegisterSingleRelation - CheckEventType --> |No| FetchAllEventTypesForBroker - FetchAllEventTypesForBroker --> ForEachEventType --> RegisterRelation - - - RegisterSingleRelation --> Done - RegisterRelation --> Done - - - CheckSubscriberLabel --> |No| Ignore - CheckSubscriberRef --> |No| Ignore - - Ignore --> Done - - CheckSubscriberRef -.- CheckSubscriberRefNote["We can't collect subscriber information using the URL.
So, let's simply check the subsciber ref."] - CheckSubscriberLabel -.- CheckSubscriberLabelNote["The target is to show what resource is using what event types.
However, Backstage will only show the resource if it has a special label.
So, if that label is missing, simply ignore the subscriber."] - CheckEventType -.- CheckEventTypeNote["If the trigger has an event type filter,
that means the subscriber is subscribed to that event.
If not, the subscriber is subscribed to all events from this trigger.
Please note that we ignore other filtering mechanisms such as 'source'."] - - CheckSubscriberRefNote:::note - CheckSubscriberLabelNote:::note - CheckEventTypeNote:::note - classDef note fill:yellow -``` - -#### Running the backend - -The backend is a Go project that runs in a Kubernetes cluster. - -Prerequisites: -- To run the backend, you need to have a Kubernetes cluster running and the `kubectl` command line tool installed. -- Also, you need [`ko`](https://github.com/ko-build/ko) [installed](https://ko.build/install/) and [configured](https://ko.build/configuration/#basic-configuration). - -```bash -# Build and deploy the backend -ko apply -f ./backends/config/100-eventmesh/ -``` - -Check that the backend is running: -```bash -# proxy the backend service -kubectl port-forward -n knative-eventing svc/eventmesh-backend 8080:8080 - -# check that the backend is running -curl -v http://localhost:8080/ - -{ - "eventTypes":[{"name":"test-event-type","namespace":"default","type":"foo","uid":"8a44f223-c2e5-4cc1-a578-cc81c6ea2898"}], - "brokers":[{"name":"default","namespace":"default","uid":"d44e3cfa-5866-43fd-a8ed-b3a3436beecd"}] -} -``` - -#### Running the Backstage plugin - -The plugin is enabled inside the Backstage instance that is in `./backstage` directory. - -Prerequisites: -- To run the plugin, you need to have the `yarn` command line tool installed. - -First, install dependencies: -```bash -# Install dependencies -cd ./backstage -yarn install --frozen-lockfile -``` - -The default configuration of the plugin is to use the backend at `http://localhost:8080`. - -[Start](#running-the-backend) and proxy the backend service: -```bash -# proxy the backend service -kubectl port-forward -n knative-eventing svc/eventmesh-backend 8080:8080 -``` - -Then, start the backstage instance: -```bash -cd ./backstage -yarn dev -``` - -#### Testing GitHub Actions - -You need `act` installed: https://github.com/nektos/act - -```bash - -# Specify the job to run -act -j '' -# ex: -# act -j 'publish-release-snapshot-on-npm' -# if having issues on Apple Silicon, use: -# act --rm --container-architecture linux/amd64 -j 'publish-release-snapshot-on-npm' -``` diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000..39036dc4 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,2 @@ +# Openshift Knative Backstage Plugins Release procedure + diff --git a/openshift/e2e-tests.sh b/openshift/e2e-tests.sh new file mode 100644 index 00000000..e9e49dc1 --- /dev/null +++ b/openshift/e2e-tests.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# shellcheck disable=SC1090 +set -Eeuox pipefail + +env + +failed=0 + +echo "TODO: going to run e2e tests" + +(( failed )) && dump_cluster_state + +(( failed )) && exit 1 + +success diff --git a/openshift/generate.sh b/openshift/generate.sh new file mode 100644 index 00000000..1f01c70c --- /dev/null +++ b/openshift/generate.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -euo pipefail + +repo_root_dir=$(dirname "$(realpath "${BASH_SOURCE[0]}")")/.. + +GO111MODULE=off go get -u github.com/openshift-knative/hack/cmd/generate + +$(go env GOPATH)/bin/generate \ + --root-dir "${repo_root_dir}" \ + --generators dockerfile \ + --dockerfile-image-builder-fmt "registry.ci.openshift.org/openshift/release:rhel-8-release-golang-%s-openshift-4.16" diff --git a/openshift/project.yaml b/openshift/project.yaml new file mode 100644 index 00000000..1486112a --- /dev/null +++ b/openshift/project.yaml @@ -0,0 +1,3 @@ +project: + tag: knative-v1.12 + imagePrefix: knative-backstage-plugins diff --git a/openshift/release/generate-release.sh b/openshift/release/generate-release.sh new file mode 100644 index 00000000..41747821 --- /dev/null +++ b/openshift/release/generate-release.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source $(dirname $0)/resolve.sh + +root_dir=$(dirname $0)/../.. + +release=$(yq r openshift/project.yaml project.tag) +release=${release/knative-/} + +echo "Release: $release" + +./openshift/generate.sh + +artifacts_dir="openshift/release/artifacts" +rm -rf $artifacts_dir +mkdir -p $artifacts_dir + +image_prefix="registry.ci.openshift.org/openshift/knative-${release}:knative-backstage-plugins-" +tag="" + +plugins="${artifacts_dir}/backstage-plugins.yaml" + +# Eventing CRDs +resolve_resources backends/config "${plugins}" "$image_prefix" "$tag" diff --git a/openshift/release/resolve.sh b/openshift/release/resolve.sh new file mode 100644 index 00000000..f87fc5bf --- /dev/null +++ b/openshift/release/resolve.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +function resolve_resources(){ + echo $@ + + local dir=$1 + local resolved_file_name=$2 + local image_prefix=$3 + local image_tag=${4-""} + + [[ -n $image_tag ]] && image_tag=":$image_tag" + + echo "Writing resolved yaml to $resolved_file_name" + + for yaml in "$dir"/*.yaml; do + echo "Resolving ${yaml}" + + echo "---" >> "$resolved_file_name" + # 1. Prefix test image references with test- + # 2. Rewrite image references + # 3. Remove comment lines + # 4. Remove empty lines + sed -e "s+\(.* image: \)\(knative.dev\)\(.*/\)\(test/\)\(.*\)+\1\2 \3\4test-\5+g" \ + -e "s+ko://++" \ + -e "s+eventing.knative.dev/release: devel+eventing.knative.dev/release: ${release}+" \ + -e "s+app.kubernetes.io/version: devel+app.kubernetes.io/version: ${release}+" \ + -e "s+knative.dev/backstage-plugins/backends/cmd/eventmesh+${image_prefix}backstage-plugin-backend-eventmesh${image_tag}+" \ + -e "s+\(.* image: \)\(knative.dev\)\(.*/\)\(.*\)+\1${image_prefix}\4${image_tag}+g" \ + "$yaml" >> "$resolved_file_name" + done +} From 8b04b328a551bb643a7c9153b7c3cad6ad2a07f0 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 11:53:17 +0300 Subject: [PATCH 02/14] ./openshift/generate.sh Signed-off-by: Ali Ok --- openshift/ci-operator/build-image/Dockerfile | 27 +++++++++++++++++++ .../knative-images/eventmesh/Dockerfile | 20 ++++++++++++++ .../knative-images/migrate/Dockerfile | 20 ++++++++++++++ .../knative-test-images/eventshub/Dockerfile | 20 ++++++++++++++ openshift/ci-operator/source-image/Dockerfile | 7 +++++ openshift/generate.sh | 0 openshift/images.yaml | 3 +++ 7 files changed, 97 insertions(+) create mode 100755 openshift/ci-operator/build-image/Dockerfile create mode 100755 openshift/ci-operator/knative-images/eventmesh/Dockerfile create mode 100755 openshift/ci-operator/knative-images/migrate/Dockerfile create mode 100755 openshift/ci-operator/knative-test-images/eventshub/Dockerfile create mode 100755 openshift/ci-operator/source-image/Dockerfile mode change 100644 => 100755 openshift/generate.sh create mode 100755 openshift/images.yaml diff --git a/openshift/ci-operator/build-image/Dockerfile b/openshift/ci-operator/build-image/Dockerfile new file mode 100755 index 00000000..e60eb10f --- /dev/null +++ b/openshift/ci-operator/build-image/Dockerfile @@ -0,0 +1,27 @@ +# DO NOT EDIT! Generated Dockerfile. + +# Dockerfile to bootstrap build and test in openshift-ci +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.18-openshift-4.16 as builder + +RUN echo "[kubernetes]" >> /etc/yum.repos.d/kubernetes.repo && \ + echo "name=Kubernetes" >> /etc/yum.repos.d/kubernetes.repo && \ + echo "baseurl=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/" >> /etc/yum.repos.d/kubernetes.repo && \ + echo "enabled=1" >> /etc/yum.repos.d/kubernetes.repo && \ + echo "gpgcheck=1" >> /etc/yum.repos.d/kubernetes.repo && \ + echo "gpgkey=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/repodata/repomd.xml.key" >> /etc/yum.repos.d/kubernetes.repo + +RUN yum install -y kubectl httpd-tools + +RUN wget https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && \ + chmod 700 ./get-helm-3 + +RUN ./get-helm-3 --version v3.11.3 --no-sudo && helm version + +RUN GOFLAGS='' go install github.com/mikefarah/yq/v3@latest + +# go install creates $GOPATH/.cache with root permissions, we delete it here +# to avoid permission issues with the runtime users +RUN rm -rf $GOPATH/.cache + +# Allow runtime users to add entries to /etc/passwd +RUN chmod g+rw /etc/passwd diff --git a/openshift/ci-operator/knative-images/eventmesh/Dockerfile b/openshift/ci-operator/knative-images/eventmesh/Dockerfile new file mode 100755 index 00000000..dfd223a5 --- /dev/null +++ b/openshift/ci-operator/knative-images/eventmesh/Dockerfile @@ -0,0 +1,20 @@ +# DO NOT EDIT! Generated Dockerfile for backends/cmd/eventmesh. +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.18-openshift-4.16 as builder + +COPY . . + +RUN mkdir -p /var/run/ko && \ + mkdir -p backends/cmd/eventmesh/kodata && \ + go build -o /usr/bin/main ./backends/cmd/eventmesh && \ + cp -r backends/cmd/eventmesh/kodata /var/run/ko + +FROM registry.access.redhat.com/ubi8/ubi-minimal + +# install the missing zoneinfo to ubi-minimal +RUN microdnf install tzdata + +USER 65532 + +COPY --from=builder /usr/bin/main /usr/bin/main +COPY --from=builder /var/run/ko /var/run/ko +ENTRYPOINT ["/usr/bin/main"] diff --git a/openshift/ci-operator/knative-images/migrate/Dockerfile b/openshift/ci-operator/knative-images/migrate/Dockerfile new file mode 100755 index 00000000..59627c05 --- /dev/null +++ b/openshift/ci-operator/knative-images/migrate/Dockerfile @@ -0,0 +1,20 @@ +# DO NOT EDIT! Generated Dockerfile for vendor/knative.dev/pkg/apiextensions/storageversion/cmd/migrate. +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.18-openshift-4.16 as builder + +COPY . . + +RUN mkdir -p /var/run/ko && \ + mkdir -p vendor/knative.dev/pkg/apiextensions/storageversion/cmd/migrate/kodata && \ + go build -o /usr/bin/main ./vendor/knative.dev/pkg/apiextensions/storageversion/cmd/migrate && \ + cp -r vendor/knative.dev/pkg/apiextensions/storageversion/cmd/migrate/kodata /var/run/ko + +FROM registry.access.redhat.com/ubi8/ubi-minimal + +# install the missing zoneinfo to ubi-minimal +RUN microdnf install tzdata + +USER 65532 + +COPY --from=builder /usr/bin/main /usr/bin/main +COPY --from=builder /var/run/ko /var/run/ko +ENTRYPOINT ["/usr/bin/main"] diff --git a/openshift/ci-operator/knative-test-images/eventshub/Dockerfile b/openshift/ci-operator/knative-test-images/eventshub/Dockerfile new file mode 100755 index 00000000..38eda4e2 --- /dev/null +++ b/openshift/ci-operator/knative-test-images/eventshub/Dockerfile @@ -0,0 +1,20 @@ +# DO NOT EDIT! Generated Dockerfile for vendor/knative.dev/reconciler-test/cmd/eventshub. +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.18-openshift-4.16 as builder + +COPY . . + +RUN mkdir -p /var/run/ko && \ + mkdir -p vendor/knative.dev/reconciler-test/cmd/eventshub/kodata && \ + go build -o /usr/bin/main ./vendor/knative.dev/reconciler-test/cmd/eventshub && \ + cp -r vendor/knative.dev/reconciler-test/cmd/eventshub/kodata /var/run/ko + +FROM registry.access.redhat.com/ubi8/ubi-minimal + +# install the missing zoneinfo to ubi-minimal +RUN microdnf install tzdata + +USER 65532 + +COPY --from=builder /usr/bin/main /usr/bin/main +COPY --from=builder /var/run/ko /var/run/ko +ENTRYPOINT ["/usr/bin/main"] diff --git a/openshift/ci-operator/source-image/Dockerfile b/openshift/ci-operator/source-image/Dockerfile new file mode 100755 index 00000000..0bc58d0c --- /dev/null +++ b/openshift/ci-operator/source-image/Dockerfile @@ -0,0 +1,7 @@ +# DO NOT EDIT! Generated Dockerfile. + +FROM src + +RUN chmod +x vendor/k8s.io/code-generator/generate-groups.sh || true +RUN chmod +x vendor/knative.dev/pkg/hack/generate-knative.sh || true +RUN chmod +x vendor/k8s.io/code-generator/generate-internal-groups.sh || true diff --git a/openshift/generate.sh b/openshift/generate.sh old mode 100644 new mode 100755 diff --git a/openshift/images.yaml b/openshift/images.yaml new file mode 100755 index 00000000..28122956 --- /dev/null +++ b/openshift/images.yaml @@ -0,0 +1,3 @@ +knative.dev/backstage-plugins/backends/cmd/eventmesh: registry.ci.openshift.org/openshift/knative-backstage-plugins-eventmesh:knative-v1.12 +knative.dev/pkg/apiextensions/storageversion/cmd/migrate: registry.ci.openshift.org/openshift/knative-backstage-plugins-migrate:knative-v1.12 +knative.dev/reconciler-test/cmd/eventshub: registry.ci.openshift.org/openshift/knative-backstage-plugins-test-eventshub:knative-v1.12 From 4d9c7c340c4d2a2393e8b6141050258af0a3b53a Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 12:01:39 +0300 Subject: [PATCH 03/14] Fix generate-release.sh Signed-off-by: Ali Ok --- openshift/release/generate-release.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 openshift/release/generate-release.sh diff --git a/openshift/release/generate-release.sh b/openshift/release/generate-release.sh old mode 100644 new mode 100755 index 41747821..81d5100f --- a/openshift/release/generate-release.sh +++ b/openshift/release/generate-release.sh @@ -6,7 +6,7 @@ source $(dirname $0)/resolve.sh root_dir=$(dirname $0)/../.. -release=$(yq r openshift/project.yaml project.tag) +release=$(yq '.project.tag' openshift/project.yaml) release=${release/knative-/} echo "Release: $release" @@ -17,10 +17,10 @@ artifacts_dir="openshift/release/artifacts" rm -rf $artifacts_dir mkdir -p $artifacts_dir -image_prefix="registry.ci.openshift.org/openshift/knative-${release}:knative-backstage-plugins-" +image_prefix="registry.ci.openshift.org/openshift/knative-${release}:knative-" tag="" plugins="${artifacts_dir}/backstage-plugins.yaml" -# Eventing CRDs -resolve_resources backends/config "${plugins}" "$image_prefix" "$tag" +# EventMesh Backend resources +resolve_resources backends/config/100-eventmesh "${plugins}" "$image_prefix" "$tag" From 864dfc42989aa3e398e6ce9140f4cc6e165a9df9 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 12:01:48 +0300 Subject: [PATCH 04/14] `make generate-release` Signed-off-by: Ali Ok --- .../release/artifacts/backstage-plugins.yaml | 189 ++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 openshift/release/artifacts/backstage-plugins.yaml diff --git a/openshift/release/artifacts/backstage-plugins.yaml b/openshift/release/artifacts/backstage-plugins.yaml new file mode 100644 index 00000000..0c7f6527 --- /dev/null +++ b/openshift/release/artifacts/backstage-plugins.yaml @@ -0,0 +1,189 @@ +--- +--- + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: eventmesh-backend + labels: + app.kubernetes.io/version: v1.12 + app.kubernetes.io/component: eventmesh-backend + +rules: + + - apiGroups: + - "" + resources: + # for config-logging and config-leader-election + - configmaps + verbs: + - get + - list + - watch + + # permissions for eventtypes, brokers and triggers + - apiGroups: + - "eventing.knative.dev" + resources: + - brokers + - eventtypes + - triggers + verbs: + - get + - list + - watch + + # permissions for leader election + - apiGroups: + - "coordination.k8s.io" + resources: + - "leases" + verbs: + - get + - list + - create + - update + - delete + - patch + - watch + + + # permissions to get subscribers for triggers + # as subscribers can be any resource, we need to give access to all resources + # we fetch subscribers one by one, we only need `get` verb + - apiGroups: + - "*" + resources: + - "*" + verbs: + - get +--- +--- + +apiVersion: v1 +kind: ServiceAccount +metadata: + name: eventmesh-backend + namespace: knative-eventing + labels: + app.kubernetes.io/version: v1.12 + app.kubernetes.io/component: eventmesh-backend +--- +--- + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: eventmesh-backend + labels: + app.kubernetes.io/version: v1.12 + app.kubernetes.io/component: eventmesh-backend +subjects: + - kind: ServiceAccount + name: eventmesh-backend + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: eventmesh-backend + apiGroup: rbac.authorization.k8s.io +--- +--- + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: eventmesh-backend + namespace: knative-eventing + labels: + app: eventmesh-backend + app.kubernetes.io/version: v1.12 + app.kubernetes.io/component: eventmesh-backend + app.kubernetes.io/name: knative-eventing +spec: + selector: + matchLabels: + app: eventmesh-backend + template: + metadata: + name: eventmesh-backend + labels: + app: eventmesh-backend + app.kubernetes.io/version: v1.12 + app.kubernetes.io/component: eventmesh-backend + app.kubernetes.io/name: knative-eventing + spec: + securityContext: + runAsNonRoot: true + serviceAccountName: eventmesh-backend + + # To avoid node becoming SPOF, spread our replicas to different nodes and zones. + topologySpreadConstraints: + - maxSkew: 2 + topologyKey: topology.kubernetes.io/zone + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app: eventmesh-backend + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app: eventmesh-backend + topologyKey: kubernetes.io/hostname + weight: 100 + + containers: + - name: controller + image: registry.ci.openshift.org/openshift/knative-v1.12:knative-backstage-plugin-backend-eventmesh + imagePullPolicy: IfNotPresent + env: + - name: SYSTEM_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + ports: + - containerPort: 9090 + name: metrics + resources: + requests: + cpu: 100m + memory: 100Mi + terminationMessagePolicy: FallbackToLogsOnError + terminationMessagePath: /dev/termination-log + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + capabilities: + drop: + - ALL + seccompProfile: + type: RuntimeDefault + restartPolicy: Always + +--- +apiVersion: v1 +kind: Service +metadata: + name: eventmesh-backend + namespace: knative-eventing + labels: + app: eventmesh-backend + app.kubernetes.io/version: v1.12 + app.kubernetes.io/component: eventmesh-backend + app.kubernetes.io/name: knative-eventing +spec: + ports: + - name: http + port: 8080 + targetPort: 8080 + - name: http-metrics + port: 9090 + targetPort: 9090 + selector: + app: eventmesh-backend From b5bcff9e1ecaa829cea3b441437591c8256b15f8 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 12:05:31 +0300 Subject: [PATCH 05/14] Fix `make test-e2e` Signed-off-by: Ali Ok --- Makefile | 2 +- openshift/e2e-tests.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) mode change 100644 => 100755 openshift/e2e-tests.sh diff --git a/Makefile b/Makefile index d276d337..4c275af3 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ install: .PHONY: install test-e2e: - sh openshift/e2e-tests.sh + ./openshift/e2e-tests.sh .PHONY: test-e2e # Generate an aggregated knative release yaml file, as well as a CI file with replaced image references diff --git a/openshift/e2e-tests.sh b/openshift/e2e-tests.sh old mode 100644 new mode 100755 index e9e49dc1..922b9343 --- a/openshift/e2e-tests.sh +++ b/openshift/e2e-tests.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash # shellcheck disable=SC1090 +source "$(dirname "$0")/../vendor/knative.dev/hack/e2e-tests.sh" + set -Eeuox pipefail env From 87f09604443ab48d68d7fe364295cd32c0f7c62e Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 12:20:17 +0300 Subject: [PATCH 06/14] Update Makefile Co-authored-by: Pierangelo Di Pilato --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 4c275af3..551af66c 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,6 @@ CGO_ENABLED=0 GOOS=linux -CORE_IMAGES=$(shell find ./backends/cmd -name main.go | sed 's|/main.go||') BRANCH= TEST= IMAGE= From e9055ff6972030030e59869197ec29e336592c24 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 12:20:25 +0300 Subject: [PATCH 07/14] Update Makefile Co-authored-by: Pierangelo Di Pilato --- Makefile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Makefile b/Makefile index 551af66c..5efc903b 100644 --- a/Makefile +++ b/Makefile @@ -10,12 +10,6 @@ TEST_IMAGE_TAG ?= latest # Guess location of openshift/release repo. NOTE: override this if it is not correct. OPENSHIFT=${CURDIR}/../../github.com/openshift/release -install: - for img in $(CORE_IMAGES); do \ - go install $$img ; \ - done -.PHONY: install - test-e2e: ./openshift/e2e-tests.sh .PHONY: test-e2e From d0b7c380dcfecf07447a2b94363eb447d98dcfd2 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 12:20:35 +0300 Subject: [PATCH 08/14] Update Makefile Co-authored-by: Pierangelo Di Pilato --- Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Makefile b/Makefile index 5efc903b..661c7f00 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,6 @@ TEST= IMAGE= TEST_IMAGE_TAG ?= latest -# Guess location of openshift/release repo. NOTE: override this if it is not correct. -OPENSHIFT=${CURDIR}/../../github.com/openshift/release test-e2e: ./openshift/e2e-tests.sh From c4e4b73840a3a79bf36ac381eb63752ba4d9ea58 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 12:22:20 +0300 Subject: [PATCH 09/14] Update openshift/release/resolve.sh Co-authored-by: Pierangelo Di Pilato --- openshift/release/resolve.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/openshift/release/resolve.sh b/openshift/release/resolve.sh index f87fc5bf..9de74a9d 100644 --- a/openshift/release/resolve.sh +++ b/openshift/release/resolve.sh @@ -24,7 +24,6 @@ function resolve_resources(){ -e "s+ko://++" \ -e "s+eventing.knative.dev/release: devel+eventing.knative.dev/release: ${release}+" \ -e "s+app.kubernetes.io/version: devel+app.kubernetes.io/version: ${release}+" \ - -e "s+knative.dev/backstage-plugins/backends/cmd/eventmesh+${image_prefix}backstage-plugin-backend-eventmesh${image_tag}+" \ -e "s+\(.* image: \)\(knative.dev\)\(.*/\)\(.*\)+\1${image_prefix}\4${image_tag}+g" \ "$yaml" >> "$resolved_file_name" done From 847a5c1134b158c09c2cd02c11ebb889a0c5e761 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 14:59:06 +0300 Subject: [PATCH 10/14] Update openshift/release/generate-release.sh Co-authored-by: Pierangelo Di Pilato --- openshift/release/generate-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openshift/release/generate-release.sh b/openshift/release/generate-release.sh index 81d5100f..67945c48 100755 --- a/openshift/release/generate-release.sh +++ b/openshift/release/generate-release.sh @@ -17,7 +17,7 @@ artifacts_dir="openshift/release/artifacts" rm -rf $artifacts_dir mkdir -p $artifacts_dir -image_prefix="registry.ci.openshift.org/openshift/knative-${release}:knative-" +image_prefix="registry.ci.openshift.org/openshift/knative-${release}:knative-backstage-plugins-" tag="" plugins="${artifacts_dir}/backstage-plugins.yaml" From 6576cc7a005f2bf67e830a33ee4a62cd2ce64d59 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 15:00:18 +0300 Subject: [PATCH 11/14] `make generate-release` Signed-off-by: Ali Ok --- openshift/release/artifacts/backstage-plugins.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openshift/release/artifacts/backstage-plugins.yaml b/openshift/release/artifacts/backstage-plugins.yaml index 0c7f6527..0096b55d 100644 --- a/openshift/release/artifacts/backstage-plugins.yaml +++ b/openshift/release/artifacts/backstage-plugins.yaml @@ -136,7 +136,7 @@ spec: containers: - name: controller - image: registry.ci.openshift.org/openshift/knative-v1.12:knative-backstage-plugin-backend-eventmesh + image: registry.ci.openshift.org/openshift/knative-v1.12:knative-backstage-plugins-eventmesh imagePullPolicy: IfNotPresent env: - name: SYSTEM_NAMESPACE From 50d530c6e584f210e731b1bd9c3277c04155debf Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 15:11:46 +0300 Subject: [PATCH 12/14] Rename manifest file Signed-off-by: Ali Ok --- openshift/release/generate-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openshift/release/generate-release.sh b/openshift/release/generate-release.sh index 67945c48..548b83a0 100755 --- a/openshift/release/generate-release.sh +++ b/openshift/release/generate-release.sh @@ -20,7 +20,7 @@ mkdir -p $artifacts_dir image_prefix="registry.ci.openshift.org/openshift/knative-${release}:knative-backstage-plugins-" tag="" -plugins="${artifacts_dir}/backstage-plugins.yaml" +plugins="${artifacts_dir}/backstage-plugins-eventmesh-backend.yaml" # EventMesh Backend resources resolve_resources backends/config/100-eventmesh "${plugins}" "$image_prefix" "$tag" From a8c91ddc8dcb33477e23ce060a76f16366ed34ba Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 15:12:13 +0300 Subject: [PATCH 13/14] .github directory no more Signed-off-by: Ali Ok --- .github/workflows/backstage-lint.yaml | 35 ------ .../workflows/backstage-release-snapshot.yaml | 96 ---------------- .github/workflows/backstage-release.yaml | 105 ------------------ .github/workflows/backstage-unit-tests.yaml | 40 ------- .github/workflows/knative-go-build.yaml | 14 --- .github/workflows/knative-go-test.yaml | 17 --- .github/workflows/knative-security.yaml | 17 --- .github/workflows/knative-stale.yaml | 14 --- .github/workflows/knative-style.yaml | 15 --- .github/workflows/knative-verify.yaml | 26 ----- 10 files changed, 379 deletions(-) delete mode 100644 .github/workflows/backstage-lint.yaml delete mode 100644 .github/workflows/backstage-release-snapshot.yaml delete mode 100644 .github/workflows/backstage-release.yaml delete mode 100644 .github/workflows/backstage-unit-tests.yaml delete mode 100644 .github/workflows/knative-go-build.yaml delete mode 100644 .github/workflows/knative-go-test.yaml delete mode 100644 .github/workflows/knative-security.yaml delete mode 100644 .github/workflows/knative-stale.yaml delete mode 100644 .github/workflows/knative-style.yaml delete mode 100644 .github/workflows/knative-verify.yaml diff --git a/.github/workflows/backstage-lint.yaml b/.github/workflows/backstage-lint.yaml deleted file mode 100644 index 3ca6249b..00000000 --- a/.github/workflows/backstage-lint.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: Backstage lint - -on: - pull_request: - branches: - - main - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: 'backstage/.nvmrc' - cache: 'yarn' - cache-dependency-path: 'backstage/yarn.lock' - - - name: Print environment - run: | - node --version - yarn --version - - - name: Install dependencies - shell: bash - working-directory: ./backstage - run: yarn --prefer-offline --frozen-lockfile - - - name: Lint all code - shell: bash - working-directory: ./backstage - run: yarn backstage-cli repo lint \ No newline at end of file diff --git a/.github/workflows/backstage-release-snapshot.yaml b/.github/workflows/backstage-release-snapshot.yaml deleted file mode 100644 index 1589b844..00000000 --- a/.github/workflows/backstage-release-snapshot.yaml +++ /dev/null @@ -1,96 +0,0 @@ -name: Publish snapshot on NPM - -on: - # When manually triggered - workflow_dispatch: - - # When there's a new commit in main branch - push: - branches: [ "main" ] - -jobs: - publish-release-snapshot-on-npm: - name: Publish release on NPM - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup release name - run: | - # get the short git hash - git_hash=$(git rev-parse --short "$GITHUB_SHA") - # build the release name - new_version="0.0.0-snapshot.${git_hash}" - echo "RELEASE_NAME=${new_version}" >> $GITHUB_ENV - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: 'backstage/.nvmrc' - cache: 'yarn' - cache-dependency-path: 'backstage/yarn.lock' - - - name: Print environment - run: | - node --version - yarn --version - - - name: Print release name - run: | - echo "Release name: ${RELEASE_NAME}" - - - name: Install dependencies - shell: bash - working-directory: ./backstage - run: yarn --prefer-offline --frozen-lockfile - - - name: Install tooling - shell: bash - working-directory: ./backstage - run: npm install @backstage/cli -g - - - name: Run tests - shell: bash - working-directory: ./backstage - run: | - export PATH="./node_modules/.bin/:$PATH" - yarn test - - - name: Build - shell: bash - working-directory: ./backstage - run: | - export PATH="./node_modules/.bin/:$PATH" - yarn tsc - yarn build:all - - - name: Update version of knative-event-mesh-backend plugin - shell: bash - working-directory: ./backstage/plugins/knative-event-mesh-backend - run: | - export PATH="./node_modules/.bin/:$PATH" - yarn version --new-version ${RELEASE_NAME} --no-git-tag-version - - - name: Prepack knative-event-mesh-backend plugin - shell: bash - working-directory: ./backstage/plugins/knative-event-mesh-backend - run: | - export PATH="./node_modules/.bin/:$PATH" - yarn prepack - - - name: Publish knative-event-mesh-backend plugin - uses: JS-DevTools/npm-publish@v2 - with: - token: ${{ secrets.NPM_TOKEN }} - access: public - package: backstage/plugins/knative-event-mesh-backend - tag: snapshot - - - name: Postpack knative-event-mesh-backend plugin - shell: bash - working-directory: ./backstage/plugins/knative-event-mesh-backend - run: | - export PATH="./node_modules/.bin/:$PATH" - yarn postpack diff --git a/.github/workflows/backstage-release.yaml b/.github/workflows/backstage-release.yaml deleted file mode 100644 index 14f518b3..00000000 --- a/.github/workflows/backstage-release.yaml +++ /dev/null @@ -1,105 +0,0 @@ -name: Publish release on NPM - -on: - # When manually triggered - workflow_dispatch: - inputs: - releaseName: - description: 'Release name, e.g. v1.2.3' - required: true - - # When there's a release created - release: - types: [ published ] - -jobs: - publish-release-on-npm: - name: Publish release on NPM - runs-on: ubuntu-latest - - steps: - - name: Setup release name - run: | - if [ -z "${{ github.event.release.name }}" ]; then - echo "RELEASE_NAME=${{ github.event.inputs.releaseName }}" >> $GITHUB_ENV - else - echo "RELEASE_NAME=${{ github.event.release.name }}" >> $GITHUB_ENV - fi - - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: 'backstage/.nvmrc' - cache: 'yarn' - cache-dependency-path: 'backstage/yarn.lock' - - - name: Print environment - run: | - node --version - yarn --version - - - name: Print release name - run: | - echo "Release name: ${RELEASE_NAME}" - - - name: Install dependencies - shell: bash - working-directory: ./backstage - run: yarn --prefer-offline --frozen-lockfile - - - name: lint all code - shell: bash - working-directory: ./backstage - run: yarn backstage-cli repo lint - - - name: Install tooling - shell: bash - working-directory: ./backstage - run: npm install @backstage/cli -g - - - name: Run tests - shell: bash - working-directory: ./backstage - run: | - export PATH="./node_modules/.bin/:$PATH" - yarn test - - - name: Build - shell: bash - working-directory: ./backstage - run: | - export PATH="./node_modules/.bin/:$PATH" - yarn tsc - yarn build:all - - - name: Update version of knative-event-mesh-backend plugin - shell: bash - working-directory: ./backstage/plugins/knative-event-mesh-backend - run: | - export PATH="./node_modules/.bin/:$PATH" - export RELEASE_VERSION="${RELEASE_NAME:1}" - yarn version --new-version ${RELEASE_VERSION} --no-git-tag-version - - - name: Prepack knative-event-mesh-backend plugin - shell: bash - working-directory: ./backstage/plugins/knative-event-mesh-backend - run: | - export PATH="./node_modules/.bin/:$PATH" - yarn prepack - - - name: Publish knative-event-mesh-backend plugin - uses: JS-DevTools/npm-publish@v2 - with: - token: ${{ secrets.NPM_TOKEN }} - access: public - package: backstage/plugins/knative-event-mesh-backend - - - name: Postpack knative-event-mesh-backend plugin - shell: bash - working-directory: ./backstage/plugins/knative-event-mesh-backend - run: | - export PATH="./node_modules/.bin/:$PATH" - yarn postpack diff --git a/.github/workflows/backstage-unit-tests.yaml b/.github/workflows/backstage-unit-tests.yaml deleted file mode 100644 index eb59a81b..00000000 --- a/.github/workflows/backstage-unit-tests.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: Backstage unit tests - -on: - pull_request: - branches: - - main - -jobs: - unit-tests: - name: Test - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: 'backstage/.nvmrc' - cache: 'yarn' - cache-dependency-path: 'backstage/yarn.lock' - - - name: Print environment - run: | - node --version - yarn --version - - - name: Install dependencies - shell: bash - working-directory: ./backstage - run: yarn --prefer-offline --frozen-lockfile - - - name: Run tests - shell: bash - working-directory: ./backstage - run: | - export PATH="./node_modules/.bin/:$PATH" - yarn test - diff --git a/.github/workflows/knative-go-build.yaml b/.github/workflows/knative-go-build.yaml deleted file mode 100644 index 10c3de1a..00000000 --- a/.github/workflows/knative-go-build.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2020 The Knative Authors. -# SPDX-License-Identifier: Apache-2.0 - -# This file is automagically synced here from github.com/knative-extensions/knobots - -name: Build - -on: - pull_request: - branches: [ 'main', 'release-*' ] - -jobs: - build: - uses: knative/actions/.github/workflows/reusable-go-build.yaml@main diff --git a/.github/workflows/knative-go-test.yaml b/.github/workflows/knative-go-test.yaml deleted file mode 100644 index 75d921e2..00000000 --- a/.github/workflows/knative-go-test.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2022 The Knative Authors. -# SPDX-License-Identifier: Apache-2.0 - -# This file is automagically synced here from github.com/knative-extensions/knobots - -name: Test - -on: - push: - branches: [ 'main', 'release-*' ] - - pull_request: - branches: [ 'main', 'release-*' ] - -jobs: - test: - uses: knative/actions/.github/workflows/reusable-go-test.yaml@main diff --git a/.github/workflows/knative-security.yaml b/.github/workflows/knative-security.yaml deleted file mode 100644 index a6cd6813..00000000 --- a/.github/workflows/knative-security.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2020 The Knative Authors. -# SPDX-License-Identifier: Apache-2.0 - -# This file is automagically synced here from github.com/knative-extensions/knobots - -name: 'Security' - -on: - push: - branches: [ 'main', 'release-*' ] - - pull_request: - branches: [ 'main', 'release-*' ] - -jobs: - analyze: - uses: knative/actions/.github/workflows/reusable-security.yaml@main diff --git a/.github/workflows/knative-stale.yaml b/.github/workflows/knative-stale.yaml deleted file mode 100644 index 2e25b9d9..00000000 --- a/.github/workflows/knative-stale.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2020 The Knative Authors. -# SPDX-License-Identifier: Apache-2.0 - -# This file is automagically synced here from github.com/knative-extensions/knobots -name: 'Close stale' - -on: - schedule: - - cron: '0 1 * * *' - -jobs: - - stale: - uses: knative/actions/.github/workflows/reusable-stale.yaml@main diff --git a/.github/workflows/knative-style.yaml b/.github/workflows/knative-style.yaml deleted file mode 100644 index 55bb1537..00000000 --- a/.github/workflows/knative-style.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2020 The Knative Authors. -# SPDX-License-Identifier: Apache-2.0 - -# This file is automagically synced here from github.com/knative-extensions/knobots - -name: Code Style - -on: - pull_request: - branches: [ 'main', 'release-*' ] - -jobs: - - style: - uses: knative/actions/.github/workflows/reusable-style.yaml@main diff --git a/.github/workflows/knative-verify.yaml b/.github/workflows/knative-verify.yaml deleted file mode 100644 index e1a28c4f..00000000 --- a/.github/workflows/knative-verify.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2020 The 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. - -# This file is automagically synced here from github.com/knative-extensions/.github -# repo by knobots: https://github.com/knative-extensions/knobots and will be overwritten. - -name: Verify - -on: - pull_request: - branches: [ 'main', 'release-*' ] - -jobs: - verify: - uses: knative/actions/.github/workflows/reusable-verify-codegen.yaml@main From bdaac8fa8f299f381dd180f59ff0fe32820d990e Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 2 Apr 2024 15:13:01 +0300 Subject: [PATCH 14/14] Remove dsimansky Signed-off-by: Ali Ok --- OWNERS_ALIASES | 2 -- 1 file changed, 2 deletions(-) diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index 584bb908..0ce6c203 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -4,7 +4,6 @@ aliases: - creydr - matzew - pierdipi - - dsimansky - leo6leo - cali0707 eventing-reviewers: @@ -12,6 +11,5 @@ aliases: - creydr - matzew - pierdipi - - dsimansky - leo6leo - cali0707