From 838f1494b25a2b1d7ee05777d0be0d393600e5af Mon Sep 17 00:00:00 2001
From: PollosD <55781685+PollosD@users.noreply.github.com>
Date: Thu, 24 Mar 2022 15:41:35 +0800
Subject: [PATCH 1/2] Delete send_message-export.sh
---
send_message-export.sh | 55 ------------------------------------------
1 file changed, 55 deletions(-)
delete mode 100644 send_message-export.sh
diff --git a/send_message-export.sh b/send_message-export.sh
deleted file mode 100644
index 385c51a..0000000
--- a/send_message-export.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-CHAT_WEBHOOK_KEY="4588f102-f5c0-4a1f-9164-b73662f945e6"
-CHAT_CONTENT_TYPE='Content-Type: application/json'
-if [ _"${TYPE}" = _"success" -o _"${TYPE}" = _"failure" ]; then
- CHAT_WEBHOOK_URL='https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key'
-fi
-
-if [ _"${CHAT_WEBHOOK_KEY}" = _"" ]; then
- echo "please make sure CHAT_WEBHOOK_KEY has been exported as environment variable"
-
-fi
-echo "## send message for : ${TYPE}"
-if [ _"${TYPE}" = _"success" ]; then
- curl "${CHAT_WEBHOOK_URL}=${CHAT_WEBHOOK_KEY}" \
- -H "${CHAT_CONTENT_TYPE}" \
- -d '
- {
- "msgtype": "markdown",
- "markdown": {
- "content": "**Jenkins任务通知** \n
- >构建人:'"${BUILD_USER}"'
- >构建时间:'"${BUILD_TIME}"'
- >任务名称:'"${JOB_NAME}"'
- >构建次数:'"${BUILD_NUM}"'
- >任务地址:[点击查看]('"${URL_JOB}"')
- >构建日志:[点击查看]('"${URL_LOG}"')
- >构建状态:**Success** \n
- >任务已构建完成请确认:<@'"${JOB_TIPS1}"'>"
-
- }
- }
-'
-elif [ _"${TYPE}" = _"failure" ]; then
- curl "${CHAT_WEBHOOK_URL}=${CHAT_WEBHOOK_KEY}" \
- -H "${CHAT_CONTENT_TYPE}" \
- -d '
- {
-
- "msgtype": "markdown",
- "markdown": {
-
- "content": "**Jenkins任务通知** \n
- >构建人:'"${BUILD_USER}"'
- >构建时间:'"${BUILD_TIME}"'
- >任务名称:'"${JOB_NAME}"'
- >构建次数:'"${BUILD_NUM}"'
- >任务地址:[点击查看]('"${URL_JOB}"')
- >构建日志:[点击查看]('"${URL_LOG}"')
- >构建状态:**Failure**
- >任务已构建完成请确认:<@'"${JOB_TIPS1}"'>"
-
- }
- }
-'
-fi
From 0ad21d5269663df3b325c79b1f162d98381875fe Mon Sep 17 00:00:00 2001
From: PollosD <55781685+PollosD@users.noreply.github.com>
Date: Thu, 24 Mar 2022 15:41:55 +0800
Subject: [PATCH 2/2] Delete Jenkinsfile
---
Jenkinsfile | 82 -----------------------------------------------------
1 file changed, 82 deletions(-)
delete mode 100644 Jenkinsfile
diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index 9d5f7f6..0000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,82 +0,0 @@
-pipeline {
- agent {
- label 'ecs-agent'
- }
- options {
- timeout(time: 30, unit: 'MINUTES')
- buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
- }
- environment {
- IMAGE = """${sh(
- returnStdout: true,
- script: 'echo ${NEW_ALI_REGISTRY}"/masa/masa-blazor-pro:0.0."${BUILD_ID}'
- )}"""
- IMAGE_PRD = """${sh(
- returnStdout: true,
- script: 'echo ${NEW_ALI_REGISTRY}"/masa/masa-blazor-pro:"${GIT_BRANCH}'
- )}"""
- NEW_ALI_REGISTRY_AUTH = credentials('NEW_ALI_REGISTRY_AUTH')
- KUBE_CONFIG_DEV = credentials('k8s-ack')
- KUBE_CONFIG_PRD = credentials('k8s-ack-prd')
- }
- stages {
- stage('docker-dev') {
- options {
- retry (2)
- }
- when {
- branch 'develop'
- }
- steps {
- sh '''
- docker login $NEW_ALI_REGISTRY --username=$NEW_ALI_REGISTRY_AUTH_USR -p $NEW_ALI_REGISTRY_AUTH_PSW
- docker build --force-rm -f ./Masa.Blazor.Pro/Dockerfile -t $IMAGE .
- docker push $IMAGE
- docker rmi $IMAGE
- '''
- }
- }
- stage('deploy-dev') {
- when {
- branch 'develop'
- }
- steps {
- sh '''
- echo $KUBE_CONFIG_DEV | base64 -d > ./config
- kubectl --kubeconfig ./config set image deployment/masa-blazor-pro masa-blazor-pro=$IMAGE -n masa-blazor
- '''
- }
- }
- stage('docker-prd') {
- options {
- retry (2)
- }
- when {
- buildingTag()
- }
- steps {
- sh '''
- docker login $NEW_ALI_REGISTRY --username=$NEW_ALI_REGISTRY_AUTH_USR -p $NEW_ALI_REGISTRY_AUTH_PSW
- docker build --force-rm -f ./Masa.Blazor.Pro/Dockerfile -t $IMAGE_PRD .
- docker push $IMAGE_PRD
- docker rmi $IMAGE_PRD
- '''
- }
-
- }
- stage('deploy-prd') {
- when {
- buildingTag()
- }
- steps {
- sh '''
- echo $KUBE_CONFIG_PRD | base64 -d > ./config
- kubectl --kubeconfig ./config set image deployment/masa-blazor-pro masa-blazor-pro=$IMAGE -n masa-blazor
- '''
- }
- }
- }
-}
-
-
-