Skip to content

Commit

Permalink
Merge branch 'main' into topology-plugin-test
Browse files Browse the repository at this point in the history
  • Loading branch information
teknaS47 authored Jan 15, 2025
2 parents 4512654 + 6844caf commit 2ea02bb
Show file tree
Hide file tree
Showing 121 changed files with 220 additions and 219 deletions.
39 changes: 38 additions & 1 deletion .github/workflows/pr-build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,27 @@ jobs:
git fetch base-origin ${{ github.event.pull_request.base.ref }}
git merge --no-edit base-origin/${{ github.event.pull_request.base.ref }}
- name: Determine Changed Files
id: changes
run: |
BASE_COMMIT=${{ github.event.pull_request.base.sha }}
HEAD_COMMIT=${{ github.event.pull_request.head.sha }}
CHANGED_FILES=$(git diff --name-only "$BASE_COMMIT" "$HEAD_COMMIT")
echo "Changed files:"
echo "$CHANGED_FILES"
if echo "$CHANGED_FILES" | grep -qv '^e2e-tests/'; then
echo "Changes detected outside the e2e-tests folder. Proceeding with the build."
echo "proceed_with_build=true" >> $GITHUB_ENV
else
echo "No changes outside the e2e-tests folder. Skipping the build."
echo "proceed_with_build=false" >> $GITHUB_ENV
fi
- name: Get the last commit short SHA of the PR
if: env.proceed_with_build == 'true'
run: |
SHORT_SHA=$(git rev-parse --short=8 ${{ github.event.pull_request.head.sha }})
echo "SHORT_SHA=$SHORT_SHA" >> $GITHUB_ENV
Expand All @@ -63,7 +83,24 @@ jobs:
-e 's|("Last Commit:.+)|"Last Commit: '$repoPR' @ '$SHORT_SHA'"|'
fi
- name: Check if Image Already Exists
if: env.proceed_with_build == 'true'
run: |
IMAGE_TAG="pr-${{ github.event.number }}"
IMAGE_NAME="${{ env.REGISTRY }}/janus-idp/backstage-showcase:${IMAGE_TAG}"
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "https://quay.io/v2/janus-idp/backstage-showcase/manifests/${IMAGE_TAG}")
if [ "$HTTP_CODE" -eq 200 ]; then
echo "Image $IMAGE_NAME already exists. Skipping the build."
echo "image_exists=true" >> $GITHUB_ENV
else
echo "Image $IMAGE_NAME does not exist. Proceeding with the build."
echo "image_exists=false" >> $GITHUB_ENV
fi
- name: Build and Push with Buildx
if: env.proceed_with_build == 'true' && env.image_exists == 'false'
uses: ./.github/actions/docker-build
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -73,11 +110,11 @@ jobs:
imageTags: |
type=ref,prefix=pr-,event=pr
type=ref,prefix=pr-,suffix=-${{ env.SHORT_SHA }},event=pr
# to autodelete PR image tags, set an expiry date
imageLabels: quay.expires-after=14d
push: true

- name: Comment the image pull link
if: env.proceed_with_build == 'true' && env.image_exists == 'false'
uses: actions/github-script@v7
with:
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023-2024 The Janus IDP Authors
# Copyright Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/versioned-build-image.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023-2025 The RHDH Authors
# Copyright Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .ibm/pipelines/env_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ HELM_IMAGE_NAME=backstage
HELM_REPO_NAME=rhdh-chart
HELM_REPO_URL="https://redhat-developer.github.io/rhdh-chart"
K8S_CLUSTER_TOKEN_ENCODED=$(printf "%s" $K8S_CLUSTER_TOKEN | base64 | tr -d '\n')
QUAY_REPO="${QUAY_REPO:-janus-idp/backstage-showcase}"
QUAY_REPO="${QUAY_REPO:-rhdh-community/rhdh}"

