From b69d98d0accbb84234a9ad6e686b0d5eaa991d68 Mon Sep 17 00:00:00 2001 From: Nicholas R Date: Sat, 30 May 2026 19:00:18 -0400 Subject: [PATCH] ci: fix Odoo image version to 19.0, add runboat integration stage - Fix ODOO_IMAGE from 17.0 to 19.0 to match deployment - Build image on 19.0 branch (not just main) - Add runboat_tag stage: tags image with branch slug and triggers runboat build via API so PRs get live test instances on runboat.itsulu.com Co-Authored-By: Claude Sonnet 4.6 --- .gitlab-ci.yml | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2d5cc13..541766c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,10 +3,11 @@ stages: - test - build - e2e + - runboat - notify variables: - ODOO_IMAGE: odoo:17.0 + ODOO_IMAGE: odoo:19.0 POSTGRES_HOST: postgres POSTGRES_PORT: 5432 POSTGRES_DB: odoo_test @@ -214,8 +215,39 @@ build_image: - docker push $CI_REGISTRY_IMAGE:latest only: - main + - /^19\.0$/ - merge_requests +# ================================================================ +# RUNBOAT: TAG IMAGE WITH BRANCH/PR VERSION FOR RUNBOAT PICKUP +# ================================================================ + +runboat_tag: + stage: runboat + image: docker:latest + services: + - docker:dind + needs: [build_image] + variables: + BRANCH_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG + script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + # Tag image with branch slug so runboat can find the right image per branch + - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA + - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $BRANCH_TAG + - docker push $BRANCH_TAG + # Notify Forgejo commit status via runboat API + - | + curl -sf -X POST "$RUNBOAT_BASE_URL/api/v1/builds" \ + -u "$RUNBOAT_API_ADMIN_USER:$RUNBOAT_API_ADMIN_PASSWD" \ + -H "Content-Type: application/json" \ + -d "{\"repo\":\"itsulu-odoo/$CI_PROJECT_NAME\",\"target_branch\":\"$CI_COMMIT_REF_NAME\",\"pr\":null,\"git_commit\":\"$CI_COMMIT_SHA\"}" \ + || echo "Runboat trigger skipped (not a watched branch)" + only: + - /^19\.0$/ + - main + allow_failure: true + # ================================================================ # NOTIFY ON FAILURE # ================================================================ @@ -227,3 +259,4 @@ notify_failure: when: on_failure only: - main + - /^19\.0$/