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 <noreply@anthropic.com>
This commit is contained in:
parent
086749d9fe
commit
b69d98d0ac
1 changed files with 34 additions and 1 deletions
|
|
@ -3,10 +3,11 @@ stages:
|
||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
- e2e
|
- e2e
|
||||||
|
- runboat
|
||||||
- notify
|
- notify
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
ODOO_IMAGE: odoo:17.0
|
ODOO_IMAGE: odoo:19.0
|
||||||
POSTGRES_HOST: postgres
|
POSTGRES_HOST: postgres
|
||||||
POSTGRES_PORT: 5432
|
POSTGRES_PORT: 5432
|
||||||
POSTGRES_DB: odoo_test
|
POSTGRES_DB: odoo_test
|
||||||
|
|
@ -214,8 +215,39 @@ build_image:
|
||||||
- docker push $CI_REGISTRY_IMAGE:latest
|
- docker push $CI_REGISTRY_IMAGE:latest
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
|
- /^19\.0$/
|
||||||
- merge_requests
|
- 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
|
# NOTIFY ON FAILURE
|
||||||
# ================================================================
|
# ================================================================
|
||||||
|
|
@ -227,3 +259,4 @@ notify_failure:
|
||||||
when: on_failure
|
when: on_failure
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
|
- /^19\.0$/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue