Skip to content

Commit

Permalink
Merge branch 'main' into RHIDP-5438
Browse files Browse the repository at this point in the history
  • Loading branch information
nilgaar authored Jan 9, 2025
2 parents 3728f25 + d1caf62 commit a1ca23c
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .github/actions/docker-build/action.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 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
6 changes: 3 additions & 3 deletions .github/workflows/next-build-image.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 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 Expand Up @@ -55,9 +55,9 @@ jobs:
uses: ./.github/actions/docker-build
with:
registry: ${{ env.REGISTRY }}
username: ${{ vars.QUAY_USERNAME }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
imageName: ${{ github.repository }}
imageName: rhdh-community/rhdh
imageTags: |
type=raw,value=next
type=sha,prefix=next-
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr-build-image.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 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 Expand Up @@ -45,7 +45,7 @@ jobs:

- name: Get the latest commits from base branch
run: |
git remote add base-origin https://github.com/janus-idp/backstage-showcase || true
git remote add base-origin https://github.com/${{ github.repository }} || true
git config user.name "${{ github.event.pull_request.user.login }}"
git config user.email "${{ github.event.pull_request.user.email }}"
echo "Updating PR with latest commits from ${{ github.event.pull_request.base.ref }} ..."
Expand All @@ -67,9 +67,9 @@ jobs:
uses: ./.github/actions/docker-build
with:
registry: ${{ env.REGISTRY }}
username: ${{ vars.QUAY_USERNAME }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
imageName: ${{ github.repository }}
imageName: rhdh-community/rhdh
imageTags: |
type=ref,prefix=pr-,event=pr
type=ref,prefix=pr-,suffix=-${{ env.SHORT_SHA }},event=pr
Expand All @@ -85,5 +85,5 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'The image is available at:\n* [`quay.io/${{ github.repository }}:pr-${{ github.event.number }}`](https://quay.io/${{ github.repository }}:pr-${{ github.event.number }}) or\n* [`quay.io/${{ github.repository }}:pr-${{ github.event.number }}-${{ env.SHORT_SHA }}`](https://quay.io/${{ github.repository }}:pr-${{ github.event.number }}-${{ env.SHORT_SHA }})'
body: 'The image is available at:\n* [`quay.io/rhdh-community/rhdh:pr-${{ github.event.number }}`](https://quay.io/rhdh-community/rhdh:pr-${{ github.event.number }}) or\n* [`quay.io/rhdh-community/rhdh:pr-${{ github.event.number }}-${{ env.SHORT_SHA }}`](https://quay.io/rhdh-community/rhdh:pr-${{ github.event.number }}-${{ env.SHORT_SHA }})'
})
80 changes: 0 additions & 80 deletions .github/workflows/techdocs.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/update-backstage.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 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 Expand Up @@ -46,8 +46,8 @@ jobs:
id: generate-token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
with:
app-id: ${{ vars.JANUS_IDP_GITHUB_APP_ID }}
private-key: ${{ secrets.JANUS_IDP_GITHUB_APP_PRIVATE_KEY }}
app-id: ${{ secrets.RHDH_GITHUB_APP_ID }}
private-key: ${{ secrets.RHDH_GITHUB_APP_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/versioned-build-image.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 The Janus IDP Authors
# Copyright 2023-2025 The RHDH Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# on push of a tag, trigger a container build for that tag and push to http://quay.io/janus-idp/backstage-showcase
# on push of a tag, trigger a container build for that tag and push to http://quay.io/rhdh-community/rhdh
name: Versioned

on:
Expand Down Expand Up @@ -57,9 +57,9 @@ jobs:
uses: ./.github/actions/docker-build
with:
registry: ${{ env.REGISTRY }}
username: ${{ vars.QUAY_USERNAME }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
imageName: ${{ github.repository }}
imageName: rhdh-community/rhdh
imageTags: |
type=raw,value=latest,enable=${{ env.is_latest }}
type=semver,pattern={{version}}
Expand Down
6 changes: 1 addition & 5 deletions .ibm/pipelines/jobs/operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,11 @@ initiate_operator_deployments() {
handle_operator() {
oc_login

API_SERVER_URL=$(oc whoami --show-server)
ENCODED_API_SERVER_URL=$(echo "${API_SERVER_URL}" | base64)
ENCODED_CLUSTER_NAME=$(echo "my-cluster" | base64)

export K8S_CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
local url="https://backstage-${RELEASE_NAME}-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}"
local rbac_url="https://backstage-${RELEASE_NAME_RBAC}-${NAME_SPACE_RBAC}.${K8S_CLUSTER_ROUTER_BASE}"

cluster_setup
cluster_setup_operator
initiate_operator_deployments
check_and_test "${RELEASE_NAME}" "${NAME_SPACE}" "${url}"
check_and_test "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC}" "${rbac_url}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@ subjects:
- kind: ServiceAccount
name: rhdh-k8s-plugin
namespace: showcase-operator-nightly
- kind: ServiceAccount
name: rhdh-k8s-plugin
namespace: showcase-op-rbac-nightly
31 changes: 17 additions & 14 deletions .ibm/pipelines/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,33 +107,30 @@ droute_send() {
local max_attempts=5
local wait_seconds=1
for ((i = 1; i <= max_attempts; i++)); do
echo "Attempt ${i} of ${max_attempts} to send test results through Data Router."
if output=$(oc exec -n "${droute_project}" "${droute_pod_name}" -- /bin/bash -c "
/tmp/droute-linux-amd64 send --metadata ${temp_droute}/${metadata_output} \
--url '${DATA_ROUTER_URL}' \
--username '${DATA_ROUTER_USERNAME}' \
--password '${DATA_ROUTER_PASSWORD}' \
--results '${temp_droute}/${JUNIT_RESULTS}' \
--verbose" 2>&1) &&
DATA_ROUTER_REQUEST_ID=$(echo "$output" | grep "request:" | awk '{print $2}') &&
[ -n "$DATA_ROUTER_REQUEST_ID" ]; then

echo "Test results successfully sent through Data Router."
echo "Request ID: $DATA_ROUTER_REQUEST_ID"
return 0
--verbose" 2>&1); then
if DATA_ROUTER_REQUEST_ID=$(echo "$output" | grep "request:" | awk '{print $2}') &&
[ -n "$DATA_ROUTER_REQUEST_ID" ]; then
echo "Test results successfully sent through Data Router."
echo "Request ID: $DATA_ROUTER_REQUEST_ID"
break
fi
fi

if ((i <= max_attempts)); then
echo "Attempt ${i} of ${max_attempts}: Error sending test results through Data Router."
echo "Error details: $output"
sleep "${wait_seconds}"
else
if ((i == max_attempts)); then
echo "Failed to send test results after ${max_attempts} attempts."
echo "Last error: $output"
echo "Last Data Router error details:"
echo "${output}"
echo "Troubleshooting steps:"
echo "1. Restart $droute_pod_name in $droute_project project/namespace"
echo "2. Check the Data Router documentation: https://spaces.redhat.com/pages/viewpage.action?pageId=115488042"
echo "3. Ask for help at Slack: #forum-dno-datarouter"
return 1
fi
done

Expand Down Expand Up @@ -679,6 +676,12 @@ cluster_setup() {
add_helm_repos
}

cluster_setup_operator() {
install_pipelines_operator
install_acm_operator
install_crunchy_postgres_operator
}

initiate_deployments() {
configure_namespace ${NAME_SPACE}

Expand Down

0 comments on commit a1ca23c

Please sign in to comment.