Skip to content

Commit

Permalink
[Debt] Updates Azure Pipelines ubuntu image (#10431)
Browse files Browse the repository at this point in the history
* Update vmImage to 22.04

* Add ppa:ondrej/php

* Update PHP install

* Specify PHP version for extensions

* Add php-dom extension

* Update infrastructure/bin/set_php_versions.sh

Co-authored-by: Peter Giles <[email protected]>

---------

Co-authored-by: Peter Giles <[email protected]>
  • Loading branch information
mnigh and petertgiles authored May 22, 2024
1 parent 2842c0c commit 184aa34
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion infrastructure/azure-pipelines-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- job: build_artifact
displayName: Build artifact
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
steps:
- checkout: self
clean: true
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- job: build_artifact
displayName: Build artifact
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
steps:
- checkout: self
clean: true
Expand Down
9 changes: 4 additions & 5 deletions infrastructure/bin/set_php_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ set -o nounset
# Assign PHP version from arg if supplied. Runs default PHP bin without.
PHP_VERSION=$1

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}
# 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

php -version

0 comments on commit 184aa34

Please sign in to comment.