rm helper and installer folder in post-deployment

This commit is contained in:
Aleksandr Chebotov
2020-09-22 13:55:21 +03:00
parent d4335cc52e
commit fe9f74e51e
4 changed files with 41 additions and 48 deletions

View File

@@ -9,3 +9,8 @@ if [[ -d "/opt" ]]; then
echo "chmod -R 777 /opt"
chmod -R 777 /opt
fi
# remove installer and helper folders
rm -rf $HELPER_SCRIPT_FOLDER
rm -rf $INSTALLER_SCRIPT_FOLDER
chmod 755 $IMAGE_FOLDER

View File

@@ -301,6 +301,18 @@
"destination": "{{template_dir}}/Ubuntu1604-README.md",
"direction": "download"
},
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/post-deployment.sh"
],
"environment_vars":[
"HELPER_SCRIPT_FOLDER={{user `helper_script_folder`}}",
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
"IMAGE_FOLDER={{user `image_folder`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts":[
@@ -310,22 +322,6 @@
"RUN_VALIDATION={{user `run_validation_diskspace`}}"
]
},
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/post-deployment.sh"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"inline": [
"rm -rf {{user `helper_script_folder`}}",
"rm -rf {{user `installer_script_folder`}}",
"chmod 755 {{user `image_folder`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "file",
"source": "{{template_dir}}/config/ubuntu1604.conf",

View File

@@ -305,6 +305,18 @@
"destination": "{{template_dir}}/Ubuntu1804-README.md",
"direction": "download"
},
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/post-deployment.sh"
],
"environment_vars":[
"HELPER_SCRIPT_FOLDER={{user `helper_script_folder`}}",
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
"IMAGE_FOLDER={{user `image_folder`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts":[
@@ -314,22 +326,6 @@
"RUN_VALIDATION={{user `run_validation_diskspace`}}"
]
},
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/post-deployment.sh"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"inline": [
"rm -rf {{user `helper_script_folder`}}",
"rm -rf {{user `installer_script_folder`}}",
"chmod 755 {{user `image_folder`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "file",
"source": "{{template_dir}}/config/ubuntu1804.conf",

View File

@@ -307,6 +307,18 @@
"destination": "{{template_dir}}/Ubuntu2004-README.md",
"direction": "download"
},
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/post-deployment.sh"
],
"environment_vars":[
"HELPER_SCRIPT_FOLDER={{user `helper_script_folder`}}",
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
"IMAGE_FOLDER={{user `image_folder`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts":[
@@ -316,22 +328,6 @@
"RUN_VALIDATION={{user `run_validation_diskspace`}}"
]
},
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/post-deployment.sh"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"inline": [
"rm -rf {{user `helper_script_folder`}}",
"rm -rf {{user `installer_script_folder`}}",
"chmod 755 {{user `image_folder`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "file",
"source": "{{template_dir}}/config/ubuntu2004.conf",