Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
368dcc0
Creating Nightly test for RHDH Local
OpinionatedHeron Mar 12, 2026
2facc5e
Merge pull request #2 from OpinionatedHeron/nightlyWorkflow
OpinionatedHeron Mar 12, 2026
ea75213
Updating tests due to failures
OpinionatedHeron Mar 12, 2026
4f95539
Merge pull request #3 from OpinionatedHeron/nightlyWorkflow
OpinionatedHeron Mar 12, 2026
93882d1
Updating github-script to use correct Node version
OpinionatedHeron Mar 13, 2026
7097bdd
Merge pull request #4 from OpinionatedHeron/nightlyWorkflow
OpinionatedHeron Mar 13, 2026
229dbf5
Merge branch 'redhat-developer:main' into main
OpinionatedHeron Mar 23, 2026
3712104
Updating matrix and rhdh_tag, and removing arm
OpinionatedHeron Mar 24, 2026
5a6f71f
Merge branch 'redhat-developer:main' into main
OpinionatedHeron Apr 1, 2026
1cf1dc0
Merge branch 'redhat-developer:main' into main
OpinionatedHeron Apr 8, 2026
1adb6a4
Creating composite actions
OpinionatedHeron Apr 9, 2026
61e3312
Merge branch 'main' of https://github.com/OpinionatedHeron/rhdh-local
OpinionatedHeron Apr 9, 2026
2c7fecb
Adding actions to fix test error
OpinionatedHeron Apr 9, 2026
dd48733
Updating based on test errors
OpinionatedHeron Apr 9, 2026
4920d94
Updating based on errors in nightly tests
OpinionatedHeron Apr 9, 2026
2d45533
Testing to fix failures
OpinionatedHeron Apr 9, 2026
0517605
Using tags to decide what branches to test
OpinionatedHeron Apr 16, 2026
fff762a
Merge branch 'redhat-developer:main' into main
OpinionatedHeron Apr 16, 2026
2aeb455
Changes based on test errors
OpinionatedHeron Apr 16, 2026
1009d1d
Merge branch 'main' of https://github.com/OpinionatedHeron/rhdh-local
OpinionatedHeron Apr 16, 2026
26173cd
Adjusting due to test errors
OpinionatedHeron Apr 16, 2026
d5fe884
Merge branch 'redhat-developer:main' into main
OpinionatedHeron Apr 20, 2026
936699b
Updating discover branches - checking 3 release branches
OpinionatedHeron Apr 20, 2026
13778b7
Merge branch 'main' of https://github.com/OpinionatedHeron/rhdh-local
OpinionatedHeron Apr 20, 2026
207451f
Merge branch 'redhat-developer:main' into main
OpinionatedHeron Apr 20, 2026
174f6d8
Updating action based on github security issue
OpinionatedHeron Apr 20, 2026
31e02b0
Merge branch 'main' of https://github.com/OpinionatedHeron/rhdh-local
OpinionatedHeron Apr 20, 2026
355fe63
Adding comment re number of release branches tested
OpinionatedHeron Apr 23, 2026
31713d9
Merge branch 'redhat-developer:main' into main
OpinionatedHeron Apr 27, 2026
ca62fc7
Fixing flagged errors by qodo
OpinionatedHeron Apr 27, 2026
c3328ac
Merge branch 'main' into main
OpinionatedHeron Apr 28, 2026
9a33d7d
Making fixes and removing unnecessary lines
OpinionatedHeron Apr 30, 2026
1561ef8
Removing unnecessary parameters from test files
OpinionatedHeron Apr 30, 2026
32d2e8b
Making change to fix nightly test
OpinionatedHeron Apr 30, 2026
12bdf46
Merge branch 'redhat-developer:main' into main
OpinionatedHeron May 5, 2026
995684f
Set appropriate tag for catalog index
OpinionatedHeron May 5, 2026
f50d317
Test to identify failure reason
OpinionatedHeron May 6, 2026
ef5e8e5
Testing another fix
OpinionatedHeron May 6, 2026
e30aaf9
Removing catalog index block to assess failure reason
OpinionatedHeron May 6, 2026
f335283
Updating catalog index tag script
OpinionatedHeron May 7, 2026
2d9b6d8
Removing blank spaces
OpinionatedHeron May 7, 2026
5ec6cb6
Updating catalog index to use correct tag
OpinionatedHeron May 7, 2026
d513065
Adding create .env to override defaults
OpinionatedHeron May 7, 2026
3bd6382
Updating .env to append
OpinionatedHeron May 15, 2026
309277c
Removing deprecated backend.auth.keys
OpinionatedHeron May 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
283 changes: 283 additions & 0 deletions .github/actions/rhdh-local-compose-test/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,283 @@
name: "Test Composite Action"
description: "Sets RHDH_TAG and RHDH_IMAGE based on the branch name for
container image selection for testing purposes"

inputs:
git_ref:
description: Branch to checkout (e.g. main, release-1.0, release-1.1)
required: true
container_tool:
description: Container tool to use (e.g. docker, podman)
required: true
compose_cli_args:
description: Args for `docker compose` or `podman compose` command
required: false
default: ""
compose_config_name:
description: Compose config name to use (e.g. default, dynamic-plugins-root)
required: true
user_config_enabled:
description: "\"true\" or \"false\" to enable user-specific configuration"
required: true
docker_compose_version:
description: Version of docker-compose to install
required: true
podman_image:
description: Image to use for Podman container
required: true
corporate_proxy_image:
description: Image to use for Corporate Proxy container
required: true
rhdh_tag_override:
description: If set, override the RHDH tag with the value of this input
required: false
default: ""
actions_runner_debug:
description: Adding actions_runner_debug variable value
required: false
default: "false"
log_level:
description: Log level to use
required: false
default: "info"

runs:
using: "composite"
steps:
# Set RHDH_TAG and RHDH_IMAGE based on the branch name for container image selection
- name: Set RHDH tag, image and catalog index
shell: bash
env:
INPUT_TAG: ${{ inputs.rhdh_tag_override }}
BRANCH: ${{ inputs.git_ref }}
run: |
if [ -n "$INPUT_TAG" ]; then TAG="$INPUT_TAG"
elif [ "$BRANCH" = "main" ]; then TAG="next"
elif [[ "$BRANCH" =~ ^release-[0-9]+\.[0-9]+$ ]]; then TAG="next-${BRANCH#release-}"
else TAG="next"; fi

echo "RHDH_TAG=$TAG" >> "$GITHUB_ENV"
echo "RHDH_IMAGE=quay.io/rhdh-community/rhdh:$TAG" >> "$GITHUB_ENV"

# Extract CATALOG_INDEX_IMAGE from default.env if it exists, and set as environment variable for use in tests (e.g. for pull-through cache testing)
if [ "$BRANCH" = "main" ]; then
CATALOG_TAG="next"
CATALOG_IMAGE="quay.io/rhdh/plugin-catalog-index:$CATALOG_TAG"
echo "CATALOG_INDEX_IMAGE=$CATALOG_IMAGE" >> "$GITHUB_ENV"
echo "Set CATALOG_INDEX_IMAGE based on branch name: $CATALOG_IMAGE"
elif [ -f "default.env" ] && grep -q "^CATALOG_INDEX_IMAGE=" default.env; then
CATALOG_IMAGE=$(grep "^CATALOG_INDEX_IMAGE=" default.env | cut -d '=' -f2-)
echo "CATALOG_INDEX_IMAGE=$CATALOG_IMAGE" >> "$GITHUB_ENV"
echo "Set CATALOG_INDEX_IMAGE from default.env: $CATALOG_IMAGE"
else
echo "CATALOG_INDEX_IMAGE not found in default.env, skipping"
fi

- name: Remove Conflicting Packages
shell: bash
run: |
# Remove any previous installations of Podman and Docker
for pkg in docker.io \
docker-doc \
docker-compose \
docker-compose-v2 \
podman-docker \
containerd \
crun \
runc \
buildah \
; do
sudo apt-get remove --purge -y $pkg || true
done

- name: Update Docker version
shell: bash
env:
DOCKER_COMPOSE_VERSION: v5.0.1
run: |
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin

# Install standalone docker-compose for consistent version across docker/podman tests
echo "Installing docker-compose $DOCKER_COMPOSE_VERSION..."
sudo curl -fsSL "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-$(uname -m)" \
-o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# Also install as Docker CLI plugin
sudo mkdir -p /usr/local/lib/docker/cli-plugins
sudo ln -sf /usr/local/bin/docker-compose /usr/local/lib/docker/cli-plugins/docker-compose

