Skip to content
Snippets Groups Projects
Verified Commit 2701919f authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: test pipeline

parent 0cff5402
No related branches found
No related tags found
No related merge requests found
...@@ -37,25 +37,28 @@ in ...@@ -37,25 +37,28 @@ in
if [ "$(echo $publishingResult | jq .id)" == null ] ; then if [ "$(echo $publishingResult | jq .id)" == null ] ; then
echo_fail "Failed to publish the project." echo_fail "Failed to publish the project."
json=$(jq -n \ json=$(${pkgs'.jq}/bin/jq -n \
--arg name "$(echo $publishingResult | jq -r .name)" \ --arg name "$(echo $publishingResult | ${pkgs'.jq}/bin/jq -r .name)" \
--arg version "$(echo $publishingResult | jq -r .version)" \ --arg version "$(echo $publishingResult | ${pkgs'.jq}/bin/jq -r .version)" \
'{text: ("Oh no, we failed to publish the " + $version + " version of " + $name + " :x:")}') '{text: ("Oh no, we failed to publish the " + $version + " version of " + $name + " :x:")}')
${pkgs'.curl}/bin/curl --header "Content-Type: application/json" --request POST \ ${pkgs'.curl}/bin/curl --header "Content-Type: application/json" --request POST \
--data "$json" $MATTERMOST_WEBHOOK --data "$json" $MATTERMOST_WEBHOOK
exit 1 exit 1
fi fi
json=$(jq -n \ if [[ -n "$MATTERMOST_WEBHOOK" ]]; then
--arg name "$(echo $publishingResult | jq -r .name)" \
--arg version "$(echo $publishingResult | jq -r .version)" \ json=$(${pkgs'.jq}/bin/jq -n \
--arg name "$(echo $publishingResult | ${pkgs'.jq}/bin/jq -r .name)" \
--arg version "$(echo $publishingResult | ${pkgs'.jq}/bin/jq -r .version)" \
'{icon_emoji: ":monster:", text: ("We have just launched the " + $version + " version of " + $name + "! Give it a try. :rocket:")}') '{icon_emoji: ":monster:", text: ("We have just launched the " + $version + " version of " + $name + "! Give it a try. :rocket:")}')
${pkgs'.curl}/bin/curl --header "Content-Type: application/json" --request POST \ ${pkgs'.curl}/bin/curl --header "Content-Type: application/json" --request POST \
--data "$json" $MATTERMOST_WEBHOOK --data "$json" $MATTERMOST_WEBHOOK
fi
echo_ok "Build and publish successful." echo_ok "Build and publish successful."
'' ''
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment