My question concerns deployment scripts in the process of continuous delivery.
Continuous delivery recommends that deployment scripts should be versioned into SCM just as normal code.
-
What is the best practice to avoid issues such as checking out (e.g. from Git) a script that does not have the right permission or is not executable?
-
Also, where in the SCM repository should deployment scripts be located?
4
It must be noted that solutions to this issue are bound to be specific to the underlying technology.
Here is a couple of git and Unix-specific solutions that can serve as a source of inspiration for other SCMs and platforms:
Both rely on the following git command:
git update-index --chmod=+x $script
and git/bash aliases. See full post here: https://stackoverflow.com/a/22710807/536299
Regarding the question of the location in the SCM repository, it could be in a separate SCM repository or in a folder located with the source code.
1