Commit graph

6 commits

Author SHA1 Message Date
c6c912b809 fix: remove duplicate itsulu_social_id field and fix CI addons path
- Remove duplicate BlogPost._inherit class from blog_schedule.py that
  redefined itsulu_social_id with invalid 'limit' parameter, causing
  'unknown parameter limit' warnings on every Odoo startup
- Use $CI_PROJECT_DIR instead of /builds/$CI_PROJECT_PATH for addons
  path in unit_tests — CI_PROJECT_DIR is the correct GitLab predefined
  variable that works across all runner types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 02:20:54 -04:00
8148b9eb3a fix: correct CI pipeline stage ordering and DB auth issues
- Add e2e stage after build so e2e_tests runs after build_image
- Remove git clone from test runner (addon is already in Docker image)
- Fix kubectl context: remove use-context call, kubeconfig already has correct context
- Add PGPASSWORD export to unit_tests before_script and script
- Add --junitxml flag to unit_tests so junit artifact is actually generated
- Remove Odoo re-install from E2E K8s job (template DB is pre-primed)
- Use dropdb --if-exists + createdb for clean DB on each E2E run
- Add needs: [build_image] to e2e_tests for correct dependency ordering

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 02:16:54 -04:00
2cb2a48b98 fix: deploy E2E tests on ITSulu K8s cluster instead of external Runboat
Updated CI/CD pipeline to run E2E tests on the ITSulu K8s cluster
(itsulu-testing namespace) instead of using external Runboat service.

.gitlab-ci.yml Changes:
- Removed preview stage (no external Runboat dependency)
- Removed e2e_tests dependency on runboat_preview
- Updated e2e_tests job to run on K8s cluster:
  * Uses bitnami/kubectl image for K8s access
  * Configures kubectl with KUBE_CONFIG secret
  * Creates ephemeral E2E test job on K8s
  * initContainer: Creates test database from template
  * container: Installs Odoo, addon, Playwright, runs pytest
  * Waits for job completion and downloads report
  * Reports available in GitLab artifacts
- Consolidated performance tests into unit_tests stage (same runner)

K8s Job Manifest (inline YAML):
- Namespace: itsulu-testing
- Init container: postgres:15-alpine for DB setup
- Test container: blog-publisher Docker image
- Volumes: emptyDir for test results
- TTL: 3600s (1 hour) for log retention
- Uses existing secrets: test-db-info, gitlab-docker-creds

e2e/conftest.py Changes:
- Updated docstring: "Runs on ITSulu K8s cluster"
- Changed RUNBOAT_TIMEOUT → K8S_TIMEOUT (300s)
- Updated wait_for_odoo() to mention K8s namespace in error
- Increased timeout: 180s → 300s (Odoo init + addon install)

Required CI/CD Variables (now reduced):
- KUBE_CONFIG: base64-encoded kubeconfig for itsulu-testing namespace
  * Only one variable needed (replaces 3 Runboat variables)
  * Must have permissions to create Jobs in itsulu-testing namespace

Prerequisites (K8s cluster):
- test-db-svc: PostgreSQL service in itsulu-testing namespace
- odoo_template: Pre-seeded database
- gitlab-docker-creds: Secret for image pull
- test-runner: ServiceAccount with Job create permissions

Benefits:
- No external service dependency
- Leverages existing ITSulu K8s infrastructure
- Full isolation per test run (ephemeral jobs)
- Persistent logs via TTL
- Cost-effective (uses existing cluster)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-30 00:58:46 -04:00
d122b773d4 feat: integrate Runboat E2E testing and performance tests into CI/CD pipeline
Updated .gitlab-ci.yml with complete Phase 3 pipeline stages:

New Stages Added:
- preview: Runboat API call to create ephemeral preview instance
- e2e: Playwright E2E tests against Runboat preview
- performance: Server-side performance benchmarks (latency, queries, tokens)

Pipeline Changes:
- runboat_preview job: Requests preview build, extracts URL, posts MR comment
- e2e_tests job: Runs 19 Playwright scenarios against preview URL
- performance_tests job: Runs 7 performance benchmark tests locally
- All jobs include artifacts (HTML reports, traces) for debugging

Job Dependencies:
- e2e_tests needs runboat_preview (waits for preview URL)
- performance_tests runs in parallel with build stage
- All new jobs only on merge_requests (not main/daily)

New Required CI/CD Variables:
- RUNBOAT_API_URL: Runboat API endpoint (secret)
- RUNBOAT_TOKEN: Bearer token for Runboat (secret)
- GITLAB_BOT_TOKEN: GitLab bot token for MR comments (secret)

Updated PHASE3_ROADMAP.md with:
- Runboat setup instructions
- CI/CD variable requirements and how to obtain
- Complete YAML snippets (already in .gitlab-ci.yml)
- Pipeline flow diagram
- Estimated total pipeline time: ~35 minutes

Non-blocking failures:
- runboat_preview: allow_failure=true (Runboat might be unavailable)
- e2e_tests: allow_failure=true (E2E informational, doesn't block merge)
- performance_tests: allow_failure=false (must pass)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-30 00:54:59 -04:00
2c7556f6d2 fix: manifest, XML views, and GitLab CI pipeline
- Update addon version to 17.0.1.0.0 (Odoo 17 compatibility)
- Fix XML loading order: load generate_now_wizard_views before blog_schedule_views to resolve action references
- Remove buttons from tree views (not supported in Odoo 17)
- Remove problematic field decorations
- Add comprehensive .gitlab-ci.yml with lint, test, build, and notify stages
- Template DB priming in CI uses postgres:15 with template cloning for fast test isolation

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-29 22:01:31 -04:00
GitLab
384cbe6028 Initialized from 'GitLab CI/CD components' project template
Template repository: https://gitlab.com/gitlab-org/project-templates/gitlab-component-template
Commit SHA: b8b0a4a1821acf43f82912e4bd00a38cea90aa62
2025-03-19 11:40:54 +01:00