From 6be7f3e81b61e9ec4fb227160ee02e7768e174ec Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 10 Aug 2023 11:23:40 +0800 Subject: [PATCH 1/4] =?UTF-8?q?test-irc=20=E8=87=AA=E5=8A=A8=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- irc_api.drone.yml | 101 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 irc_api.drone.yml diff --git a/irc_api.drone.yml b/irc_api.drone.yml new file mode 100644 index 000000000..689c4c2bd --- /dev/null +++ b/irc_api.drone.yml @@ -0,0 +1,101 @@ +kind: pipeline +type: docker +name: irc-netcore-api + +steps: + - name: docker-build + image: docker + pull: if-not-exists + volumes: + - name: dockersock + path: /var/run/docker.sock + - name: cached_nuget_packages + path: /drone/nuget_packages + commands: + - date +%H:%M:%S + - pwd + - docker build -t Test.Study . + - date +%H:%M:%S + + - name: docker-deploy + image: docker + pull: if-not-exists + depends_on: + - docker-build + volumes: + - name: dockersock + path: /var/run/docker.sock + commands: + - date +%H:%M:%S + - docker rm -f test-study-container + - docker run -itd -e TZ=Asia/Shanghai -e ASPNETCORE_ENVIRONMENT=Test_Study --restart=always --name test-study-container -p 8030:80 Test.Study + - date +%H:%M:%S + +volumes: + - name: cached_nuget_packages + host: + path: /mnt/f/docker_publish/nuget_packages + - name: dockersock + host: + path: /var/run/docker.sock + +trigger: + branch: + - master + +--- + + +kind: pipeline +type: ssh +name: ssh-windows-test-study-publish + +platform: + os: windows + arch: amd64 + +clone: + disable: true #禁用默认克隆 + +server: + host: 123.56.94.154 + user: Administrator + password: WHxckj2019 + +steps: +- name: publish-test-study + commands: + - Start-Process "C:\CICD\Test.Study\netcore_Publish.bat" -Wait + +trigger: + branch: + - Test.Study + + +--- + + +kind: pipeline +type: ssh +name: ssh-windows-test-irc-publish + +platform: + os: windows + arch: amd64 + +clone: + disable: true #禁用默认克隆 + +server: + host: 123.56.94.154 + user: Administrator + password: WHxckj2019 + +steps: +- name: publish-test-irc + commands: + - Start-Process "C:\CICD\Test.IRC\netcore_Publish.bat" -Wait + +trigger: + branch: + - Test.IRC \ No newline at end of file From 8d8f9c166e74140c65754ef0e4833cdfbc420d72 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 10 Aug 2023 11:52:33 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E5=8F=91=E5=B8=83=E5=B0=9D=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- irc_api.drone.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/irc_api.drone.yml b/irc_api.drone.yml index 689c4c2bd..0733bb47d 100644 --- a/irc_api.drone.yml +++ b/irc_api.drone.yml @@ -66,6 +66,10 @@ steps: - name: publish-test-study commands: - Start-Process "C:\CICD\Test.Study\netcore_Publish.bat" -Wait + - cd C:\CICD\Test.Study\netcore_repo + - dotnet restore .\IRaCIS.Core.API\IRaCIS.Core.API.csproj --packages C:\Users\Administrator\.nuget\packages + - dotnet publish .\IRaCIS.Core.API\IRaCIS.Core.API.csproj -c Release --no-restore --packages C:\Users\Administrator\.nuget\packages -o D:\Develop\Test_Study_PublishSite\IRaCIS.NetCore.API + - Start-Service -Name "Test_Study_API" trigger: branch: From 4915b3c62c49ed3050535c452d1fa703b340d4a6 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 10 Aug 2023 13:14:16 +0800 Subject: [PATCH 3/4] =?UTF-8?q?powershell=20=E5=8F=91=E5=B8=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- irc_api.drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irc_api.drone.yml b/irc_api.drone.yml index 0733bb47d..fd098d6f8 100644 --- a/irc_api.drone.yml +++ b/irc_api.drone.yml @@ -98,7 +98,7 @@ server: steps: - name: publish-test-irc commands: - - Start-Process "C:\CICD\Test.IRC\netcore_Publish.bat" -Wait + - C:\CICD\Test.IRC\netcore_Publish.ps1 trigger: branch: From 270bccc432f45120b33d33da194e2315c85f4670 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 10 Aug 2023 13:59:49 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=90=8D=E7=A7=B0=20=20Test.IRC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/appsettings.Development.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.API/appsettings.Development.json b/IRaCIS.Core.API/appsettings.Development.json index db4a1fba2..17ea8a68d 100644 --- a/IRaCIS.Core.API/appsettings.Development.json +++ b/IRaCIS.Core.API/appsettings.Development.json @@ -7,7 +7,7 @@ } }, "ConnectionStrings": { - "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true", + "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Test.IRC;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true", "Hangfire": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Hangfire_IRaCIS;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true" },