Skip to content

Commit

Permalink
ci: implementing new workflow using kash repository
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-greffe committed Mar 10, 2024
1 parent 4393644 commit 33ba122
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ send_coverage_to_cc 8e87a996279373f05f01ce8166aac1bc9dda990e9a2f936af25e5aa11326
## Notify on slack
##
get_git_commit_url() {
local REPO_ROOT="$1"
local ROOT_DIR="$1"
local REPO_NAME="$2"
local COMMIT_SHA
COMMIT_SHA=$(get_git_commit_sha "$REPO_ROOT")
COMMIT_SHA=$(get_git_commit_sha "$ROOT_DIR")

local GITHUB_REPO_URL="https://github.com/kalisio/$REPO_NAME"
local COMMIT_URL="$GITHUB_REPO_URL/commit/$COMMIT_SHA"
Expand All @@ -68,19 +68,19 @@ get_git_commit_url() {
}

generate_slack_message() {
local REPO_ROOT="$1"
local ROOT_DIR="$1"
local APP="$2"
local WORKSPACE_BRANCH="$3"
local COMMIT_SHA
local COMMIT_URL
local AUTHOR
COMMIT_SHA=$(get_git_commit_sha "$REPO_ROOT")
COMMIT_URL=$(get_git_commit_url "$REPO_ROOT")
COMMIT_SHA=$(get_git_commit_sha "$ROOT_DIR")
COMMIT_URL=$(get_git_commit_url "$ROOT_DIR")
AUTHOR=$(get_git_commit_author_name "$THIS_DIR")

echo "Build ([$COMMIT_SHA]($COMMIT_URL)) of $APP@$WORKSPACE_BRANCH by $AUTHOR failed"
}

message=$(generate_slack_message "$REPO_ROOT" "$APP" "$WORKSPACE_BRANCH")
message=$(generate_slack_message "$ROOT_DIR" "$APP" "$WORKSPACE_BRANCH")

slack_color_log "$SLACK_WEBHOOK_LIBS" "$message" "#008000"

0 comments on commit 33ba122

Please sign in to comment.