- name: Setup Podman container environment
id: setup-podman
if: ${{ inputs.container_tool == 'podman' }}
uses: rm3l/setup-containerized-podman@7e2e9a2ddc2da87cbe754c0ed8975b7368388f56 # v2.0.0
with:
podman-image: quay.io/podman/stable:v5
compose-provider: docker-compose
docker-compose-version: v5.0.1
env: |
CORPORATE_PROXY_IMAGE=docker.io/ubuntu/squid:latest

- name: Display container engine version
shell: bash
env:
TOOL: ${{ inputs.container_tool }}
run: |
echo "*** $TOOL version ***"
$TOOL version
echo
echo "*** $TOOL compose version ***"
$TOOL compose version

- name: ${{ inputs.container_tool }} info
shell: bash
env:
TOOL: ${{ inputs.container_tool }}
run: $TOOL info

- name: Compose config
shell: bash
env:
TOOL: ${{ inputs.container_tool }}
CLI_ARGS: ${{ inputs.compose_cli_args }}
CATALOG_INDEX_IMAGE: ${{ env.CATALOG_INDEX_IMAGE }}
run: $TOOL compose $CLI_ARGS config

- name: Create .env file to override defaults
shell: bash
run: |
echo "CATALOG_INDEX_IMAGE=${{ env.CATALOG_INDEX_IMAGE }}" > .env
echo "RHDH_IMAGE=${{ env.RHDH_IMAGE }}" >> .env
cat .env

- name: Add user-specific configuration
if: ${{ inputs.user_config_enabled == 'true' }}
shell: bash
env:
# https://docs.github.com/en/actions/how-tos/monitor-workflows/enable-debug-logging#enabling-runner-diagnostic-logging
LOG_LEVEL: ${{ env.ACTIONS_RUNNER_DEBUG == 'true' && 'debug' || 'info' }}
run: |
# Custom .env file
cat <<EOF >> .env
LOG_LEVEL=$LOG_LEVEL
ROARR_LOG=true
NODE_DEBUG=fetch

GITHUB_APP_APP_ID=123456
GITHUB_APP_CLIENT_ID=MY_GITHUB_APP_CLIENT_ID
GITHUB_APP_CLIENT_SECRET=MY_GITHUB_APP_CLIENT_SECRET
GITHUB_APP_WEBHOOK_SECRET=MY_GITHUB_APP_WEBHOOK_SECRET
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nxxx\n-----END RSA PRIVATE KEY-----" # notsecret

EOF

# Custom dynamic-plugins.override.yaml
cat <<EOF > configs/dynamic-plugins/dynamic-plugins.override.yaml
includes: [dynamic-plugins.default.yaml]
plugins:
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import-backend-dynamic
disabled: false
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import
disabled: false
EOF

# Custom extra files
cp -vr configs/extra-files/github-app-credentials.example.yaml configs/extra-files/github-app-credentials.yaml

# Custom app-config.local.yaml
cp -vr configs/app-config/app-config.local.example.yaml configs/app-config/app-config.local.yaml

# Custom users.override.yaml
cp configs/catalog-entities/users.override.example.yaml configs/catalog-entities/users.override.yaml

# Custom components.override.yaml
cp configs/catalog-entities/components.override.example.yaml configs/catalog-entities/components.override.yaml

- name: Create dynamic plugins directory
if: ${{ inputs.compose_config_name == 'dynamic-plugins-root' }}
shell: bash
run: |
mkdir -p dynamic-plugins-root

- name: Start app
shell: bash
env:
TOOL: ${{ inputs.container_tool }}
CLI_ARGS: ${{ inputs.compose_cli_args }}
CATALOG_INDEX_IMAGE: ${{ env.CATALOG_INDEX_IMAGE }}
run: |
$TOOL compose $CLI_ARGS up --detach --quiet-pull
$TOOL compose $CLI_ARGS ps

- name: Wait for HTTP 200 response from homepage
shell: bash
run: |
max=50
i=0
echo "Waiting for localhost to respond with status code 200..."
until curl -i --head --fail http://localhost:7007; do
i=$((i+1))
if [ "$i" -ge "$max" ]; then
echo "[$(date)] Max retries reached. Exiting. Take a look at the logs in the step below."
exit 1
fi
echo "($i/$max) [$(date)] Waiting for http://localhost:7007 to return HTTP 200..."
sleep 10
done
echo "[$(date)] RHDH is ready"
curl -i --insecure http://localhost:7007

