Skip to content

Instantly share code, notes, and snippets.

@sirreal
Created May 6, 2024 10:45
Show Gist options
  • Save sirreal/3675860c882b0e2b8d73aae0cfd7d207 to your computer and use it in GitHub Desktop.
Save sirreal/3675860c882b0e2b8d73aae0cfd7d207 to your computer and use it in GitHub Desktop.
WP playground blueprint - Script Modules data sharing
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "/",
"phpExtensionBundles": [
"kitchen-sink"
],
"steps": [
{
"step": "mkdir",
"path": "/wordpress-new"
},
{
"step": "writeFile",
"path": "/tmp/pr.zip",
"data": {
"resource": "url",
"url": "/plugin-proxy.php?org=WordPress&repo=wordpress-develop&workflow=Test Build Processes&artifact=wordpress-build-6433&pr=6433",
"caption": "Downloading WordPress PR 6433"
}
},
{
"step": "unzip",
"zipPath": "/tmp/pr.zip",
"extractToPath": "/tmp"
},
{
"step": "rm",
"path": "/tmp/pr.zip"
},
{
"step": "importWordPressFiles",
"wordPressFilesZip": {
"resource": "vfs",
"path": "/tmp/wordpress.zip"
},
"pathInZip": "/build",
"progress": {
"weight": 20,
"caption": "Applying WordPress PR 6433"
}
},
{
"step": "runPHP",
"code": "<?php\n$_GET['step'] = 'upgrade_db';\nrequire '/wordpress/wp-admin/upgrade.php';"
},
{
"step": "login",
"username": "admin",
"password": "password"
},
{
"step": "mkdir",
"path": "/wordpress/pr"
},
{
"step": "writeFile",
"path": "/wordpress/pr/pr.zip",
"data": {
"resource": "url",
"url": "/plugin-proxy.php?org=WordPress&repo=gutenberg&workflow=Build Gutenberg Plugin Zip&artifact=gutenberg-plugin&pr=60952",
"caption": "Downloading Gutenberg PR 60952"
},
"progress": {
"weight": 2,
"caption": "Applying Gutenberg PR 60952"
}
},
{
"step": "unzip",
"zipPath": "/wordpress/pr/pr.zip",
"extractToPath": "/wordpress/pr"
},
{
"step": "installPlugin",
"pluginZipFile": {
"resource": "vfs",
"path": "/wordpress/pr/gutenberg.zip"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment