人ア
Size: a a a
人ア
人ア
tf
人ア
人ア
AZ
1.Put file $FILENAME$.tgz to any web resource
2.Write script that does the following:
a)Download file
b)Unarchive into temp directory
c)Ask user to choose an environment name. If user doesn’t choose, select default “FeatureBranch” env.
d)Find a directory with the name of the chosen environment inside the chosen environment directory in the unarchived directory structure.
e)Check if such directory exists and finish with error message and status, if doesn’t exists.
f)Copy from the corresponding hostname directory files to /etc/nginx the following way:
i)always copy files from “unified” folder if it exists
ii)if there is a folder with a name equal to the current hostname in the environment directory, copy files from it to the /etc/nginx . E.g. there is a folder “web3-us-east1.local” in “Prod” directory. Files from it should be copied only if the current hostname is web3-us-east1.local
g)Restart nginx.
3.If any critical error exists (e.g. there is no environment directory or archive file is broken or so) exit from script with non-zero exit code.
Б
AZ
Б
Б
VB
Б
Б