Patch repo for drydock images
Can contain three files
- base-patch.sh (Applied on all the images. ex- u12, u14nod, u12phpall).
- pls-patch.sh (Applied only to pls and all images. ex- u12nodpls, u14nodall).
- all-patch.sh (Applied only to all images. ex - u12nodall, u14nodall).
Each of u12 and u14 folder can contain three files.
- base-patch.sh (Applied on all the images. ex- u12, u12nod, u12phpall).
- pls-patch.sh (Applied only to pls and all images. ex- u12nodpls, u12nodall).
- all-patch.sh (Applied only to all images. ex - u12nodall, u12nodall).
languages dir (patches specific to the eight images supported by shippable - node, python, java, scala, php, go, ruby, clojure)
Each of the eight can contain three files.
- base-patch.sh (Applied on all the images. ex- u12, u14nod, u12nodall).
- pls-patch.sh (Applied only to pls and all images. ex- u12nodpls, u14nodall).
- all-patch.sh (Applied only to all images. ex - u12nodall, u14nodall).
Apart from that if an image requires additional patches we will have a file called $osVer$lang$langVer-patch.sh. The location of this file will be inside /languages/$lang.
The executor.sh function contains three arrays os, languages and languageVersions which all determine which all images are to be patched. Values for these three arrays are as follows
- os - 'u12' 'u14'
- languages - '' 'nod' 'pyt' 'php' 'rub' 'gol' 'clo' 'jav' 'sca' ('' is for the base images u12, u14)
- languageVersions - '' 'pls' 'all'
To patch an image we need to add the files in the following order.
- If patch is to be applied globally then add the patch in global folder (also check if the patch is to be placed in base-patch.sh, pls-patch.sh or all-patch.sh).
- If patch is to be applied at an OS level then add the patch in
os/$osVerfolder (also check if the patch is to be placed in base-patch.sh, pls-patch.sh or all-patch.sh). - If patch is to be applied at an Language level then add the patch in
languages/$langfolder (also check if the patch is to be placed in base-patch.sh, pls-patch.sh or all-patch.sh). - If patch is only specific to the image then add the patch in
languages/$langand name the file as$osVer$lang$langVer-patch.sh.
- Patching every image - add base-patch.sh in global dir and inside
executor.shset all the values inos, languages, languageVersionsarray. - Patching pls images - add pls-patch.sh in global dir and inside
executor.shset all the values inos, languagesarray. The value inlanguageVersionsarray should bepls. - Patching u12nodpls image - add u12nodpls-patch.sh in languages/nod and inside
executor.shset the array values ofos as 'u12',languages as 'nod'andlanguageVersions as 'pls'.
base-patch.shis applied tobase, pls and allimages so we should not include the same patch inpls-patch.sh and all-patch.sh.pls-patch.shis applied topls and allimages so we should not include the same patch inall-patch.sh.