- name: curl from RHDH Container (for troubleshooting)
if: failure()
shell: bash
env:
TOOL: ${{ inputs.container_tool }}
CLI_ARGS: ${{ inputs.compose_cli_args }}
run: |
$TOOL exec rhdh curl -i --head --fail http://localhost:7007

- name: Compose logs
if: always()
shell: bash
env:
TOOL: ${{ inputs.container_tool }}
CLI_ARGS: ${{ inputs.compose_cli_args }}
run: |
for svc in $($TOOL compose $CLI_ARGS config --services | sort); do
echo "*** $svc ***"
$TOOL compose $CLI_ARGS logs --timestamps "$svc" || true
echo "************"
echo
done

- name: Tear down
if: always()
shell: bash
env:
TOOL: ${{ inputs.container_tool }}
CLI_ARGS: ${{ inputs.compose_cli_args }}
run: |
$TOOL compose $CLI_ARGS ps || true
$TOOL compose $CLI_ARGS down --volumes || true

- name: Cleanup Podman container environment
if: ${{ always() && inputs.container_tool == 'podman' }}
shell: bash
run: |
docker container stop ${{ steps.setup-podman.outputs.container-name }} || true
docker container rm ${{ steps.setup-podman.outputs.container-name }} || true
95 changes: 95 additions & 0 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Nightly tests

on:
workflow_dispatch:
schedule:
- cron: "34 23 * * *"

concurrency:
group: ${{ github.workflow}}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Lint
run: |
npx --yes dclint .

# Finds new release branches at runtime; no workflow edit when new releases are created
discover-branches:
runs-on: ubuntu-latest
outputs:
branches: ${{ steps.set-branches.outputs.branches }}
steps:
- uses: actions/github-script@v8
id: set-branches
with:
script: |
const branches = await github.paginate(github.rest.repos.listBranches, {
owner: context.repo.owner,
repo: context.repo.repo,
});

// Keep main and the latest 3 release branches (e.g. release-1.2, release-1.1, release-1.0) - to cover EOL branches and period between FF and GA of new releases
const topReleaseBranches = branches
.map(b => b.name)
.filter(name => /^release-\d+\.\d+$/.test(name))
.sort((a, b) => b.localeCompare(a, undefined, { numeric: true }))
.slice(0, 3);

core.setOutput('branches', JSON.stringify(['main', ...topReleaseBranches]));
test:
needs: discover-branches
strategy:
fail-fast: false
matrix:
branch: ${{ fromJson(needs.discover-branches.outputs.branches) }}
os:
- ubuntu-24.04
- ubuntu-24.04-arm
tool:
- docker
- podman
userConfig:
- "false"
- "true"
composeConfig:
- name: "default"
cliArgs: ""
- name: "corporate-proxy"
cliArgs: "-f compose.yaml -f compose-with-corporate-proxy.yaml"
- name: "dynamic-plugins-root"
cliArgs: "-f compose.yaml -f compose-dynamic-plugins-root.yaml"
- name: "orchestrator-workflow"
cliArgs: "-f compose.yaml -f orchestrator/compose.yaml"
- name: "developer-lightspeed"
cliArgs: "-f compose.yaml -f developer-lightspeed/compose.yaml"

name: "${{ matrix.branch }} - ${{ matrix.tool }} compose - ${{
matrix.composeConfig.name }}${{ matrix.os != 'ubuntu-24.04' && format(' -
{0}', matrix.os) || '' }}${{ matrix.userConfig == 'true' && ' - user
config' || '' }}"
runs-on: ${{ matrix.os }}
env:
DOCKER_COMPOSE_VERSION: v5.0.1
PODMAN_IMAGE: quay.io/podman/stable:v5
CORPORATE_PROXY_IMAGE: docker.io/ubuntu/squid:latest
ACTIONS_RUNNER_DEBUG: ${{ vars.ACTIONS_RUNNER_DEBUG }}

steps:
# Checkout a ref that contains .github/actions/*. schedule: github.ref_name is always the default branch.
# workflow_dispatch: use default_branch (trigger ref may be release-* without the composite on that branch).
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
fetch-depth: 1
- uses: ./.github/actions/rhdh-local-compose-test
with:
git_ref: ${{ matrix.branch }}
container_tool: ${{ matrix.tool }}
compose_cli_args: ${{ matrix.composeConfig.cliArgs }}
compose_config_name: ${{ matrix.composeConfig.name }}
user_config_enabled: ${{ matrix.userConfig }}
Loading
Loading