Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tooling] Updates Ubuntu to 24.04 #12415

Merged
merged 4 commits into from
Jan 7, 2025
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/blocking-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
blocking_issues:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
name: Checks for blocking issues

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
name: Chromatic
# Only run if not dependabot.
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
PNPM_VERSION: "9.12.3"
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
codeql:
name: CodeQL
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
jest:
name: Jest
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
PNPM_VERSION: "9.12.3"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lighthouse-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
jobs:
lighthouse-php:
name: Lighthouse PHP
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
PNPM_VERSION: "9.12.3"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
phpunit:
name: PHPUnit
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
GCNOTIFY_API_KEY: ${{ secrets.GCNOTIFY_API_KEY }}
GCNOTIFY_TEMPLATE_APPLICATION_DEADLINE_APPROACHING_EN: ${{ vars.GCNOTIFY_TEMPLATE_APPLICATION_DEADLINE_APPROACHING_EN }}
Expand Down
62 changes: 31 additions & 31 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ concurrency:
jobs:
playwright:
name: Playwright
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -90,36 +90,36 @@ jobs:
# Merge reports after playwright-tests, even if some shards have failed
if: ${{ !cancelled() }}
needs: [playwright]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
PNPM_VERSION: "9.12.3"
steps:
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: pnpm

# Fix some issue with cache in setup-node
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true

- name: Merge into HTML Report
run: npx playwright merge-reports --reporter html ./all-blob-reports

- name: Upload HTML report
uses: actions/upload-artifact@v4
with:
name: html-report--attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 14
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: pnpm

# Fix some issue with cache in setup-node
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true

- name: Merge into HTML Report
run: npx playwright merge-reports --reporter html ./all-blob-reports

- name: Upload HTML report
uses: actions/upload-artifact@v4
with:
name: html-report--attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 14
2 changes: 1 addition & 1 deletion .github/workflows/translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
jobs:
translations:
name: Translations
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
PNPM_VERSION: "9.12.3"

Expand Down
7 changes: 3 additions & 4 deletions documentation/linux-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Sometimes it may be preferable to perform local environment maintenance directly

## Operating system

This guide is written for [Ubuntu 22.04](https://releases.ubuntu.com/jammy/). Since that is the operating system used in the maintenance container, Github runners, and Azure runners it is a good choice of OS for this. This guide will also work when using [Ubuntu in WSL](https://canonical-ubuntu-wsl.readthedocs-hosted.com/en/latest/guides/install-ubuntu-wsl2/). Other Ubuntu variants or Linux distributions may work as well but are not documented here.
This guide is written for [Ubuntu 24.04](https://releases.ubuntu.com/noble/). Since that is the operating system used in the maintenance container, Github runners, and Azure runners it is a good choice of OS for this. This guide will also work when using [Ubuntu in WSL](https://canonical-ubuntu-wsl.readthedocs-hosted.com/en/latest/guides/install-ubuntu-wsl2/). Other Ubuntu variants or Linux distributions may work as well but are not documented here.

Double check:

Expand Down Expand Up @@ -110,10 +110,9 @@ The version should be greater or equal to the version of `services.postgres.imag

## PHP

We use [PHP](https://www.php.net/) version 8.3 to run the backend app. Ubuntu 22.04 does not come with PHP 8.3 in its repositories so add the [Ondrej PPA](https://launchpad.net/~ondrej/+archive/ubuntu/php/) and install it with some extensions.
We use [PHP](https://www.php.net/) version 8.3 to run the backend app. Ubuntu 24.04 comes with PHP 8.3 but we require some additional extensions to be installed.

```
LC_ALL=C.UTF-8 sudo add-apt-repository ppa:ondrej/php
sudo apt-get install php8.3 php8.3-cli php8.3-mbstring php8.3-xml php8.3-pgsql php8.3-zip php8.3-curl php8.3-bcmath php8.3-gd php8.3-dom php8.3-intl
```

Expand All @@ -128,7 +127,7 @@ The PHP version should match the value of `require.php` in [api/composer.json](h

## Composer

We user [Composer](https://getcomposer.org/) to manage our PHP project.
We use [Composer](https://getcomposer.org/) to manage our PHP project.

```
sudo apt-get install composer
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- job: build_artifact
displayName: Build artifact
pool:
vmImage: ubuntu-22.04
vmImage: ubuntu-24.04
steps:
- checkout: self
clean: true
Expand Down
9 changes: 5 additions & 4 deletions infrastructure/bin/set_php_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ set -o nounset
# Assign PHP version from arg if supplied. Runs default PHP bin without.
PHP_VERSION=$1

# GitHub runner only includes one version of PHP that is not necesarrily the value of the assigned therefore the Personal Package Archive (PPA) is necessary.
LC_ALL=C.UTF-8 sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php${PHP_VERSION} php${PHP_VERSION}-mbstring php${PHP_VERSION}-xml php${PHP_VERSION}-pgsql php${PHP_VERSION}-zip php${PHP_VERSION}-curl php${PHP_VERSION}-bcmath php${PHP_VERSION}-gd php${PHP_VERSION}-dom
sudo update-alternatives --set php /usr/bin/php${PHP_VERSION}
sudo update-alternatives --set phar /usr/bin/phar${PHP_VERSION}
sudo update-alternatives --set phpdbg /usr/bin/phpdbg${PHP_VERSION}
sudo update-alternatives --set php-cgi /usr/bin/php-cgi${PHP_VERSION}
sudo update-alternatives --set phar.phar /usr/bin/phar.phar${PHP_VERSION}

php -version
8 changes: 1 addition & 7 deletions infrastructure/maintenance-container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
FROM node:20.11.0 AS node

# base
FROM ubuntu:22.04
FROM ubuntu:24.04

# install apt packages
# first install software-properties-common to get add-apt-repository
# then add ondrej PPA
# then update again and install everything else
# installing tzdata has an interactive prompt by default
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata \
&& apt-get install -y perl unzip wget curl \
&& apt-get install -y php8.3 php8.3-mbstring php8.3-xml php8.3-pgsql php8.3-zip php8.3-curl php8.3-bcmath php8.3-gd \
Expand Down
Loading