CI 수정
This commit is contained in:
@@ -11,6 +11,31 @@ build:
|
|||||||
IMAGE_NAME: $REGISTRT/$APP:$VER
|
IMAGE_NAME: $REGISTRT/$APP:$VER
|
||||||
script:
|
script:
|
||||||
- docker build --pull -t "$IMAGE_NAME" .
|
- docker build --pull -t "$IMAGE_NAME" .
|
||||||
|
after_script:
|
||||||
|
- |
|
||||||
|
if [ "$CI_JOB_STATUS" == "success" ]; then
|
||||||
|
curl -s -o /dev/null -X POST -H 'Content-Type: application/json' -d "{
|
||||||
|
\"username\": \"CI/CD 알림\",
|
||||||
|
\"icon_url\": \"https://www.claranet.com/br/sites/all/assets/br/cicd-icon.svg\",
|
||||||
|
\"attachments\": [{
|
||||||
|
\"color\": \"#0000FF\",
|
||||||
|
\"author_name\": \"$APP 빌드 결과\",
|
||||||
|
\"author_icon\": \"https://www.claranet.com/br/sites/all/assets/br/cicd-icon.svg\",
|
||||||
|
\"text\": \"$APP의 빌드가 성공적으로 마무리 되었습니다.<br>빌드 버전 : $VER\"
|
||||||
|
}]
|
||||||
|
}" https://chat.exem.io/hooks/d8eb7x771pdaiym8xfgju8mx8a
|
||||||
|
else
|
||||||
|
curl -s -o /dev/null -X POST -H 'Content-Type: application/json' -d "{
|
||||||
|
\"username\": \"CI/CD 알림\",
|
||||||
|
\"icon_url\": \"https://www.claranet.com/br/sites/all/assets/br/cicd-icon.svg\",
|
||||||
|
\"attachments\": [{
|
||||||
|
\"color\": \"#FF0000\",
|
||||||
|
\"author_name\": \"$APP 빌드 결과\",
|
||||||
|
\"author_icon\": \"https://www.claranet.com/br/sites/all/assets/br/cicd-icon.svg\",
|
||||||
|
\"text\": \"$APP의 빌드에 실패하였습니다!<br>빌드 버전 : $VER\"
|
||||||
|
}]
|
||||||
|
}" https://chat.exem.io/hooks/d8eb7x771pdaiym8xfgju8mx8a
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- if: '$TRIGGER_NAME == "exemone_java_agent"'
|
- if: '$TRIGGER_NAME == "exemone_java_agent"'
|
||||||
|
|
||||||
@@ -25,5 +50,29 @@ push:
|
|||||||
- docker login -u "$REGSITRY_USER" -p "$REGSITRY_PASSWORD" $REGISTRT
|
- docker login -u "$REGSITRY_USER" -p "$REGSITRY_PASSWORD" $REGISTRT
|
||||||
script:
|
script:
|
||||||
- docker push "$IMAGE_NAME"
|
- docker push "$IMAGE_NAME"
|
||||||
|
after_script:
|
||||||
|
- |
|
||||||
|
if [ "$CI_JOB_STATUS" == "success" ]; then
|
||||||
|
curl -s -o /dev/null -X POST -H 'Content-Type: application/json' -d "{
|
||||||
|
\"username\": \"CI/CD 알림\",
|
||||||
|
\"icon_url\": \"https://www.claranet.com/br/sites/all/assets/br/cicd-icon.svg\",
|
||||||
|
\"attachments\": [{
|
||||||
|
\"color\": \"#0000FF\",
|
||||||
|
\"author_name\": \"$APP 푸시 결과\",
|
||||||
|
\"author_icon\": \"https://www.claranet.com/br/sites/all/assets/br/cicd-icon.svg\",
|
||||||
|
\"text\": \"$APP의 푸시가 성공적으로 마무리 되었습니다.<br>이미지 주소 : $IMAGE_NAME\"
|
||||||
|
}]
|
||||||
|
}" https://chat.exem.io/hooks/d8eb7x771pdaiym8xfgju8mx8a
|
||||||
|
else
|
||||||
|
curl -s -o /dev/null -X POST -H 'Content-Type: application/json' -d "{
|
||||||
|
\"username\": \"CI/CD 알림\",
|
||||||
|
\"icon_url\": \"https://www.claranet.com/br/sites/all/assets/br/cicd-icon.svg\",
|
||||||
|
\"attachments\": [{
|
||||||
|
\"color\": \"#FF0000\",
|
||||||
|
\"author_name\": \"$APP 푸시 결과\",
|
||||||
|
\"author_icon\": \"https://www.claranet.com/br/sites/all/assets/br/cicd-icon.svg\",
|
||||||
|
\"text\": \"$APP의 푸시에 실패하였습니다!\"
|
||||||
|
}]
|
||||||
|
}" https://chat.exem.io/hooks/d8eb7x771pdaiym8xfgju8mx8a
|
||||||
rules:
|
rules:
|
||||||
- if: '$TRIGGER_NAME == "exemone_java_agent"'
|
- if: '$TRIGGER_NAME == "exemone_java_agent"'
|
||||||
Reference in New Issue
Block a user