File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,17 @@ Time to sleep after running container (and optionally `goss_wait.yaml`) and befo
96
96
97
97
Location of the goss yaml files. (Default: ` . ` )
98
98
99
+ #### GOSS_ADDITIONAL_COPY_PATH
100
+
101
+ Colon-seperated list of additional directories to copy to container.
102
+
103
+ By default dgoss copies ` goss.yaml ` from the current working directory and
104
+ nothing else. You may need other files like scripts and configurations copied
105
+ as well. Specify ` GOSS_ADDITIONAL_COPY_PATH ` similar to ` $PATH ` as colon seperated
106
+ list of directories for each additional directory you'd like to recursively copy.
107
+ These will be copied as directories next to ` goss.yaml ` in the temporary
108
+ directory ` DGOSS_TEMP_DIR ` . (Default: ` '' ` )
109
+
99
110
#### GOSS_VARS
100
111
101
112
The name of the variables file relative to ` GOSS_FILES_PATH ` to copy into the
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ run(){
36
36
[[ -e " ${GOSS_FILES_PATH} /${GOSS_FILE:- goss.yaml} " ]] && cp " ${GOSS_FILES_PATH} /${GOSS_FILE:- goss.yaml} " " $tmp_dir /goss.yaml" && chmod 644 " $tmp_dir /goss.yaml"
37
37
[[ -e " ${GOSS_FILES_PATH} /goss_wait.yaml" ]] && cp " ${GOSS_FILES_PATH} /goss_wait.yaml" " $tmp_dir " && chmod 644 " $tmp_dir /goss_wait.yaml"
38
38
[[ -n " ${GOSS_VARS} " ]] && [[ -e " ${GOSS_FILES_PATH} /${GOSS_VARS} " ]] && cp " ${GOSS_FILES_PATH} /${GOSS_VARS} " " $tmp_dir " && chmod 644 " $tmp_dir /${GOSS_VARS} "
39
+ if [ -n " $GOSS_ADDITIONAL_COPY_PATH " ]; then
40
+ for dir in " $( echo " $GOSS_ADDITIONAL_COPY_PATH " | sed ' s/:/ /g' ) " ; do
41
+ cp -r ${dir} " ${tmp_dir} /"
42
+ chmod -R 755 " $tmp_dir /$( basename ${dir} ) "
43
+ done
44
+ fi
39
45
40
46
# Switch between mount or cp files strategy
41
47
GOSS_FILES_STRATEGY=${GOSS_FILES_STRATEGY:= " mount" }
You can’t perform that action at this time.
0 commit comments