Public Access
TASK: Replace integration lane with post-build backend runtime black-box tests #72
@@ -312,10 +312,12 @@ jobs:
|
||||
set -euo pipefail
|
||||
set -o pipefail
|
||||
|
||||
RUN_ID="${GITHUB_RUN_ID:-local}"
|
||||
RUN_ATTEMPT="${GITHUB_RUN_ATTEMPT:-1}"
|
||||
LOG_FILE="$(mktemp)"
|
||||
NETWORK_NAME="plex-blackbox-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||
DB_CONTAINER="plex-blackbox-db-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||
BACKEND_CONTAINER="plex-blackbox-backend-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||
NETWORK_NAME="plex-blackbox-${RUN_ID}-${RUN_ATTEMPT}"
|
||||
DB_CONTAINER="plex-blackbox-db-${RUN_ID}-${RUN_ATTEMPT}"
|
||||
BACKEND_CONTAINER="plex-blackbox-backend-${RUN_ID}-${RUN_ATTEMPT}"
|
||||
DB_PASSWORD="plex_password"
|
||||
DB_URL="postgresql://plex_user:${DB_PASSWORD}@${DB_CONTAINER}:5432/plex_playlist"
|
||||
|
||||
|
||||
@@ -243,6 +243,7 @@ jobs:
|
||||
run: |
|
||||
echo "=== Running Renovate Bot ==="
|
||||
TARGET_REPO="DarkHelm.org/plex-playlist"
|
||||
TARGET_ORG="${TARGET_REPO%%/*}"
|
||||
|
||||
RENOVATE_ENDPOINT_EFFECTIVE="${RENOVATE_ENDPOINT%/}"
|
||||
if [[ "${RENOVATE_ENDPOINT_EFFECTIVE}" == */api/v1 ]]; then
|
||||
@@ -280,12 +281,17 @@ jobs:
|
||||
-H "Authorization: token ${candidate_value}" \
|
||||
"${API_ENDPOINT}/repos/${TARGET_REPO}" || true)
|
||||
|
||||
if [ "${USER_STATUS}" = "200" ] && [ "${REPO_STATUS}" = "200" ]; then
|
||||
ORG_STATUS=$(curl -sS -o /tmp/renovate-auth-check-org.json -w "%{http_code}" \
|
||||
${CURL_INSECURE_FLAG} \
|
||||
-H "Authorization: token ${candidate_value}" \
|
||||
"${API_ENDPOINT}/orgs/${TARGET_ORG}" || true)
|
||||
|
||||
if [ "${USER_STATUS}" = "200" ] && [ "${REPO_STATUS}" = "200" ] && [ "${ORG_STATUS}" = "200" ]; then
|
||||
echo "${candidate_name}:${candidate_value}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "⚠ Token candidate ${candidate_name} rejected (user=${USER_STATUS}, repo=${REPO_STATUS})"
|
||||
echo "⚠ Token candidate ${candidate_name} rejected (user=${USER_STATUS}, repo=${REPO_STATUS}, org=${ORG_STATUS})"
|
||||
done
|
||||
|
||||
return 1
|
||||
@@ -294,7 +300,7 @@ jobs:
|
||||
if ! SELECTED_TOKEN_RESULT="$(select_token_with_repo_access)"; then
|
||||
echo "❌ No token available for Renovate authentication with repository access"
|
||||
echo "Configure RENOVATE_TOKEN with repo+issue write and organization/user read scopes."
|
||||
echo "Token preflight checks attempted: ${API_ENDPOINT}/user and ${API_ENDPOINT}/repos/${TARGET_REPO}"
|
||||
echo "Token preflight checks attempted: ${API_ENDPOINT}/user, ${API_ENDPOINT}/repos/${TARGET_REPO}, and ${API_ENDPOINT}/orgs/${TARGET_ORG}"
|
||||
if [ -s /tmp/renovate-auth-check-user.json ]; then
|
||||
echo "Last user endpoint response body:"
|
||||
cat /tmp/renovate-auth-check-user.json || true
|
||||
@@ -303,6 +309,10 @@ jobs:
|
||||
echo "Last repo endpoint response body:"
|
||||
cat /tmp/renovate-auth-check-repo.json || true
|
||||
fi
|
||||
if [ -s /tmp/renovate-auth-check-org.json ]; then
|
||||
echo "Last org endpoint response body:"
|
||||
cat /tmp/renovate-auth-check-org.json || true
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -315,7 +325,10 @@ jobs:
|
||||
|
||||
# Run Renovate with configuration
|
||||
if [ "${RENOVATE_DRY_RUN}" = "true" ]; then
|
||||
export RENOVATE_DRY_RUN="full"
|
||||
echo "🔍 Running in DRY-RUN mode (no changes will be made)"
|
||||
else
|
||||
unset RENOVATE_DRY_RUN
|
||||
fi
|
||||
|
||||
renovate --platform "${RENOVATE_PLATFORM}" --endpoint "${RENOVATE_ENDPOINT}" DarkHelm.org/plex-playlist
|
||||
|
||||
Reference in New Issue
Block a user