Fix docker local build (#1212)

This commit is contained in:
Hang Yan
2019-12-27 10:26:42 +08:00
committed by GitHub
parent 1f0a097836
commit dd28e9220b
5 changed files with 34 additions and 19 deletions
+10
View File
@@ -70,6 +70,16 @@ function convert::run_cmd() {
}
readonly -f convert::run_cmd
function convert::expect_cmd_success() {
local cmd=$1
convert::start_test "convert::expect_cmd_success: Running: '${cmd}'"
convert::run_cmd $cmd
exit_status=$?
if [ $exit_status -ne 0 ]; then FAIL_MSGS=$FAIL_MSGS"exit status: $exit_status\n"; return $exit_status; fi
}
# run the command and match the output to the existing file
# if error then save error string in FAIL_MSGS
# if success save pass string in SUCCESS_MSGS
+8
View File
@@ -537,6 +537,14 @@ cd $CURRENT_DIR
#### Test docker build feature
cmd="kompose convert -f $KOMPOSE_ROOT/script/test/fixtures/buildconfig/docker-compose-dockerfile.yml --stdout -j --build=local"
convert::expect_cmd_success "$cmd"
cmd="kompose convert --provider openshift -f $KOMPOSE_ROOT/script/test/fixtures/buildconfig/docker-compose-dockerfile.yml --stdout -j --build=local"
convert::expect_cmd_success "$cmd"
# Test the presence of build args in buildconfig
# Replacing variables with current branch and uri
# Test BuildConfig