Skip to content

Commit c4eeae6

Browse files
authored
Merge pull request #143 from IBM/cleanup-v2
Update travis to 24.04 and Python 3.12
2 parents dbfa5c1 + bdd4b8b commit c4eeae6

File tree

1 file changed

+32
-19
lines changed

1 file changed

+32
-19
lines changed

.travis.yml

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,50 @@
11
# ===============================================================
2-
# Travis CI – two-stage build for the mcpgateway project
2+
# Travis CI – twostage build for the mcpgateway project
33
# ===============================================================
44
#
5-
# Stage ❶ build-test :
6-
# • Creates a Python venv → ~/.venv/mcpgateway
7-
# • Runs `make venv install` (== installs deps + project)
8-
# • Executes your lint / unit-test targets
5+
# Updated 2025‑06‑21
6+
# • Moves to **Ubuntu 24.04 LTS (Noble Numbat)** build image
7+
# • Uses the distro‑default **Python 3.12** (no external PPAs)
8+
# • Installs only python3‑venv & python3‑dev from the main repo
9+
# • Keeps the existing two‑stage workflow (build‑test → docker)
10+
#
11+
# Stage ❶ build‑test :
12+
# • Creates Python venv → ~/.venv/mcpgateway
13+
# • Runs `make venv install` (deps + project)
14+
# • Executes lint / unit‑test targets
915
#
1016
# Stage ❷ docker :
11-
# • Uses the same repo checkout (depth-1 clone)
17+
# • Uses the same repo checkout (depth1 clone)
1218
# • Builds Containerfile → mcpgateway/mcpgateway:latest
1319
# • Starts the container and makes a quick health curl
1420
#
1521
# Requirements
16-
# • Works on Travis "jammy" image (Ubuntu 22.04; Python 3.10)
17-
# • Docker daemon available via services: docker
22+
# • Works on Travis "noble" image (Ubuntu 24.04; system Python 3.12)
23+
# • Docker daemon available via services: docker
1824
# ===============================================================
1925

20-
dist: jammy # Ubuntu 22.04 – up-to-date packages
21-
language: generic # we'll manage Python ourselves
26+
dist: noble # Ubuntu 24.04 – up‑to‑date packages
27+
language: generic # using the image's default Python 3.12
2228
services:
23-
- docker # enable Docker Engine inside job
29+
- docker # enable Docker Engine inside job
2430

2531
git:
26-
depth: 1 # shallow clone of current branch only
32+
depth: 1 # shallow clone of current branch only
2733

2834
# ────────────────────────────────────────────────────────────────
29-
# Global helpers – available to *every* job
35+
# Ensure venv & build headers are available for system Python 3.12
3036
# ────────────────────────────────────────────────────────────────
37+
addons:
38+
apt:
39+
update: true
40+
packages:
41+
- python3-venv # venv module for virtual environments
42+
- python3-dev # C headers for compiling wheels
43+
44+
# Display Python version & prep environment
3145
before_install:
32-
- echo "🔧 Python version -> $(python3 --version)"
33-
- make venv install install-dev # make target that installs deps
46+
- echo "🔧 Python version -> $(python3 --version)" # should be 3.12.x
47+
- make venv install install-dev # installs deps
3448
- source ~/.venv/mcpgateway/bin/activate
3549

3650
# ────────────────────────────────────────────────────────────────
@@ -42,9 +56,9 @@ jobs:
4256
# ❶ Lint / Tests
4357
# -----------------------------------------------------------
4458
- stage: "build-test"
45-
name: "Lint + unit tests + package"
59+
name: "Lint + unit tests + package (Python 3.12)"
4660
script:
47-
- make dist # builds the package
61+
- make dist # builds the package
4862

4963
# -----------------------------------------------------------
5064
# ❷ Docker build + smoke test
@@ -54,8 +68,7 @@ jobs:
5468
script: |
5569
set -e
5670
echo "🏗️ Building container…"
57-
docker build -f Containerfile \
58-
-t mcpgateway/mcpgateway:latest .
71+
docker build -f Containerfile -t mcpgateway/mcpgateway:latest .
5972
6073
echo "🚀 Launching container…"
6174
docker run -d --name mcpgateway -p 4444:4444 \

0 commit comments

Comments
 (0)