Skip to content

Commit

Permalink
Merge pull request #2684 from Varying-Vagrant-Vagrants/develop
Browse files Browse the repository at this point in the history
3.12 stable
  • Loading branch information
tomjn authored Aug 3, 2023
2 parents 3b367ce + e4918d8 commit aee9a69
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 46 deletions.
44 changes: 35 additions & 9 deletions .github/workflows/vvv-provisioning.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# This is a basic workflow to help you get started with Actions

name: VVV Provisioning

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the develop branch
on:
push:
branches: [ develop ]
branches:
- develop
pull_request:
branches: [ develop, stable ]
branches:
- develop
- stable

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
on-docker:
name: Docker Provisioner
name: Ubuntu 20 Docker Provisioner
# The type of runner that the job will run on
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down Expand Up @@ -111,7 +112,7 @@ jobs:

# This workflow contains a single job called "build"
on-stable:
name: Stable Reprovision
name: MacOS 10.15 Stable Reprovision
# The type of runner that the job will run on
runs-on: macos-10.15

Expand All @@ -122,6 +123,14 @@ jobs:
with:
ref: stable

- name: Cache Vagrant boxes
uses: actions/cache@v2
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
restore-keys: |
${{ runner.os }}-vagrant-
- name: install goodhosts
run: vagrant plugin install --local

Expand All @@ -145,7 +154,7 @@ jobs:
path: "${{ github.workspace }}/log"

on-develop:
name: Develop Reprovision
name: MacOS 10.15 Develop Reprovision
# The type of runner that the job will run on
runs-on: macos-10.15

Expand All @@ -156,6 +165,15 @@ jobs:
with:
ref: develop

- name: Cache Vagrant boxes
uses: actions/cache@v2
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
restore-keys: |
${{ runner.os }}-vagrant-
- name: install goodhosts
run: vagrant plugin install --local

Expand All @@ -179,7 +197,7 @@ jobs:
path: "${{ github.workspace }}/log"

on-clean:
name: Clean Provision
name: MacOS 10.15 Clean Provision
# The type of runner that the job will run on
runs-on: macos-10.15

Expand All @@ -188,6 +206,14 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Cache Vagrant boxes
uses: actions/cache@v2
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
restore-keys: |
${{ runner.os }}-vagrant-
- name: install goodhosts
run: vagrant plugin install --local

Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ permalink: /docs/en-US/changelog/

# Changelog

## 3.12 ( 2023 August 3rd )

### Enhancements

