2019-11-15 15:23:41 -05:00
|
|
|
{
|
|
|
|
|
"variables": {
|
|
|
|
|
"client_id": "{{env `ARM_CLIENT_ID`}}",
|
|
|
|
|
"client_secret": "{{env `ARM_CLIENT_SECRET`}}",
|
|
|
|
|
"subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}",
|
|
|
|
|
"tenant_id": "{{env `ARM_TENANT_ID`}}",
|
|
|
|
|
"resource_group": "{{env `ARM_RESOURCE_GROUP`}}",
|
|
|
|
|
"storage_account": "{{env `ARM_STORAGE_ACCOUNT`}}",
|
|
|
|
|
"temp_resource_group_name": "{{env `TEMP_RESOURCE_GROUP_NAME`}}",
|
|
|
|
|
"location": "{{env `ARM_RESOURCE_LOCATION`}}",
|
|
|
|
|
"virtual_network_name": "{{env `VNET_NAME`}}",
|
|
|
|
|
"virtual_network_resource_group_name": "{{env `VNET_RESOURCE_GROUP`}}",
|
|
|
|
|
"virtual_network_subnet_name": "{{env `VNET_SUBNET`}}",
|
|
|
|
|
"private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}",
|
|
|
|
|
"image_folder": "/imagegeneration",
|
2020-03-08 17:41:55 +03:00
|
|
|
"imagedata_file": "/imagegeneration/imagedata.json",
|
2019-11-15 15:23:41 -05:00
|
|
|
"installer_script_folder": "/imagegeneration/installers",
|
|
|
|
|
"helper_script_folder": "/imagegeneration/helpers",
|
2021-02-18 10:52:09 +03:00
|
|
|
"vm_size": "Standard_D4s_v4",
|
2019-11-15 15:23:41 -05:00
|
|
|
"capture_name_prefix": "packer",
|
2019-12-30 11:40:10 +03:00
|
|
|
"image_version": "dev",
|
2020-02-14 14:43:30 +03:00
|
|
|
"image_os": "ubuntu18",
|
2021-01-28 04:31:45 -06:00
|
|
|
"run_validation_diskspace": "false",
|
|
|
|
|
"dockerhub_login": "{{env `DOCKERHUB_LOGIN`}}",
|
|
|
|
|
"dockerhub_password": "{{env `DOCKERHUB_PASSWORD`}}"
|
2019-11-15 15:23:41 -05:00
|
|
|
},
|
2020-09-21 13:24:05 -05:00
|
|
|
"sensitive-variables": [
|
2020-11-27 10:52:00 +03:00
|
|
|
"client_secret"
|
2020-09-21 13:24:05 -05:00
|
|
|
],
|
2019-11-15 15:23:41 -05:00
|
|
|
"builders": [
|
|
|
|
|
{
|
|
|
|
|
"type": "azure-arm",
|
|
|
|
|
"client_id": "{{user `client_id`}}",
|
|
|
|
|
"client_secret": "{{user `client_secret`}}",
|
|
|
|
|
"subscription_id": "{{user `subscription_id`}}",
|
|
|
|
|
"tenant_id": "{{user `tenant_id`}}",
|
|
|
|
|
"location": "{{user `location`}}",
|
|
|
|
|
"vm_size": "{{user `vm_size`}}",
|
|
|
|
|
"resource_group_name": "{{user `resource_group`}}",
|
|
|
|
|
"storage_account": "{{user `storage_account`}}",
|
|
|
|
|
"temp_resource_group_name": "{{user `temp_resource_group_name`}}",
|
|
|
|
|
"capture_container_name": "images",
|
|
|
|
|
"capture_name_prefix": "{{user `capture_name_prefix`}}",
|
|
|
|
|
"virtual_network_name": "{{user `virtual_network_name`}}",
|
|
|
|
|
"virtual_network_resource_group_name": "{{user `virtual_network_resource_group_name`}}",
|
|
|
|
|
"virtual_network_subnet_name": "{{user `virtual_network_subnet_name`}}",
|
|
|
|
|
"private_virtual_network_with_public_ip": "{{user `private_virtual_network_with_public_ip`}}",
|
|
|
|
|
"os_type": "Linux",
|
|
|
|
|
"image_publisher": "Canonical",
|
|
|
|
|
"image_offer": "UbuntuServer",
|
|
|
|
|
"image_sku": "18.04-LTS",
|
|
|
|
|
"os_disk_size_gb": "86"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"provisioners": [
|
|
|
|
|
{
|
|
|
|
|
"type": "shell",
|
|
|
|
|
"inline": [
|
|
|
|
|
"mkdir {{user `image_folder`}}",
|
2020-08-24 12:31:51 +03:00
|
|
|
"chmod 777 {{user `image_folder`}}"
|
2019-11-15 15:23:41 -05:00
|
|
|
],
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
2020-11-25 13:19:51 +05:00
|
|
|
{
|
|
|
|
|
"type": "shell",
|
|
|
|
|
"script": "{{template_dir}}/scripts/base/apt-mock.sh",
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
2019-11-15 15:23:41 -05:00
|
|
|
{
|
|
|
|
|
"type": "shell",
|
2020-09-21 13:24:05 -05:00
|
|
|
"scripts": [
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/base/repos.sh"
|
|
|
|
|
],
|
|
|
|
|
"environment_vars": [
|
|
|
|
|
"DEBIAN_FRONTEND=noninteractive"
|
|
|
|
|
],
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "shell",
|
2020-06-17 12:26:41 -04:00
|
|
|
"script": "{{template_dir}}/scripts/base/apt.sh",
|
2020-11-05 15:53:49 +03:00
|
|
|
"environment_vars": [
|
|
|
|
|
"DEBIAN_FRONTEND=noninteractive"
|
|
|
|
|
],
|
2020-06-17 12:26:41 -04:00
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
2020-10-21 10:29:07 +05:00
|
|
|
{
|
|
|
|
|
"type": "shell",
|
2020-06-17 12:26:41 -04:00
|
|
|
"script": "{{template_dir}}/scripts/base/limits.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "file",
|
|
|
|
|
"source": "{{template_dir}}/scripts/helpers",
|
|
|
|
|
"destination": "{{user `helper_script_folder`}}"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "file",
|
|
|
|
|
"source": "{{template_dir}}/scripts/installers",
|
|
|
|
|
"destination": "{{user `installer_script_folder`}}"
|
|
|
|
|
},
|
2020-10-12 17:44:31 +03:00
|
|
|
{
|
|
|
|
|
"type": "file",
|
|
|
|
|
"source": "{{ template_dir }}/post-generation",
|
|
|
|
|
"destination": "{{user `image_folder`}}"
|
|
|
|
|
},
|
2020-12-17 09:52:09 +03:00
|
|
|
{
|
|
|
|
|
"type": "file",
|
|
|
|
|
"source": "{{template_dir}}/scripts/tests",
|
|
|
|
|
"destination": "{{user `image_folder`}}"
|
|
|
|
|
},
|
2020-09-11 14:59:17 +03:00
|
|
|
{
|
|
|
|
|
"type": "file",
|
|
|
|
|
"source": "{{ template_dir }}/scripts/SoftwareReport",
|
|
|
|
|
"destination": "{{user `image_folder`}}"
|
|
|
|
|
},
|
2020-09-08 14:40:56 +03:00
|
|
|
{
|
|
|
|
|
"type": "file",
|
|
|
|
|
"source": "{{template_dir}}/toolsets/toolset-1804.json",
|
|
|
|
|
"destination": "{{user `installer_script_folder`}}/toolset.json"
|
|
|
|
|
},
|
2020-03-08 17:41:55 +03:00
|
|
|
{
|
|
|
|
|
"type": "shell",
|
2020-09-21 13:24:05 -05:00
|
|
|
"scripts": [
|
2020-03-08 17:41:55 +03:00
|
|
|
"{{template_dir}}/scripts/installers/preimagedata.sh"
|
|
|
|
|
],
|
|
|
|
|
"environment_vars": [
|
|
|
|
|
"IMAGE_VERSION={{user `image_version`}}",
|
|
|
|
|
"IMAGEDATA_FILE={{user `imagedata_file`}}"
|
|
|
|
|
],
|
2019-11-15 15:23:41 -05:00
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "shell",
|
2020-03-12 23:46:11 +03:00
|
|
|
"scripts": [
|
2020-03-13 11:09:03 +03:00
|
|
|
"{{template_dir}}/scripts/installers/configure-environment.sh"
|
2019-11-15 15:23:41 -05:00
|
|
|
],
|
2020-03-12 23:46:11 +03:00
|
|
|
"environment_vars": [
|
|
|
|
|
"IMAGE_VERSION={{user `image_version`}}",
|
2020-12-30 09:57:11 +03:00
|
|
|
"IMAGE_OS={{user `image_os`}}",
|
|
|
|
|
"HELPER_SCRIPTS={{user `helper_script_folder`}}"
|
2020-03-11 23:34:22 +03:00
|
|
|
],
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
2020-04-10 14:20:16 +05:00
|
|
|
{
|
|
|
|
|
"type": "shell",
|
2020-04-23 20:19:11 +05:00
|
|
|
"scripts": [
|
|
|
|
|
"{{template_dir}}/scripts/installers/complete-snap-setup.sh"
|
|
|
|
|
],
|
|
|
|
|
"environment_vars": [
|
|
|
|
|
"HELPER_SCRIPTS={{user `helper_script_folder`}}"
|
|
|
|
|
],
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
2020-12-17 09:52:09 +03:00
|
|
|
{
|
|
|
|
|
"type": "shell",
|
|
|
|
|
"scripts": [
|
|
|
|
|
"{{template_dir}}/scripts/installers/powershellcore.sh"
|
|
|
|
|
],
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "shell",
|
|
|
|
|
"scripts": [
|
2020-12-23 15:18:48 +03:00
|
|
|
"{{template_dir}}/scripts/installers/Install-PowerShellModules.ps1",
|
|
|
|
|
"{{template_dir}}/scripts/installers/Install-AzureModules.ps1"
|
2020-12-17 09:52:09 +03:00
|
|
|
],
|
|
|
|
|
"environment_vars": [
|
2020-12-23 15:18:48 +03:00
|
|
|
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
2020-12-17 09:52:09 +03:00
|
|
|
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
|
|
|
|
|
],
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'"
|
|
|
|
|
},
|
2021-01-28 04:31:45 -06:00
|
|
|
{
|
|
|
|
|
"type": "shell",
|
|
|
|
|
"scripts": [
|
|
|
|
|
"{{template_dir}}/scripts/installers/docker-compose.sh",
|
|
|
|
|
"{{template_dir}}/scripts/installers/docker-moby.sh"
|
|
|
|
|
],
|
|
|
|
|
"environment_vars": [
|
|
|
|
|
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
|
|
|
|
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
|
|
|
|
|
"DOCKERHUB_LOGIN={{user `dockerhub_login`}}",
|
|
|
|
|
"DOCKERHUB_PASSWORD={{user `dockerhub_password`}}"
|
|
|
|
|
],
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
2020-03-11 23:34:22 +03:00
|
|
|
{
|
|
|
|
|
"type": "shell",
|
2019-11-15 15:23:41 -05:00
|
|
|
"scripts": [
|
|
|
|
|
"{{template_dir}}/scripts/installers/azcopy.sh",
|
|
|
|
|
"{{template_dir}}/scripts/installers/azure-cli.sh",
|
|
|
|
|
"{{template_dir}}/scripts/installers/azure-devops-cli.sh",
|
2020-05-26 18:45:48 +03:00
|
|
|
"{{template_dir}}/scripts/installers/basic.sh",
|
2020-04-13 17:38:35 +03:00
|
|
|
"{{template_dir}}/scripts/installers/aliyun-cli.sh",
|
2021-01-29 07:52:46 -08:00
|
|
|
"{{template_dir}}/scripts/installers/apache.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/aws.sh",
|
|
|
|
|
"{{template_dir}}/scripts/installers/clang.sh",
|
2020-03-24 09:27:15 +03:00
|
|
|
"{{template_dir}}/scripts/installers/swift.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/cmake.sh",
|
2020-09-08 15:27:27 +01:00
|
|
|
"{{template_dir}}/scripts/installers/codeql-bundle.sh",
|
2020-07-06 10:53:26 +03:00
|
|
|
"{{template_dir}}/scripts/installers/containers.sh",
|
2020-02-23 19:13:39 +04:00
|
|
|
"{{template_dir}}/scripts/installers/dotnetcore-sdk.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/erlang.sh",
|
|
|
|
|
"{{template_dir}}/scripts/installers/firefox.sh",
|
|
|
|
|
"{{template_dir}}/scripts/installers/gcc.sh",
|
2020-02-04 17:14:16 +03:00
|
|
|
"{{template_dir}}/scripts/installers/gfortran.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/git.sh",
|
2020-05-26 18:30:15 +05:00
|
|
|
"{{template_dir}}/scripts/installers/github-cli.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/google-chrome.sh",
|
|
|
|
|
"{{template_dir}}/scripts/installers/google-cloud-sdk.sh",
|
|
|
|
|
"{{template_dir}}/scripts/installers/haskell.sh",
|
|
|
|
|
"{{template_dir}}/scripts/installers/heroku.sh",
|
|
|
|
|
"{{template_dir}}/scripts/installers/hhvm.sh",
|
|
|
|
|
"{{template_dir}}/scripts/installers/java-tools.sh",
|
2020-05-06 08:51:47 +03:00
|
|
|
"{{template_dir}}/scripts/installers/kubernetes-tools.sh",
|
2020-07-07 07:36:28 -07:00
|
|
|
"{{template_dir}}/scripts/installers/oc.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/leiningen.sh",
|
2020-05-26 18:45:48 +03:00
|
|
|
"{{template_dir}}/scripts/installers/mercurial.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/miniconda.sh",
|
|
|
|
|
"{{template_dir}}/scripts/installers/mono.sh",
|
|
|
|
|
"{{template_dir}}/scripts/installers/mysql.sh",
|
2020-11-17 10:18:27 +03:00
|
|
|
"{{template_dir}}/scripts/installers/mssql-cmd-tools.sh",
|
2021-01-29 07:52:46 -08:00
|
|
|
"{{template_dir}}/scripts/installers/nginx.sh",
|
2020-04-03 16:10:34 +03:00
|
|
|
"{{template_dir}}/scripts/installers/nvm.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/nodejs.sh",
|
2020-03-05 10:30:24 +03:00
|
|
|
"{{template_dir}}/scripts/installers/bazel.sh",
|
2020-07-07 16:40:02 +03:00
|
|
|
"{{template_dir}}/scripts/installers/oras-cli.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/phantomjs.sh",
|
2020-05-26 18:45:48 +03:00
|
|
|
"{{template_dir}}/scripts/installers/php.sh",
|
2020-01-31 12:21:33 +03:00
|
|
|
"{{template_dir}}/scripts/installers/postgresql.sh",
|
2020-08-28 10:35:11 +03:00
|
|
|
"{{template_dir}}/scripts/installers/pulumi.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/ruby.sh",
|
2020-07-21 11:18:11 +03:00
|
|
|
"{{template_dir}}/scripts/installers/r.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/rust.sh",
|
2020-03-02 14:44:14 +03:00
|
|
|
"{{template_dir}}/scripts/installers/julia.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/sbt.sh",
|
2020-02-07 13:12:35 +05:00
|
|
|
"{{template_dir}}/scripts/installers/selenium.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/terraform.sh",
|
2020-03-04 15:42:36 +01:00
|
|
|
"{{template_dir}}/scripts/installers/packer.sh",
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{template_dir}}/scripts/installers/vcpkg.sh",
|
2020-04-02 18:14:11 +05:00
|
|
|
"{{template_dir}}/scripts/installers/dpkg-config.sh",
|
2020-04-06 16:21:15 +03:00
|
|
|
"{{template_dir}}/scripts/installers/mongodb.sh",
|
2020-08-20 13:39:33 +05:00
|
|
|
"{{template_dir}}/scripts/installers/android.sh",
|
2020-05-18 11:07:37 +03:00
|
|
|
"{{template_dir}}/scripts/installers/pypy.sh",
|
2020-11-27 10:52:00 +03:00
|
|
|
"{{template_dir}}/scripts/installers/python.sh"
|
2019-11-15 15:23:41 -05:00
|
|
|
],
|
|
|
|
|
"environment_vars": [
|
2019-12-30 11:40:10 +03:00
|
|
|
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
2020-01-29 11:26:47 +04:00
|
|
|
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
|
2020-09-08 14:40:56 +03:00
|
|
|
"DEBIAN_FRONTEND=noninteractive"
|
2019-11-15 15:23:41 -05:00
|
|
|
],
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
2020-05-11 18:26:20 +03:00
|
|
|
{
|
|
|
|
|
"type": "shell",
|
2020-09-21 13:24:05 -05:00
|
|
|
"scripts": [
|
2020-06-19 19:29:07 +03:00
|
|
|
"{{template_dir}}/scripts/installers/Install-Toolset.ps1",
|
2020-12-28 15:07:00 +03:00
|
|
|
"{{template_dir}}/scripts/installers/Configure-Toolset.ps1"
|
2020-05-11 18:26:20 +03:00
|
|
|
],
|
|
|
|
|
"environment_vars": [
|
|
|
|
|
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
2020-06-19 19:29:07 +03:00
|
|
|
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
|
2020-05-11 18:26:20 +03:00
|
|
|
],
|
2020-06-19 19:29:07 +03:00
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'"
|
2020-05-11 18:26:20 +03:00
|
|
|
},
|
2020-10-02 16:51:03 +03:00
|
|
|
{
|
|
|
|
|
"type": "shell",
|
|
|
|
|
"scripts": [
|
|
|
|
|
"{{template_dir}}/scripts/installers/pipx-packages.sh"
|
|
|
|
|
],
|
2020-10-05 12:04:29 +03:00
|
|
|
"environment_vars": [
|
2020-12-29 10:02:46 +03:00
|
|
|
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
2020-10-05 12:04:29 +03:00
|
|
|
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
|
|
|
|
|
],
|
2020-10-02 16:51:03 +03:00
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
2020-07-07 08:05:14 +03:00
|
|
|
{
|
|
|
|
|
"type": "shell",
|
|
|
|
|
"scripts": [
|
|
|
|
|
"{{template_dir}}/scripts/installers/homebrew.sh"
|
|
|
|
|
],
|
|
|
|
|
"environment_vars": [
|
|
|
|
|
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
2020-12-25 18:03:35 +03:00
|
|
|
"DEBIAN_FRONTEND=noninteractive",
|
|
|
|
|
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
|
2020-07-07 08:05:14 +03:00
|
|
|
],
|
|
|
|
|
"execute_command": "/bin/sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "shell",
|
|
|
|
|
"expect_disconnect": true,
|
|
|
|
|
"scripts": [
|
|
|
|
|
"{{template_dir}}/scripts/base/reboot.sh"
|
|
|
|
|
],
|
|
|
|
|
"execute_command": "/bin/sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "shell",
|
2020-12-25 18:03:35 +03:00
|
|
|
"pause_before": "60s",
|
|
|
|
|
"start_retry_timeout": "10m",
|
2020-09-21 13:24:05 -05:00
|
|
|
"scripts": [
|
2020-04-21 18:23:33 +03:00
|
|
|
"{{template_dir}}/scripts/installers/cleanup.sh"
|
|
|
|
|
],
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
2020-10-29 00:03:03 +05:00
|
|
|
{
|
|
|
|
|
"type": "shell",
|
|
|
|
|
"script": "{{template_dir}}/scripts/base/apt-mock-remove.sh",
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
2020-09-11 14:59:17 +03:00
|
|
|
{
|
2020-09-14 11:31:41 +03:00
|
|
|
"type": "shell",
|
2020-09-11 14:59:17 +03:00
|
|
|
"inline": [
|
2020-12-17 09:52:09 +03:00
|
|
|
"pwsh -File {{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory {{user `image_folder`}}",
|
|
|
|
|
"pwsh -File {{user `image_folder`}}/tests/RunAll-Tests.ps1 -OutputDirectory {{user `image_folder`}}"
|
2020-09-11 14:59:17 +03:00
|
|
|
],
|
2020-09-21 13:24:05 -05:00
|
|
|
"environment_vars": [
|
2020-09-14 11:31:41 +03:00
|
|
|
"IMAGE_VERSION={{user `image_version`}}",
|
2020-11-17 10:20:55 +03:00
|
|
|
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
|
2020-09-11 14:59:17 +03:00
|
|
|
]
|
|
|
|
|
},
|
2019-11-15 15:23:41 -05:00
|
|
|
{
|
|
|
|
|
"type": "file",
|
2020-09-11 14:59:17 +03:00
|
|
|
"source": "{{user `image_folder`}}/Ubuntu-Readme.md",
|
2019-11-15 15:23:41 -05:00
|
|
|
"destination": "{{template_dir}}/Ubuntu1804-README.md",
|
|
|
|
|
"direction": "download"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "shell",
|
2020-09-21 11:18:28 +03:00
|
|
|
"scripts":[
|
|
|
|
|
"{{template_dir}}/scripts/installers/post-deployment.sh"
|
|
|
|
|
],
|
2020-09-22 13:55:21 +03:00
|
|
|
"environment_vars":[
|
|
|
|
|
"HELPER_SCRIPT_FOLDER={{user `helper_script_folder`}}",
|
|
|
|
|
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
|
|
|
|
|
"IMAGE_FOLDER={{user `image_folder`}}"
|
2019-11-15 15:23:41 -05:00
|
|
|
],
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
2020-05-09 04:31:49 +00:00
|
|
|
{
|
|
|
|
|
"type": "shell",
|
2020-09-21 13:24:05 -05:00
|
|
|
"scripts": [
|
2020-05-09 04:31:49 +00:00
|
|
|
"{{template_dir}}/scripts/installers/validate-disk-space.sh"
|
2020-05-21 09:08:52 +03:00
|
|
|
],
|
|
|
|
|
"environment_vars": [
|
|
|
|
|
"RUN_VALIDATION={{user `run_validation_diskspace`}}"
|
2020-05-09 04:31:49 +00:00
|
|
|
]
|
|
|
|
|
},
|
2019-11-15 15:23:41 -05:00
|
|
|
{
|
|
|
|
|
"type": "file",
|
|
|
|
|
"source": "{{template_dir}}/config/ubuntu1804.conf",
|
|
|
|
|
"destination": "/tmp/"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "shell",
|
|
|
|
|
"inline": [
|
|
|
|
|
"mkdir -p /etc/vsts",
|
|
|
|
|
"cp /tmp/ubuntu1804.conf /etc/vsts/machine_instance.conf"
|
|
|
|
|
],
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "shell",
|
|
|
|
|
"inline": [
|
|
|
|
|
"sleep 30",
|
|
|
|
|
"/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync"
|
|
|
|
|
],
|
|
|
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
|
|
|
}
|
|
|
|
|
]
|
2021-01-28 04:31:45 -06:00
|
|
|
}
|