fix(infra): replace legacy klz fallback references with etib across docker compose and test scripts
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 19s
Build & Deploy / 🧪 QA (push) Successful in 1m25s
Build & Deploy / 🏗️ Build (push) Successful in 2m44s
Build & Deploy / 🚀 Deploy (push) Successful in 24s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 51s
Build & Deploy / 🔔 Notify (push) Successful in 3s
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 19s
Build & Deploy / 🧪 QA (push) Successful in 1m25s
Build & Deploy / 🏗️ Build (push) Successful in 2m44s
Build & Deploy / 🚀 Deploy (push) Successful in 24s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 51s
Build & Deploy / 🔔 Notify (push) Successful in 3s
This commit is contained in:
@@ -31,22 +31,23 @@ fi
|
||||
get_media_path() {
|
||||
case "$1" in
|
||||
local) echo "$LOCAL_MEDIA_DIR" ;;
|
||||
testing) echo "/var/lib/docker/volumes/klz-testing_klz_media_data/_data" ;;
|
||||
staging) echo "/var/lib/docker/volumes/klz-staging_klz_media_data/_data" ;;
|
||||
prod|production) echo "/var/lib/docker/volumes/klz-cablescom_klz_media_data/_data" ;;
|
||||
testing) echo "/var/lib/docker/volumes/etib-testing_etib_media_data/_data" ;;
|
||||
staging) echo "/var/lib/docker/volumes/etib-staging_etib_media_data/_data" ;;
|
||||
prod|production) echo "/var/lib/docker/volumes/e-tibcom_etib_media_data/_data" ;;
|
||||
*) echo "❌ Unknown environment: $1"; exit 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_app_container() {
|
||||
case "$1" in
|
||||
testing) echo "klz-testing-klz-app-1" ;;
|
||||
staging) echo "klz-staging-klz-app-1" ;;
|
||||
prod|production) echo "klz-cablescom-klz-app-1" ;;
|
||||
testing) echo "etib-testing-etib-app-1" ;;
|
||||
staging) echo "etib-staging-etib-app-1" ;;
|
||||
prod|production) echo "e-tibcom-etib-app-1" ;;
|
||||
*) echo "" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
SRC_PATH=$(get_media_path "$SOURCE_ENV")
|
||||
TGT_PATH=$(get_media_path "$TARGET_ENV")
|
||||
TGT_CONTAINER=$(get_app_container "$TARGET_ENV")
|
||||
|
||||
@@ -15,7 +15,8 @@ export NEXT_PUBLIC_CI=true
|
||||
export CI=true
|
||||
|
||||
docker network create infra 2>/dev/null || true
|
||||
docker volume create klz_db_data 2>/dev/null || true
|
||||
docker volume create etib_db_data 2>/dev/null || true
|
||||
|
||||
|
||||
# 2. Start infra services (DB, CMS, Gatekeeper)
|
||||
echo "📦 Starting infrastructure services..."
|
||||
|
||||
@@ -7,7 +7,8 @@ const targetUrl =
|
||||
process.env.NEXT_PUBLIC_BASE_URL ||
|
||||
'http://localhost:3000';
|
||||
const limit = process.env.ASSET_CHECK_LIMIT ? parseInt(process.env.ASSET_CHECK_LIMIT) : 20;
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'etib2026';
|
||||
const authCookieName = process.env.AUTH_COOKIE_NAME || 'etib_gatekeeper_session';
|
||||
|
||||
async function main() {
|
||||
console.log(`\n🚀 Starting Strict Asset Integrity Check for: ${targetUrl}`);
|
||||
@@ -20,9 +21,10 @@ async function main() {
|
||||
try {
|
||||
console.log(`📥 Fetching sitemap from ${sitemapUrl}...`);
|
||||
const response = await axios.get(sitemapUrl, {
|
||||
headers: { Cookie: `klz_gatekeeper_session=${gatekeeperPassword}` },
|
||||
headers: { Cookie: `${authCookieName}=${gatekeeperPassword}` },
|
||||
});
|
||||
|
||||
|
||||
const $ = cheerio.load(response.data, { xmlMode: true });
|
||||
urls = $('url loc')
|
||||
.map((i, el) => $(el).text())
|
||||
@@ -64,7 +66,7 @@ async function main() {
|
||||
|
||||
// Inject Gatekeeper session bypassing auth screens
|
||||
await page.setCookie({
|
||||
name: 'klz_gatekeeper_session',
|
||||
name: authCookieName,
|
||||
value: gatekeeperPassword,
|
||||
domain: new URL(targetUrl).hostname,
|
||||
path: '/',
|
||||
|
||||
@@ -3,7 +3,8 @@ import axios from 'axios';
|
||||
import * as cheerio from 'cheerio';
|
||||
|
||||
const targetUrl = process.argv[2] || process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'etib2026';
|
||||
const authCookieName = process.env.AUTH_COOKIE_NAME || 'etib_gatekeeper_session';
|
||||
|
||||
// Utility for hardcoded delays
|
||||
const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
@@ -20,7 +21,7 @@ async function main() {
|
||||
while (Date.now() - startTime < maxWaitMs) {
|
||||
try {
|
||||
const resp = await axios.get(targetUrl, {
|
||||
headers: { Cookie: `klz_gatekeeper_session=${gatekeeperPassword}` },
|
||||
headers: { Cookie: `${authCookieName}=${gatekeeperPassword}` },
|
||||
timeout: 5000,
|
||||
validateStatus: (s) => s === 200,
|
||||
});
|
||||
@@ -50,7 +51,7 @@ async function main() {
|
||||
try {
|
||||
console.log(`📥 Fetching sitemap from ${sitemapUrl}...`);
|
||||
const response = await axios.get(sitemapUrl, {
|
||||
headers: { Cookie: `klz_gatekeeper_session=${gatekeeperPassword}` },
|
||||
headers: { Cookie: `${authCookieName}=${gatekeeperPassword}` },
|
||||
});
|
||||
|
||||
const $ = cheerio.load(response.data, { xmlMode: true });
|
||||
|
||||
@@ -5,7 +5,8 @@ import * as path from 'path';
|
||||
import { execSync } from 'child_process';
|
||||
|
||||
const targetUrl = process.argv[2] || process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'etib2026';
|
||||
const authCookieName = process.env.AUTH_COOKIE_NAME || 'etib_gatekeeper_session';
|
||||
|
||||
async function main() {
|
||||
console.log(`\n🚀 Starting HTML Validation for: ${targetUrl}`);
|
||||
@@ -16,10 +17,11 @@ async function main() {
|
||||
console.log(`📥 Fetching sitemap from ${sitemapUrl}...`);
|
||||
|
||||
const response = await axios.get(sitemapUrl, {
|
||||
headers: { Cookie: `klz_gatekeeper_session=${gatekeeperPassword}` },
|
||||
headers: { Cookie: `${authCookieName}=${gatekeeperPassword}` },
|
||||
validateStatus: (status) => status < 400,
|
||||
});
|
||||
|
||||
|
||||
const $ = cheerio.load(response.data, { xmlMode: true });
|
||||
let urls = $('url loc')
|
||||
.map((i, el) => $(el).text())
|
||||
@@ -47,10 +49,11 @@ async function main() {
|
||||
const u = urls[i];
|
||||
try {
|
||||
const res = await axios.get(u, {
|
||||
headers: { Cookie: `klz_gatekeeper_session=${gatekeeperPassword}` },
|
||||
headers: { Cookie: `${authCookieName}=${gatekeeperPassword}` },
|
||||
validateStatus: (status) => status < 400,
|
||||
});
|
||||
|
||||
|
||||
// Generate a safe filename that retains URL information
|
||||
const urlStr = new URL(u);
|
||||
const safePath = (urlStr.pathname + urlStr.search).replace(/[^a-zA-Z0-9]/g, '_');
|
||||
|
||||
@@ -2,7 +2,8 @@ import axios from 'axios';
|
||||
import * as cheerio from 'cheerio';
|
||||
|
||||
const targetUrl = process.argv[2] || process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'etib2026';
|
||||
const authCookieName = process.env.AUTH_COOKIE_NAME || 'etib_gatekeeper_session';
|
||||
|
||||
async function main() {
|
||||
console.log(`\n🚀 Starting HTTP Sitemap Validation for: ${targetUrl}\n`);
|
||||
@@ -12,10 +13,11 @@ async function main() {
|
||||
console.log(`📥 Fetching sitemap from ${sitemapUrl}...`);
|
||||
|
||||
const response = await axios.get(sitemapUrl, {
|
||||
headers: { Cookie: `klz_gatekeeper_session=${gatekeeperPassword}` },
|
||||
headers: { Cookie: `${authCookieName}=${gatekeeperPassword}` },
|
||||
validateStatus: (status) => status < 400,
|
||||
});
|
||||
|
||||
|
||||
const $ = cheerio.load(response.data, { xmlMode: true });
|
||||
let urls = $('url loc')
|
||||
.map((i, el) => $(el).text())
|
||||
@@ -42,10 +44,11 @@ async function main() {
|
||||
const u = urls[i];
|
||||
try {
|
||||
const res = await axios.get(u, {
|
||||
headers: { Cookie: `klz_gatekeeper_session=${gatekeeperPassword}` },
|
||||
headers: { Cookie: `${authCookieName}=${gatekeeperPassword}` },
|
||||
validateStatus: null, // Don't throw on error status
|
||||
});
|
||||
|
||||
|
||||
if (res.status >= 400) {
|
||||
console.error(`❌ ERROR ${res.status}: ${res.statusText} -> ${u}`);
|
||||
hasErrors = true;
|
||||
|
||||
@@ -12,7 +12,8 @@ import * as cheerio from 'cheerio';
|
||||
*/
|
||||
|
||||
const targetUrl = process.argv[2] || process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'etib2026';
|
||||
const authCookieName = process.env.AUTH_COOKIE_NAME || 'etib_gatekeeper_session';
|
||||
|
||||
// Expected slug translations: German key → English value
|
||||
const SLUG_MAP: Record<string, string> = {
|
||||
@@ -32,7 +33,8 @@ const REVERSE_SLUG_MAP: Record<string, string> = Object.fromEntries(
|
||||
Object.entries(SLUG_MAP).map(([de, en]) => [en, de]),
|
||||
);
|
||||
|
||||
const headers = { Cookie: `klz_gatekeeper_session=${gatekeeperPassword}` };
|
||||
const headers = { Cookie: `${authCookieName}=${gatekeeperPassword}` };
|
||||
|
||||
|
||||
function getExpectedTranslation(
|
||||
sourcePath: string,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import axios from 'axios';
|
||||
|
||||
const targetUrl = process.argv[2] || process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'etib2026';
|
||||
const authCookieName = process.env.AUTH_COOKIE_NAME || 'etib_gatekeeper_session';
|
||||
|
||||
const requiredHeaders = [
|
||||
'strict-transport-security',
|
||||
@@ -15,10 +16,11 @@ async function main() {
|
||||
console.log(`\n🛡️ Starting Security Headers Scan for: ${targetUrl}\n`);
|
||||
try {
|
||||
const response = await axios.head(targetUrl, {
|
||||
headers: { Cookie: `klz_gatekeeper_session=${gatekeeperPassword}` },
|
||||
headers: { Cookie: `${authCookieName}=${gatekeeperPassword}` },
|
||||
validateStatus: () => true,
|
||||
});
|
||||
|
||||
|
||||
const headers = response.headers;
|
||||
let allPassed = true;
|
||||
|
||||
|
||||
@@ -7,9 +7,10 @@ module.exports = async (browser, context) => {
|
||||
// Using LHCI_URL or TARGET_URL if available
|
||||
const targetUrl =
|
||||
process.env.LHCI_URL || process.env.TARGET_URL || 'https://testing.e-tib.com';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'etib2026';
|
||||
const authCookieName = process.env.AUTH_COOKIE_NAME || 'etib_gatekeeper_session';
|
||||
|
||||
|
||||
console.log(`🔑 LHCI Auth: Setting gatekeeper cookie (${authCookieName}) for ${new URL(targetUrl).hostname}...`);
|
||||
|
||||
await page.setCookie({
|
||||
|
||||
@@ -18,9 +18,10 @@ const targetUrl =
|
||||
process.env.LHCI_URL ||
|
||||
'http://localhost:3000';
|
||||
const limit = process.env.PAGESPEED_LIMIT ? parseInt(process.env.PAGESPEED_LIMIT) : 20; // Default limit to avoid infinite runs
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'etib2026';
|
||||
const authCookieName = process.env.AUTH_COOKIE_NAME || 'etib_gatekeeper_session';
|
||||
|
||||
|
||||
async function main() {
|
||||
console.log(`\n🚀 Starting PageSpeed test for: ${targetUrl}`);
|
||||
console.log(`📊 Limit: ${limit} pages\n`);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import puppeteer from 'puppeteer';
|
||||
|
||||
const targetUrl = process.argv[2] || process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'etib2026';
|
||||
|
||||
|
||||
async function run() {
|
||||
console.log(`🚀 Smoke Test: ${targetUrl}`);
|
||||
|
||||
@@ -14,7 +14,8 @@ import * as path from 'path';
|
||||
|
||||
const targetUrl = process.argv[2] || process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000';
|
||||
const limit = process.env.PAGESPEED_LIMIT ? parseInt(process.env.PAGESPEED_LIMIT) : 20;
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'etib2026';
|
||||
const authCookieName = process.env.AUTH_COOKIE_NAME || 'etib_gatekeeper_session';
|
||||
|
||||
async function main() {
|
||||
console.log(`\n🚀 Starting WCAG Audit for: ${targetUrl}`);
|
||||
@@ -27,11 +28,12 @@ async function main() {
|
||||
|
||||
const response = await axios.get(sitemapUrl, {
|
||||
headers: {
|
||||
Cookie: `klz_gatekeeper_session=${gatekeeperPassword}`,
|
||||
Cookie: `${authCookieName}=${gatekeeperPassword}`,
|
||||
},
|
||||
validateStatus: (status) => status < 400,
|
||||
});
|
||||
|
||||
|
||||
const $ = cheerio.load(response.data, { xmlMode: true });
|
||||
let urls = $('url loc')
|
||||
.map((i, el) => $(el).text())
|
||||
@@ -92,8 +94,9 @@ async function main() {
|
||||
],
|
||||
},
|
||||
headers: {
|
||||
Cookie: `klz_gatekeeper_session=${gatekeeperPassword}`,
|
||||
Cookie: `${authCookieName}=${gatekeeperPassword}`,
|
||||
},
|
||||
|
||||
timeout: 60000, // Increase timeout for slower pages
|
||||
},
|
||||
urls: urls,
|
||||
|
||||
Reference in New Issue
Block a user