* Added the GMP PHP extension to the default PHP installation ( #2676 )

### Maintenance

* Updated bitbucket SSH fingerprints ( #2679 )

### Bug Fixes

* Fixed a vagrantfile error on Arm when the vagrant-parallels plugin is missing ( #2670 )
* Miscellanous Shellcheck linter fixes and improvements ( #2675 )
* Github action fixes for composer and an upgrade to Ubuntu 20 ( #2677 )
* Fixed an issue with git safe directories ( #2681 )
* Git safe directory fixes
* Fixed docker version detection
* PHPCS install improvements

## 3.11.2 ( 2023 May 8th )

### Enhancements
Expand Down
37 changes: 27 additions & 10 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,26 @@ vvv_config['hosts'] = vvv_config['hosts'].uniq

vvv_config['vagrant-plugins'] = {} unless vvv_config['vagrant-plugins']

# Early mapping of the hosts to be added.
vvv_config['utilities'].each do |name, extensions|
extensions = {} unless extensions.is_a? Array
extensions.each do |extension|
if extension == 'tideways'
vvv_config['hosts'] += ['tideways.vvv.test']
vvv_config['hosts'] += ['xhgui.vvv.test']
end
end
end
vvv_config['extensions'].each do |name, extensions|
extensions = {} unless extensions.is_a? Array
extensions.each do |extension|
if extension == 'tideways'
vvv_config['hosts'] += ['tideways.vvv.test']
vvv_config['hosts'] += ['xhgui.vvv.test']
end
end
end

# Create a global variable to use in functions and classes
$vvv_config = vvv_config

Expand Down Expand Up @@ -298,12 +318,17 @@ if show_logo
provider_meta = VagrantPlugins::ProviderVirtualBox::Driver::Meta.new()
provider_version = provider_meta.version
when 'parallels'
provider_meta = VagrantPlugins::Parallels::Driver::Meta.new()
provider_version = provider_meta.version
provider_version = '?'
if defined? VagrantPlugins::Parallels
provider_meta = VagrantPlugins::Parallels::Driver::Meta.new()
provider_version = provider_meta.version
end
when 'vmware'
provider_version = '??'
when 'hyperv'
provider_version = 'n/a'
when 'docker'
provider_version = VagrantPlugins::DockerProvider::Driver.new.execute("docker", "-v").gsub("Docker version ", "")
else
provider_version = '??'
end
Expand Down Expand Up @@ -791,10 +816,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
vvv_config['utilities'].each do |name, extensions|
extensions = {} unless extensions.is_a? Array
extensions.each do |extension|
if extension == 'tideways'
vvv_config['hosts'] += ['tideways.vvv.test']
vvv_config['hosts'] += ['xhgui.vvv.test']
end
config.vm.provision "extension-#{name}-#{extension}",
type: 'shell',
keep_color: true,
Expand All @@ -809,10 +830,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
vvv_config['extensions'].each do |name, extensions|
extensions = {} unless extensions.is_a? Array
extensions.each do |extension|
if extension == 'tideways'
vvv_config['hosts'] += ['tideways.vvv.test']
vvv_config['hosts'] += ['xhgui.vvv.test']
end
config.vm.provision "extension-#{name}-#{extension}",
type: 'shell',
keep_color: true,
Expand Down
7 changes: 6 additions & 1 deletion provision/core/composer/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function composer_setup() {
return 1
fi
else
vvv_info " * [Composer]: Already installed"
vvv_info " * [Composer]: Already installed: $(composer --version)"
fi

vvv_info " * [Composer]: Making sure the Composer cache is not owned by root"
Expand All @@ -47,6 +47,11 @@ function composer_setup() {
chown -R vagrant:www-data "${COMPOSER_DATA_DIR}"
chown -R vagrant:www-data /root/.local/share/composer

# Github runner fixes
if [ -d "/home/runner/.config/composer/" ]; then
chown -R vagrant:www-data /home/runner/.config/composer/
fi

vvv_info " * [Composer]: Checking for GitHub tokens"
if github_token=$(shyaml get-value -q "general.github_token" < "${VVV_CONFIG}"); then
vvv_info " * [Composer]: A personal GitHub token was found, configuring Composer"
Expand Down
4 changes: 3 additions & 1 deletion provision/core/env/ssh/ssh_known_hosts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ gitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAA
gitlab.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsj2bNKTBSpIYDEGk9KxsGh3mySTRgMtXL583qmBpzeQ+jqCMRgBqB98u3z++J1sKlXHWfM9dyhSevkMwSbhoR8XIq/U0tCNyokEi/ueaBMCvbcTHhO7FcwzY92WK4Yt0aGROY5qX2UKSeOvuP4D6TPqKF1onrSzH9bx9XUf2lEdWT/ia1NEKjunUqu1xOB/StKDHMoX4/OKyIzuS0q/T1zOATthvasJFoPrAjkohTyaDUz2LN5JoH839hViyEG82yB+MjcFV5MU3N1l1QL3cVUCh93xSaua1N85qivl+siMkPGbO5xR/En4iEY6K2XPASUEMaieWVNTRCtJ4S8H+9
gitlab.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAfuCHKVTjquxvt6CM6tdG4SLp1Btn/nOeHHE5UOzRdf

bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDQeJzhupRu0u0cdegZIa8e86EG2qOCsIsD1Xw0xSeiPDlCr7kq97NLmMbpKTX6Esc30NuoqEEHCuc7yWtwp8dI76EEEB1VqY9QJq6vk+aySyboD5QF61I/1WeTwu+deCbgKMGbUijeXhtfbxSxm6JwGrXrhBdofTsbKRUsrN1WoNgUa8uqN1Vx6WAJw1JHPhglEGGHea6QICwJOAr/6mrui/oB7pkaWKHj3z7d1IC4KWLtY47elvjbaTlkN04Kc/5LFEirorGYVbt15kAUlqGM65pk6ZBxtaO3+30LVlORZkxOh+LKL/BvbZ/iRNhItLqNyieoQj/uh/7Iv4uyH/cV/0b4WDSd3DptigWq84lJubb9t/DnZlrJazxyDCulTmKdOR7vs9gMTo+uoIrPSb8ScTtvw65+odKAlBj59dhnVp9zd7QUojOpXlL62Aw56U4oO+FALuevvMjiWeavKhJqlR7i5n9srYcrNV7ttmDw7kf/97P5zauIhxcjX+xHv4M=
bitbucket.org ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPIQmuzMBuKdWeF4+a2sjSSpBK0iqitSQ+5BM9KhpexuGt20JpTVM7u5BDZngncgrqDMbWdxMWWOGtZ9UgbqgZE=
bitbucket.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIazEu89wgQZ4bqs3d63QSMzYVa0MuJ2e2gKTKqu+UUO
2 changes: 2 additions & 0 deletions provision/core/git/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@ function git_after_packages() {
vvv_info " * Git hasn't been told how to merge branches, setting pull.rebase false for the merge strategy"
noroot git config --global pull.rebase false
fi
git config --global --add safe.directory '*' # Allow git to work well under docker provider
noroot git config --global --add safe.directory '*' # Allow git to work well under docker provider
}
vvv_add_hook after_packages git_after_packages
1 change: 1 addition & 0 deletions provision/core/php/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function php_register_apt_packages() {
"php${VVV_BASE_PHPVERSION}-soap"
"php${VVV_BASE_PHPVERSION}-xml"
"php${VVV_BASE_PHPVERSION}-zip"
"php${VVV_BASE_PHPVERSION}-gmp"
)

# ImageMagick
Expand Down
3 changes: 2 additions & 1 deletion provision/core/phpcs/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -eo pipefail
function php_codesniff_setup() {
export COMPOSER_ALLOW_SUPERUSER=1
export COMPOSER_NO_INTERACTION=1
export COMPOSER_RUNTIME_ENV="vagrant"

if [[ -f "/srv/www/phpcs/CodeSniffer.conf" ]]; then
vvv_info " * [PHPCS]: Removing the old PHPCS setup"
Expand All @@ -19,7 +20,7 @@ function php_codesniff_setup() {
noroot mkdir -p /srv/www/phpcs
noroot cp -f "/srv/provision/core/phpcs/composer.json" "/srv/www/phpcs/composer.json"
cd /srv/www/phpcs
noroot composer update --no-ansi --no-progress --no-dev
noroot COMPOSER_RUNTIME_ENV="vagrant" composer update --no-ansi --no-progress --no-dev --prefer-dist

vvv_info " * [PHPCS]: Setting WordPress-Core as the default PHPCodesniffer standard"

Expand Down
Loading

0 comments on commit aee9a69

Please sign in to comment.