Skip to content

Commit

Permalink
Merge branch 'develop' into jammy-vvv
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjn authored Jan 10, 2024
2 parents 602529d + 4ba78d6 commit 8b1eba3
Show file tree
Hide file tree
Showing 32 changed files with 411 additions and 186 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ body:
- 'VirtualBox 5'
- 'Parallels (Intel)'
- 'Parallels (Apple Silicon/Arm)'
- 'Docker'
- 'Hyper-V'
- 'VMWare'
- 'Other'
Expand Down
35 changes: 0 additions & 35 deletions .github/ISSUE_TEMPLATE/monteray-virtualbox-timeouts.yml

This file was deleted.

62 changes: 44 additions & 18 deletions .github/workflows/vvv-provisioning.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
# 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 22 Docker Provisioner
# The type of runner that the job will run on
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Make Symlinks
- name: Create Vagrant Like Environment
Expand Down Expand Up @@ -103,32 +104,40 @@ jobs:
MYGID=$(id -g -n)
sudo chown -R $MYUID:$MYGID "$GITHUB_WORKSPACE/log"
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: logs-on-docker
path: "${{ github.workspace }}/log"

# 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

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: stable

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

- name: vagrant up (stable)
run: vagrant up

- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
clean: false

Expand All @@ -138,31 +147,40 @@ jobs:
- name: tests
run: provision/tests/macos-tests.sh

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: logs-on-stable
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

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: develop

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

- name: vagrant up (develop)
run: vagrant up

- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
clean: false

Expand All @@ -172,21 +190,29 @@ jobs:
- name: tests
run: provision/tests/macos-tests.sh

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: logs-on-develop
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

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Cache Vagrant boxes
uses: actions/cache@v3
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 @@ -197,7 +223,7 @@ jobs:
- name: tests
run: provision/tests/macos-tests.sh

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: logs-on-clean
Expand Down
51 changes: 50 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,56 @@ permalink: /docs/en-US/changelog/

# Changelog

## 3.11.0 ( WIP )
## 3.13 ( 2023 December TBA )

### Enhancements

* Switched the default PHP from v7.4 to v8.2 and ~default Node from v14 to v16~ ( #2690 )
* Use Node 20 as the default version to match WP and Gutenberg ( #2696 )
* WP Coding standards v3 ( #2688 )
* VIP Coding standards v3 ( #2688 )
* Better error messages with links to docs when trying to use a PHP version that isn't installed ( #2689 )
* Opted out of Dotnet package telemetry ( #2689 )
* Replace references to the Squizlab PHPCS with that from the PHPCS Standards org ( #2692 )

### Bug Fixes

* The host file inside the VM was only adding sites with `127.0.0.1` addresses, now it adds the IPVv6 `::1` too ( #2689 )

## 3.12 ( 2023 August 3rd )

### Enhancements

* Monolithic docker beta support ( #2632 )
* 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

* Added Gitlab SSH fingerprints for non-RSA keys ( #2665 )
* Apt sources for Ubuntu 22 LTS

### Bug Fixes

* Updated to the new GitHub RSA fingerprint ( #2665 )


## 3.11.0 ( 2023 March 14th )

### Enhancements

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ _VVV stands for Varying Vagrant Vagrants._

## How To Use

To use it, download and install [Vagrant](https://www.vagrantup.com) and [VirtualBox](https://www.virtualbox.org/). Then, clone this repository and run:
To use it, download and install [Vagrant](https://www.vagrantup.com) and a provider such as [VirtualBox](https://www.virtualbox.org/), Docker, or Parallels Pro. Then, clone this repository and run:

```shell
vagrant plugin install --local
Expand Down
57 changes: 44 additions & 13 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Vagrant.require_version '>= 2.2.4'
require 'yaml'
require 'fileutils'
require 'pathname'
require 'socket'

def sudo_warnings
red = "\033[38;5;9m" # 124m"
Expand Down Expand Up @@ -216,9 +217,9 @@ defaults['memory'] = 2048
defaults['cores'] = 1
defaults['provider'] = 'virtualbox'

# if Arm default to parallels
# if Arm default to docker
if Etc.uname[:version].include? 'ARM64'
defaults['provider'] = 'parallels'
defaults['provider'] = 'docker'
end

# This should rarely be overridden, so it's not included in the config/default-config.yml file.
Expand All @@ -229,6 +230,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 +319,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 @@ -436,6 +462,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
override.vm.box = 'bento/ubuntu-22.04'
end

# Docker use image.
config.vm.provider :docker do |d, override|
d.image = 'pentatonicfunk/vagrant-ubuntu-base-images:20.04'
d.has_ssh = true
d.ports = [ "80:80" ] # HTTP
d.ports += [ "443:443" ] # HTTPS
d.ports += [ "3306:3306" ] # MySQL
d.ports += [ "8025:8025" ] # Mailhog

## Fix goodhosts aliases format for docker
override.goodhosts.aliases = { '127.0.0.1' => vvv_config['hosts'], '::1' => vvv_config['hosts'] }
end

# Virtualbox.
config.vm.provider :virtualbox do |_v, override|
# Default Ubuntu Box
Expand Down Expand Up @@ -489,7 +528,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Access to the guest machine is only available to your local host. To provide access to
# other devices, a public network should be configured or port forwarding enabled.
#
# Note: If your existing network is using the 192.168.50.x subnet, this default IP address
# Note: If your existing network is using the 192.168.56.x subnet, this default IP address
# should be changed. If more than one VM is running through VirtualBox, including other
# Vagrant machines, different subnets should be used for each.
#
Expand Down Expand Up @@ -791,10 +830,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 +844,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
Loading

0 comments on commit 8b1eba3

Please sign in to comment.