Update .gitlab-ci.yml file

This commit is contained in:
kris
2025-11-11 04:20:32 +00:00
parent ea5ab83795
commit 3d134d7b8e
+13 -4
View File
@@ -48,17 +48,26 @@ stages:
else else
echo "️ No CloudFront distribution specified — skipping invalidation" echo "️ No CloudFront distribution specified — skipping invalidation"
fi fi
# Notifikasi Discord # 🔔 Notifikasi Discord
- | - |
RUN_URL="${CI_PROJECT_URL}/-/pipelines/${CI_PIPELINE_ID}" RUN_URL="${CI_PROJECT_URL}/-/pipelines/${CI_PIPELINE_ID}"
# Tentukan nama environment untuk pesan
if [ "$CI_COMMIT_BRANCH" = "devops-s3" ]; then
ENVIRONMENT_NAME="WEB-LTI-DEV"
elif [ "$CI_COMMIT_BRANCH" = "master" ]; then
ENVIRONMENT_NAME="WEB-LTI-DEV"
else
ENVIRONMENT_NAME="UNKNOWN"
fi
if [ "$STATUS" = "success" ]; then if [ "$STATUS" = "success" ]; then
COLOR=3066993 COLOR=3066993
TITLE="✅ Deployment Succeeded" TITLE="✅ Deployment ${ENVIRONMENT_NAME} Succeeded"
DESC="Deployment job on branch \`${CI_COMMIT_REF_NAME}\` completed successfully." DESC="Deployment job on branch \`${CI_COMMIT_REF_NAME}\` completed successfully."
else else
COLOR=15158332 COLOR=15158332
TITLE="❌ Deployment Failed" TITLE="❌ Deployment ${ENVIRONMENT_NAME} Failed"
DESC="Deployment job on branch \`${CI_COMMIT_REF_NAME}\` encountered issues." DESC="Deployment job on branch \`${CI_COMMIT_REF_NAME}\` encountered issues."
fi fi
@@ -71,7 +80,7 @@ stages:
--arg commit "$CI_COMMIT_SHA" \ --arg commit "$CI_COMMIT_SHA" \
--arg run_url "$RUN_URL" \ --arg run_url "$RUN_URL" \
'{ '{
username: "CI Bot - LTI API", username: "CI Bot - LTI WEB",
embeds: [{ embeds: [{
title: $title, title: $title,
description: $desc, description: $desc,