diff --git a/.gitee/Dockerfile b/.gitee/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..88afd34cedef7d3f4fa54b6f2ff866a753e0c89e --- /dev/null +++ b/.gitee/Dockerfile @@ -0,0 +1,2 @@ +FROM python:3 +RUN pip3 install requests \ No newline at end of file diff --git a/.gitee/callback.py b/.gitee/callback.py new file mode 100644 index 0000000000000000000000000000000000000000..b52d702032fff3384f76594113a833e9644e3d7e --- /dev/null +++ b/.gitee/callback.py @@ -0,0 +1,31 @@ +import os +import requests +import json + + +# sha=os.system("git rev-parse HEAD") +sha = os.getenv("GIT_COMMIT") +# sha = '48fed26c51a8c42554e45f72f43e49703e04c97f' +#get sha from environment +url = "https://gitee.com/api/v5/repos/deepin-community-store/spark-store/commits/{}/comments".format(sha) + +token = os.getenv("gitee_token") + +# process = os.popen("git symbolic-ref --short -q HEAD") + +body = "构建详情请见" + os.getenv("JENKINS_URL") + "blue/organizations/jenkins/" + os.getenv("JOB_NAME").replace("/", "/detail/") + "/" + str(os.getenv("BUILD_ID")) + +# process.close() + +d = { + 'access_token': token, + "body": body +} + +h = { + "Content-Type": "application/json;charset=UTF-8" +} + +res = requests.post(url,headers=h, data=json.dumps(d)) +# print(res.status_code) +# print(res.content) \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000000000000000000000000000000000..dab36e40b3d8404f9e1cafd01ec39cf8c9df6283 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,33 @@ +pipeline { + agent any + stages { + stage('build') { + agent { + docker { + image 'jerry979/dtke:5.11' + } + + } + steps { + sh 'mkdir build && cd build && qmake .. && make ' + archiveArtifacts(artifacts: 'build/src/spark-store', allowEmptyArchive: true, defaultExcludes: true) + } + } + + stage('send') { + agent { + dockerfile { + filename '.gitee/Dockerfile' + } + + } + environment { + gitee_token = credentials('1') + } + steps { + sh "python3 .gitee/callback.py" + } + } + + } +} \ No newline at end of file diff --git "a/assets/fonts/\345\215\216\345\272\267\345\260\221\345\245\263\345\255\227\344\275\223.ttf" b/assets/fonts/hksnzt.ttf similarity index 100% rename from "assets/fonts/\345\215\216\345\272\267\345\260\221\345\245\263\345\255\227\344\275\223.ttf" rename to assets/fonts/hksnzt.ttf diff --git a/assets/icons.qrc b/assets/icons.qrc index 6c797cbe9b57c80e6cd2b89cd303dde850c82416..9c8ed0197d29da0265346d76decf241ade534355 100644 --- a/assets/icons.qrc +++ b/assets/icons.qrc @@ -64,6 +64,6 @@ tags/dwine2-small.png - fonts/华康少女字体.ttf + fonts/hksnzt.ttf