| { |
| "variables": { |
| "pipeline_prefix": "local-testing-", |
| "hashed_pipeline_prefix": "0b7ad56c-671b-5244-9f36-01f92928abf8", |
| "geode_docker_image": "unset", |
| "gcp_project": "unset", |
| "java_build_version": "8" |
| }, |
| "provisioners": [ |
| { |
| "type": "shell", |
| "inline": ["mkdir -p /tmp/work"] |
| }, |
| { |
| "type": "shell", |
| "environment_vars": [ |
| "GEODE_DOCKER_IMAGE={{user `geode_docker_image`}}" |
| ], |
| "execute_command": "sudo -S sh -c '{{ .Vars }} {{ .Path }}'", |
| "script": "scripts/setup.sh" |
| }, |
| { |
| "type": "shell", |
| "environment_vars": [ |
| "JAVA_BUILD_VERSION={{user `java_build_version`}}" |
| ], |
| "execute_command": "sudo -u geode -S sh -c '{{ .Vars }} {{ .Path }}'", |
| "script": "scripts/cache_dependencies.sh" |
| } |
| ], |
| "builders": [ |
| { |
| "type": "googlecompute", |
| "project_id": "{{user `gcp_project`}}", |
| "source_image_family": "ubuntu-minimal-1804-lts", |
| "ssh_username": "packer", |
| "zone": "us-central1-f", |
| "image_family": "{{user `pipeline_prefix`}}geode-builder", |
| "image_name": "{{user `hashed_pipeline_prefix`}}gb-{{timestamp}}", |
| "tags": ["packer"] |
| } |
| ] |
| } |