]> git.corax.cc Git - foundry/commitdiff
include/msg: Remove log-related functions from test and build modules
authorMatthias Kruk <m@m10k.eu>
Sun, 1 Aug 2021 05:44:31 +0000 (14:44 +0900)
committerMatthias Kruk <m@m10k.eu>
Sun, 1 Aug 2021 05:44:31 +0000 (14:44 +0900)
The "logs" property has been removed from the specification of the
test and build messages, so the functions in the respective modules
that access these properties must be removed as well.
This commit removes the foundry_msg_build_get_logs() and
foundry_msg_test_get_logs() functions and removes the logs parameter
from the foundry_msg_test_new() and foundry_msg_build_new() functions.

include/msg/build.sh
include/msg/test.sh

index 068e1207fcf9088ac6d07bd96fbc19e68374df3f..2d0f30e57d9d41cf6d20b3b8f54bf49d77b10c80 100644 (file)
@@ -16,11 +16,9 @@ foundry_msg_build_new() {
        local branch="$3"
        local commit="$4"
        local result="$5"
-       local -n __foundry_msg_build_new_logs="$6"
-       local -n __foundry_msg_build_new_artifacts="$7"
+       local -n __foundry_msg_build_new_artifacts="$6"
 
        local artifact_array
-       local log_array
        local json
        local msg
 
@@ -28,16 +26,11 @@ foundry_msg_build_new() {
                return 1
        fi
 
-       if ! log_array=$(json_array "${__foundry_msg_build_new_logs[@]}"); then
-               return 1
-       fi
-
        if ! json=$(json_object "context"    "$context"       \
                                "repository" "$repository"    \
                                "branch"     "$branch"        \
                                "commit"     "$commit"        \
                                "result"     "$result"        \
-                               "logs"       "$log_array"     \
                                "artifacts"  "$artifact_array"); then
                return 1
        fi
@@ -115,19 +108,6 @@ foundry_msg_build_get_result() {
        return 0
 }
 
-foundry_msg_build_get_logs() {
-       local msg="$1"
-
-       local logs
-
-       if ! logs=$(foundry_msg_get_data_field "$msg" "logs[]"); then
-               return 1
-       fi
-
-       echo "$logs"
-       return 0
-}
-
 foundry_msg_build_get_artifacts() {
        local msg="$1"
 
index b013266ea0cae26a52a4994fce6f17956d3a57f3..271a1c6fa79f61ef0de0add8b8e15cd47b043caa 100644 (file)
@@ -16,22 +16,15 @@ foundry_msg_test_new() {
        local branch="$3"
        local commit="$4"
        local result="$5"
-       local logs=("${@:6}")
 
-       local logs_json
        local json
        local msg
 
-       if ! logs_json=$(json_array "${logs[@]}"); then
-               return 1
-       fi
-
        if ! json=$(json_object "context"    "$context"    \
                                "repository" "$repository" \
                                "branch"     "$branch"     \
                                "commit"     "$commit"     \
-                               "result"     "$result"     \
-                               "logs"       "$logs_json"); then
+                               "result"     "$result"); then
                return 1
        fi
 
@@ -107,16 +100,3 @@ foundry_msg_test_get_result() {
        echo "$result"
        return 0
 }
-
-foundry_msg_test_get_logs() {
-       local msg="$1"
-
-       local logs
-
-       if ! logs=$(foundry_msg_get_data_field "$msg" "logs[]"); then
-               return 1
-       fi
-
-       echo "$logs"
-       return 0
-}