Skip to content
This repository was archived by the owner on Jun 2, 2023. It is now read-only.

ScratchOrg Pooling Examples

Vu Ha edited this page Jul 6, 2022 · 8 revisions

Schema

JSON Schema for the pool configuration is available at the link

Examples

Config with Script File and specific IP range to relax (tag mode)

IP ranges have to be relaxed when using tag mode to skip verification emails all Scratch Orgs created will have the creation email set to the user who triggered the pool.

{
  "pool": {
        "expiry": 1,
        "tag":"sfpowerkit",
        "max_allocation": 10,
        "config_file_path": "config/project-scratch-def.json",
        "script_file_path": "scripts/so_script.sh",
        "relax_ip_ranges": [  
        {
          "start": "49.0.0.0", 
          "end": "49.255.255.255"
        },
        {
          "start": "42.0.0.0",
          "end": "42.255.255.255"
        }
      ]
    }
}

Config with script file and relaxing full IP range (tag mode)

{
  "pool": {
        "expiry": 1,
        "tag":"sfpowerkit",
        "max_allocation": 10,
        "config_file_path": "config/project-scratch-def.json",
        "relax_all_ip_ranges": true,  
        "script_file_path": "scripts/so_script.sh"
    }
}

Config with Script file (user mode)

{
  "pool": {
        "expiry": 1,
        "tag":"sfpowerkit",
        "max_allocation": 10,
        "config_file_path": "config/project-scratch-def.json",
        "script_file_path": "scripts/so_script.sh"
    },
  "poolUsers": [
    {
      "max_allocation": 5,
      "min_allocation": 2,  
      "username": "email",
      "expiry": 1,
      "priority": 1
    }
  ]
}
Clone this wiki locally