Skip to content

Commit

Permalink
implement goss_file option from goss-org#454
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Bartels <[email protected]>
  • Loading branch information
fbartels committed Nov 11, 2019
1 parent a59b6f1 commit d924245
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions extras/dcgoss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ Location of the goss yaml files. (Default: `.`)

`GOSS_FILES_PATH=db dcgoss edit db`

##### GOSS_FILE
Allows to specify a differing name for `goss.yaml`. Useful when the same image is started for different configurations.

**Example:**

`GOSS_FILE=goss_config1.yaml dcgoss run db`

##### GOSS_VARS
The name of the variables file relative to `GOSS_FILES_PATH` to copy into the
docker container and use for valiation (i.e. `dcgoss run`) and copy out of the
Expand Down
2 changes: 1 addition & 1 deletion extras/dcgoss/dcgoss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ run(){
# Copy in goss
cp "${GOSS_PATH}" "$tmp_dir/goss"
chmod 755 "$tmp_dir/goss"
[[ -e "${GOSS_FILES_PATH}/goss.yaml" ]] && install -m ugo+rw "${GOSS_FILES_PATH}/goss.yaml" "$tmp_dir"
[[ -e "${GOSS_FILES_PATH}/${GOSS_FILE:-goss.yaml}" ]] && install -m ugo+rw "${GOSS_FILES_PATH}/${GOSS_FILE:-goss.yaml}" "$tmp_dir/goss.yaml"
[[ -e "${GOSS_FILES_PATH}/goss_wait.yaml" ]] && install -m ugo+rw "${GOSS_FILES_PATH}/goss_wait.yaml" "$tmp_dir"
[[ -n "${GOSS_VARS}" ]] && [[ -e "${GOSS_FILES_PATH}/${GOSS_VARS}" ]] && install -m ugo+rw "${GOSS_FILES_PATH}/${GOSS_VARS}" "$tmp_dir"

Expand Down

0 comments on commit d924245

Please sign in to comment.