aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-02-19 17:14:19 +0800
committercrupest <crupest@outlook.com>2020-02-19 17:14:19 +0800
commit32765bc2009d36cd3bc124e2a9bb769fc3ec9b4b (patch)
tree86f2aa85bc8f331183721dad42b5bd87c2fa9337
parent810e4cb23f37809252e7767a988a68a146aca7bc (diff)
downloadtimeline-32765bc2009d36cd3bc124e2a9bb769fc3ec9b4b.tar.gz
timeline-32765bc2009d36cd3bc124e2a9bb769fc3ec9b4b.tar.bz2
timeline-32765bc2009d36cd3bc124e2a9bb769fc3ec9b4b.zip
Revert CI.
-rw-r--r--azure-pipelines.yml41
1 files changed, 18 insertions, 23 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index a99fa595..af2d4730 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -1,6 +1,6 @@
trigger:
-- master
-
+ - master
+
stages:
- stage: build
displayName: Routine Build and Test
@@ -23,7 +23,6 @@ stages:
dotnet restore Timeline/Timeline.csproj --configfile nuget.config
dotnet restore Timeline.Tests/Timeline.Tests.csproj --configfile nuget.config
displayName: Dotnet Restore
-
- script: dotnet test Timeline.Tests/Timeline.Tests.csproj --configuration $(buildConfiguration) --no-restore --logger trx --collect:"XPlat Code Coverage" --settings './Timeline.Tests/coverletArgs.runsettings'
displayName: Dotnet Test
@@ -63,26 +62,22 @@ stages:
- publish: Timeline/publish
artifact: timeline
- - job: deploy
+ - deployment: deploy
displayName: Deploy to Server
- pool:
- vmImage: 'ubuntu-18.04'
- variables:
- - group: sshkey
+ environment:
+ name: timeline-server
+ resourceType: VirtualMachine
+ tags: linux
dependsOn: build
-
- steps:
- - download: current
- artifact: timeline
+ strategy:
+ runOnce:
+ deploy:
+ steps:
+ - download: current
+ artifact: timeline
- - task: InstallSSHKey@0
- inputs:
- knownHostsEntry: $(knownHostsEntry)
- sshPublicKey: $(sshPublicKey)
- sshKeySecureFile: c4553c6f-a7f5-4778-b07c-763e71dd867a
-
- - script: |
- ssh timeline@crupest.xyz 'rm -rf /var/timeline/*'
- scp -r $PIPELINE_WORKSPACE/timeline/* timeline@crupest.xyz:/var/timeline/
- ssh timeline@crupest.xyz 'sudo systemctl restart timeline.service'
- displayName: 'Copy Files and Restart Service' \ No newline at end of file
+ - script: |
+ rm -rf /var/timeline/*
+ cp -r $PIPELINE_WORKSPACE/timeline/. /var/timeline/
+ sudo systemctl restart timeline.service
+ displayName: 'Copy Files and Restart Service'