RELEASE_NAME=rhdh
RELEASE_NAME_RBAC=rhdh-rbac
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ catalog:
- allow: [API, Component, Group, Location, Resource, System, Template]
locations:
- type: url
target: https://github.com/janus-idp/backstage-showcase/blob/main/catalog-entities/all.yaml
target: https://github.com/redhat-developer/rhdh/blob/main/catalog-entities/all.yaml
- type: url
target: https://github.com/redhat-developer/red-hat-developer-hub-software-templates/blob/main/templates.yaml
- type: url
Expand Down
2 changes: 1 addition & 1 deletion .ibm/pipelines/resources/config_map/app-config-rhdh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ catalog:
- allow: [API, Component, Group, Location, Resource, System, Template]
locations:
- type: url
target: https://github.com/janus-idp/backstage-showcase/blob/main/catalog-entities/all.yaml
target: https://github.com/redhat-developer/rhdh/blob/main/catalog-entities/all.yaml
- type: url
target: https://github.com/redhat-developer/red-hat-developer-hub-software-templates/blob/main/templates.yaml
- type: url
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ dynamicPlugins:
* [Website](https://developers.redhat.com/rhdh/overview)
* [Documentation](https://docs.redhat.com/en/documentation/red_hat_developer_hub/)
* [GitHub Showcase](https://github.com/janus-idp/backstage-showcase)
* [GitHub Showcase](https://github.com/redhat-developer/rhdh)
* [GitHub Plugins](https://github.com/janus-idp/backstage-plugins)
- mountPoint: home.page/cards
importName: Markdown
Expand All @@ -137,7 +137,7 @@ dynamicPlugins:
* [Website](https://developers.redhat.com/rhdh/overview)
* [Documentation](https://docs.redhat.com/en/documentation/red_hat_developer_hub/)
* [GitHub Showcase](https://github.com/janus-idp/backstage-showcase)
* [GitHub Showcase](https://github.com/redhat-developer/rhdh)
* [GitHub Plugins](https://github.com/janus-idp/backstage-plugins)
- mountPoint: home.page/cards
importName: FeaturedDocsCard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ upstream:
image:
pullPolicy: Always
registry: quay.io
repository: janus-idp/backstage-showcase
repository: rhdh-community/rhdh
tag: next
appConfig:
app:
Expand Down
19 changes: 11 additions & 8 deletions .ibm/pipelines/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ droute_send() {
ARTIFACTS_URL="https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/${REPO_OWNER}_${REPO_NAME}/${PULL_NUMBER}/${JOB_NAME}/${BUILD_ID}/artifacts/e2e-tests/${REPO_OWNER}-${REPO_NAME}/artifacts/${project}"
else
JOB_URL="${JOB_BASE_URL}/logs/${JOB_NAME}/${BUILD_ID}"
ARTIFACTS_URL="https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/${JOB_NAME}/${BUILD_ID}/artifacts/${JOB_NAME##periodic-ci-janus-idp-backstage-showcase-main-}/${REPO_OWNER}-${REPO_NAME}/artifacts/${project}"
ARTIFACTS_URL="https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/${JOB_NAME}/${BUILD_ID}/artifacts/${JOB_NAME##periodic-ci-redhat-developer-rhdh-main-}/${REPO_OWNER}-${REPO_NAME}/artifacts/${project}"
fi

# Remove properties (only used for skipped test and invalidates the file if empty)
Expand Down Expand Up @@ -543,6 +543,9 @@ run_tests() {
local project=$2
project=${project}
cd "${DIR}/../../e2e-tests"
local e2e_tests_dir
e2e_tests_dir=$(pwd)

yarn install
yarn playwright install chromium

Expand All @@ -561,20 +564,20 @@ run_tests() {

mkdir -p "${ARTIFACT_DIR}/${project}/test-results"
mkdir -p "${ARTIFACT_DIR}/${project}/attachments/screenshots"
cp -a /tmp/backstage-showcase/e2e-tests/test-results/* "${ARTIFACT_DIR}/${project}/test-results"
cp -a /tmp/backstage-showcase/e2e-tests/${JUNIT_RESULTS} "${ARTIFACT_DIR}/${project}/${JUNIT_RESULTS}"
cp -a "${e2e_tests_dir}/test-results/"* "${ARTIFACT_DIR}/${project}/test-results"
cp -a "${e2e_tests_dir}/${JUNIT_RESULTS}" "${ARTIFACT_DIR}/${project}/${JUNIT_RESULTS}"

if [ -d "/tmp/backstage-showcase/e2e-tests/screenshots" ]; then
cp -a /tmp/backstage-showcase/e2e-tests/screenshots/* "${ARTIFACT_DIR}/${project}/attachments/screenshots/"
if [ -d "${e2e_tests_dir}/screenshots" ]; then
cp -a "${e2e_tests_dir}/screenshots/"* "${ARTIFACT_DIR}/${project}/attachments/screenshots/"
fi

if [ -d "/tmp/backstage-showcase/e2e-tests/auth-providers-logs" ]; then
cp -a /tmp/backstage-showcase/e2e-tests/auth-providers-logs/* "${ARTIFACT_DIR}/${project}/"
if [ -d "${e2e_tests_dir}/auth-providers-logs" ]; then
cp -a "${e2e_tests_dir}/auth-providers-logs/"* "${ARTIFACT_DIR}/${project}/"
fi

ansi2html <"/tmp/${LOGFILE}" >"/tmp/${LOGFILE}.html"
cp -a "/tmp/${LOGFILE}.html" "${ARTIFACT_DIR}/${project}"
cp -a /tmp/backstage-showcase/e2e-tests/playwright-report/* "${ARTIFACT_DIR}/${project}"
cp -a "${e2e_tests_dir}/playwright-report/"* "${ARTIFACT_DIR}/${project}"

droute_send "${release_name}" "${project}"

Expand Down
2 changes: 1 addition & 1 deletion .ibm/pipelines/value_files/diff-values_showcase_AKS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ global:
dynamic:
plugins:
- package: ./dynamic-plugins/dist/backstage-community-plugin-catalog-backend-module-scaffolder-relation-processor-dynamic
disabled: true
disabled: false
upstream:
backstage:
extraEnvVarsSecrets:
Expand Down
2 changes: 1 addition & 1 deletion .ibm/pipelines/value_files/diff-values_showcase_GKE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ global:
dynamic:
plugins:
- package: ./dynamic-plugins/dist/backstage-community-plugin-catalog-backend-module-scaffolder-relation-processor-dynamic
disabled: true
disabled: false
upstream:
backstage:
extraEnvVarsSecrets:
Expand Down
10 changes: 5 additions & 5 deletions .ibm/pipelines/value_files/values_showcase-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ global:
# -- Array of YAML files listing dynamic plugins to include with those listed in the `plugins` field.
# Relative paths are resolved from the working directory of the initContainer that will install the plugins (`/opt/app-root/src`).
includes:
# -- List of dynamic plugins included inside the `janus-idp/backstage-showcase` container image, some of which are disabled by default.
# This file ONLY works with the `janus-idp/backstage-showcase` container image.
# -- List of dynamic plugins included inside the `rhdh-community/rhdh` container image, some of which are disabled by default.
# This file ONLY works with the `rhdh-community/rhdh` container image.
- 'dynamic-plugins.default.yaml'

# -- List of dynamic plugins, possibly overriding the plugins listed in `includes` files.
Expand Down Expand Up @@ -117,9 +117,9 @@ upstream:
backstage:
image:
pullPolicy: Always
# using test image from https://quay.io/repository/janus-idp/backstage-showcase
# using test image from https://quay.io/repository/rhdh-community/rhdh
registry: quay.io
repository: janus-idp/backstage-showcase
repository: rhdh-community/rhdh
tag: next
appConfig:
app:
Expand Down Expand Up @@ -205,7 +205,7 @@ upstream:
- name: install-dynamic-plugins
# -- Image used by the initContainer to install dynamic plugins into the `dynamic-plugins-root` volume mount.
# It could be replaced by a custom image based on this one.
# @default -- `quay.io/janus-idp/backstage-showcase:latest`
# @default -- `quay.io/rhdh-community/rhdh:latest`
image: '{{ include "backstage.image" . }}'
command:
- sh
Expand Down
6 changes: 3 additions & 3 deletions .ibm/pipelines/value_files/values_showcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ global:
# -- Array of YAML files listing dynamic plugins to include with those listed in the `plugins` field.
# Relative paths are resolved from the working directory of the initContainer that will install the plugins (`/opt/app-root/src`).
includes:
# -- List of dynamic plugins included inside the `janus-idp/backstage-showcase` container image, some of which are disabled by default.
# This file ONLY works with the `janus-idp/backstage-showcase` container image.
# -- List of dynamic plugins included inside the `rhdh-community/rhdh` container image, some of which are disabled by default.
# This file ONLY works with the `rhdh-community/rhdh` container image.
- 'dynamic-plugins.default.yaml'

# -- List of dynamic plugins, possibly overriding the plugins listed in `includes` files.
Expand Down Expand Up @@ -127,7 +127,7 @@ upstream:
image:
pullPolicy: Always
registry: quay.io
repository: janus-idp/backstage-showcase
repository: rhdh-community/rhdh
tag: next
extraEnvVars:
- name: BACKEND_SECRET
Expand Down
4 changes: 2 additions & 2 deletions .rhdh/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Stage 1 - Build nodejs skeleton
#@follow_tag(registry.access.redhat.com/ubi9/nodejs-20:1)
# https://registry.access.redhat.com/ubi9/nodejs-20
FROM registry.access.redhat.com/ubi9/nodejs-20:9.5-1736398249 AS build
FROM registry.access.redhat.com/ubi9/nodejs-20:9.5-1736455676 AS build
# hadolint ignore=DL3002
USER 0

Expand Down Expand Up @@ -261,7 +261,7 @@ RUN "$YARN" workspaces focus --all --production && \
# Stage 5 - Build the runner image
#@follow_tag(registry.access.redhat.com/ubi9/nodejs-20-minimal:1)
# https://registry.access.redhat.com/ubi9/nodejs-20-minimal
FROM registry.access.redhat.com/ubi9/nodejs-20-minimal:9.5-1734514731 AS runner
FROM registry.access.redhat.com/ubi9/nodejs-20-minimal:9.5-1736729465 AS runner
USER 0

# Downstream sources
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ yarn tsc # Run type ge

### Run the Showcase App

We currently have quite a bit of moving parts for the showcase application. As such, we have documentation dedicated to the requirements for running the showcase app under [getting-started.md](https://github.com/janus-idp/backstage-showcase/blob/main/docs/index.md).
We currently have quite a bit of moving parts for the showcase application. As such, we have documentation dedicated to the requirements for running the showcase app under [getting-started.md](https://github.com/redhat-developer/rhdh/blob/main/docs/index.md).

### Useful Scripts

Expand All @@ -40,11 +40,11 @@ We welcome code and non-code contributions to our project. Non-code contribution

### Finding Issues to Work On

Want to submit some changes to the code? The best place to start is to look through our issues for [bugs](https://github.com/janus-idp/backstage-showcase/issues?q=is%3Aopen+is%3Aissue+label%3Akind%2Fbug), [good first issues](https://github.com/janus-idp/backstage-showcase/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22), and [help wanted](https://github.com/janus-idp/backstage-showcase/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). These are a great starting point for new contributors.
Want to submit some changes to the code? The best place to start is to look through our issues for [bugs](https://github.com/redhat-developer/rhdh/issues?q=is%3Aopen+is%3Aissue+label%3Akind%2Fbug), [good first issues](https://github.com/redhat-developer/rhdh/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22), and [help wanted](https://github.com/redhat-developer/rhdh/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). These are a great starting point for new contributors.

### Bug Reporting

If you found a bug in our showcase app, please submit an [issue](https://github.com/janus-idp/backstage-showcase/issues/new?assignees=&labels=kind%2Fbug%2Cstatus%2Ftriage&template=bug.md) describing the problem that you ran into. Important information to include:
If you found a bug in our showcase app, please submit an [issue](https://github.com/redhat-developer/rhdh/issues/new?assignees=&labels=kind%2Fbug%2Cstatus%2Ftriage&template=bug.md) describing the problem that you ran into. Important information to include:

- Steps to reproduce the bug
- The `app-config.yaml` that is being used (**remember to remove all secrets before sharing**)
Expand All @@ -62,15 +62,15 @@ yarn versions:bump # Updates Backstage dependencies

### Enhancement Requests

If you want an enhancement of a feature or workflow, you can submit an [issue](https://github.com/janus-idp/backstage-showcase/issues/new?assignees=&labels=kind%2Fenhancement%2Cstatus%2Ftriage&template=enhancement.md) describing the enhancement. Include:
If you want an enhancement of a feature or workflow, you can submit an [issue](https://github.com/redhat-developer/rhdh/issues/new?assignees=&labels=kind%2Fenhancement%2Cstatus%2Ftriage&template=enhancement.md) describing the enhancement. Include:

- What you are wanting to see improved
- The current behavior
- The new behavior you wish to see

### Feature Requests

If you want to see a new feature within the showcase app, file an [issue](https://github.com/janus-idp/backstage-showcase/issues/new?assignees=&labels=kind%2Ffeature%2Cstatus%2Ftriage&template=feature.md) detailing the new feature. Include:
If you want to see a new feature within the showcase app, file an [issue](https://github.com/redhat-developer/rhdh/issues/new?assignees=&labels=kind%2Ffeature%2Cstatus%2Ftriage&template=feature.md) detailing the new feature. Include:

- What you are trying to achieve with the new feature
- What you will need
Expand Down Expand Up @@ -179,4 +179,4 @@ You can reach out to us in our [community Slack channel](https://join.slack.com/

## License

By contributing, you agree that your contributions will be licensed under the [Apache-2.0 License](https://github.com/janus-idp/backstage-showcase/blob/main/LICENSE).
By contributing, you agree that your contributions will be licensed under the [Apache-2.0 License](https://github.com/redhat-developer/rhdh/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ catalog:
- allow: [Component, System, Group, Resource, Location, Template, API]
locations:
- type: url
target: https://github.com/janus-idp/backstage-showcase/blob/main/catalog-entities/all.yaml
target: https://github.com/redhat-developer/rhdh/blob/main/catalog-entities/all.yaml

- type: url
target: https://github.com/redhat-developer/red-hat-developer-hub-software-templates/blob/main/templates.yaml
Expand Down
2 changes: 1 addition & 1 deletion catalog-entities/apis/nexus-repo-manager-3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ spec:
owner: janus-authors
lifecycle: production
definition:
$openapi: https://github.com/janus-idp/backstage-showcase/blob/main/catalog-entities/apis/nexus-swagger.json
$openapi: https://github.com/redhat-developer/rhdh/blob/main/catalog-entities/apis/nexus-swagger.json
6 changes: 3 additions & 3 deletions catalog-entities/components/showcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ metadata:
annotations:
argocd/app-name: 'janus-idp'
backstage.io/kubernetes-id: 'janus-idp'
github.com/project-slug: janus-idp/backstage-showcase
quay.io/repository-slug: janus-idp/backstage-showcase
backstage.io/techdocs-ref: url:https://github.com/janus-idp/backstage-showcase
github.com/project-slug: redhat-developer/rhdh
quay.io/repository-slug: rhdh-community/rhdh
backstage.io/techdocs-ref: url:https://github.com/redhat-developer/rhdh
backstage.io/kubernetes-namespace: janus-idp-prod
sonarqube.org/project-key: janus-idp_backstage-showcase
spec:
Expand Down
2 changes: 1 addition & 1 deletion catalog-entities/resources/github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
title: GitHub Showcase repository
description: We store our deployment manifests and code for the janus showcase in this GitHub repository.
links:
- url: https://github.com/janus-idp/backstage-showcase
- url: https://github.com/redhat-developer/rhdh
title: GitHub Repository
icon: web
spec:
Expand Down
2 changes: 1 addition & 1 deletion docker/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ If you want an image that runs on Mac M1 (arm64/aarch64) or another architecture
Check out this repo, choose the branch or tag you want to use, then build an image:

```
podman build -f docker/Dockerfile . -t janus-idp/backstage-showcase:local
podman build -f docker/Dockerfile . -t redhat-developer/rhdh:local
```

## Downstream builds
Expand Down
6 changes: 3 additions & 3 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dynamicPlugins:

See [Menu items](dynamic-plugins/frontend-plugin-wiring.md#menu-items) from dynamic-plugins documentation for more details.

See [DefaultMainMenuItems](https://github.com/janus-idp/backstage-showcase/blob/main/packages/app/src/consts.ts#L1) for a list of main menu items, including their default priorities.
See [DefaultMainMenuItems](https://github.com/redhat-developer/rhdh/blob/main/packages/app/src/consts.ts#L1) for a list of main menu items, including their default priorities.

## Changing the favicon and tab title

Expand Down Expand Up @@ -143,12 +143,12 @@ Example configurations:
```
app:
support:
url: https://github.com/janus-idp/backstage-showcase/issues # Used as contact support link on common ErrorPage
url: https://github.com/redhat-developer/rhdh/issues # Used as contact support link on common ErrorPage
items: # Used by common SupportButton component
- title: Issues
icon: github
links:
- url: https://github.com/janus-idp/backstage-showcase/issues
- url: https://github.com/redhat-developer/rhdh/issues
title: GitHub Issues
- title: Join the community
icon: chat
Expand Down
Loading

0 comments on commit 2ea02bb

Please sign in to comment.