Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6

- name: Build image
run: DOCKER_BUILDKIT=1 docker build --tag docs.ubuntu.com .
Expand All @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6

- name: Install dependencies
run: yarn install --immutable
Expand All @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6

- name: Install node dependencies
run: yarn install --immutable
Expand All @@ -51,14 +51,16 @@ jobs:
run: yarn lint-python

test-python:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6

- name: Install requirements
run: |
sudo apt-get update && sudo apt-get install --yes python3-setuptools
sudo pip3 install --upgrade pip setuptools wheel
sudo pip3 install "setuptools<72" "Cython<3.1"
sudo pip3 install -r requirements.txt

- name: Install node dependencies
Expand All @@ -74,7 +76,7 @@ jobs:
run: coverage run --source=. -m unittest discover tests

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v5
with:
flags: python

Expand All @@ -83,7 +85,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v6

- name: woke
uses: canonical-web-and-design/inclusive-naming@main
Expand Down
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,27 @@

# Build stage: Install python dependencies
# ===
FROM ubuntu:focal AS python-dependencies
FROM ubuntu:noble AS python-dependencies
RUN apt update && apt install --no-install-recommends --yes python3 python3-pip python3-setuptools
COPY requirements.txt /tmp/requirements.txt
RUN --mount=type=cache,target=/root/.cache/pip pip3 install --user --requirement /tmp/requirements.txt
RUN --mount=type=cache,target=/root/.cache/pip pip3 install --break-system-packages --user --requirement /tmp/requirements.txt


# Build stage: Install yarn dependencies
# ===
FROM node:16 AS yarn-dependencies
FROM node:25 AS yarn-dependencies
WORKDIR /srv
COPY . .
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn yarn install


# Build stage:
# ===
FROM ubuntu:focal AS build-documentation
FROM ubuntu:noble AS build-documentation
WORKDIR /srv
RUN apt-get update && apt-get install --no-install-recommends --yes git ca-certificates python3 python3-pip python3-setuptools
RUN pip3 install ubuntudesign.documentation-builder gitdb2==3.0.1 MarkupSafe==2.0.1
RUN pip3 install --break-system-packages "setuptools<72" "Cython<3.1" && \
pip3 install --break-system-packages ubuntudesign.documentation-builder gitdb2==3.0.1 MarkupSafe==2.0.1
ADD build-docs.sh build-docs.sh
ADD .git/index /dev/null
RUN ./build-docs.sh
Expand All @@ -39,7 +40,7 @@ RUN yarn run build-js

# Build the production image
# ===
FROM ubuntu:focal
FROM ubuntu:noble

# Set up environment
ENV LANG C.UTF-8
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
},
"dependencies": {
"@canonical/cookie-policy": "^3.6.4",
"autoprefixer": "10.4.1",
"autoprefixer": "10.4.23",
"sass-lint": "1.13.1",
"vanilla-framework": "4.39.0",
"watch-cli": "0.2.3",
"postcss": "8.4.5",
"postcss-cli": "8.3.1",
"sass": "1.46.0",
"webpack": "5.65.0",
"webpack-cli": "4.9.1"
"postcss-cli": "10.1.0",
"sass": "1.97.2",
"webpack": "5.94.0",
"webpack-cli": "5.1.4"
},
"devDependencies": {
"@babel/core": "7.16.7",
"@babel/preset-env": "7.16.7",
"babel-loader": "8.2.3"
"@babel/core": "7.28.6",
"@babel/preset-env": "7.28.6",
"babel-loader": "9.1.3"
}
}
12 changes: 7 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Django==3.2.14
setuptools<70
Django==4.2.27
canonicalwebteam.custom_response_headers==0.2.0
canonicalwebteam.versioned-static==1.0.2
canonicalwebteam.yaml-responses==1.2.0
django-static-root-finder==0.3.1
django-asset-server-url==0.1
django-template-finder-view==0.3
django-yaml-redirects==0.5.4
talisker[gunicorn,gevent]==0.19.0
whitenoise==5.3.0
talisker[gunicorn,gevent]==0.22.0
whitenoise==6.7.0
ubuntudesign.documentation-builder==1.7.0
gitdb2==3.0.3.post1
MarkupSafe==2.0.1
gitdb2==4.0.2
MarkupSafe==2.1.5
Cython==0.29.37
1 change: 1 addition & 0 deletions run
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#! /usr/bin/env bash

# CAUTION:
Expand Down
9 changes: 7 additions & 2 deletions webapp/urls.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# Modules
from django.conf.urls import url
from django.urls import re_path
from django_template_finder_view import TemplateFinder
from canonicalwebteam.yaml_responses.django_helpers import (
create_redirect_views,
)

# Compatibility shim for older packages expecting django.conf.urls.url
from django.conf import urls as django_urls

django_urls.url = re_path


# Match any redirects first
urlpatterns = create_redirect_views()

# Try to find templates
urlpatterns += [url(r"^(?P<template>.*)/?$", TemplateFinder.as_view())]
urlpatterns += [re_path(r"^(?P<template>.*)/?$", TemplateFinder.as_view())]
Loading
Loading