forked from SirPlease/L4D2-Competitive-Rework
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
55 lines (49 loc) · 1.73 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
sshServiceConnection: 'L4D2 - Server'
stages:
- stage: Deploy
jobs:
- job: CompressAndUpload
steps:
- script: |
tar -czf addons.tar.gz -C $(Build.Repository.LocalPath)/addons .
tar -czf cfg.tar.gz -C $(Build.Repository.LocalPath)/cfg .
tar -czf bash.tar.gz -C $(Build.Repository.LocalPath)/bash .
tar -czf scripts.tar.gz -C $(Build.Repository.LocalPath)/scripts .
displayName: 'Compress files'
- task: CopyFilesOverSSH@0
inputs:
sshEndpoint: $(sshServiceConnection)
sourceFolder: '$(Build.Repository.LocalPath)'
contents: '*.tar.gz'
targetFolder: '/home/devops'
cleanTargetFolder: false
overwrite: true
readyTimeout: '20000'
- task: CopyFilesOverSSH@0
inputs:
sshEndpoint: $(sshServiceConnection)
sourceFolder: '$(Build.Repository.LocalPath)'
contents: |
host.txt
motd.txt
targetFolder: '/home/steam/l4d2/left4dead2'
cleanTargetFolder: false
overwrite: true
readyTimeout: '20000'
- task: SSH@0
inputs:
sshEndpoint: $(sshServiceConnection)
readyTimeout: '20000'
commands: |
tar -xzf /home/devops/addons.tar.gz -C /home/steam/l4d2/left4dead2/addons
tar -xzf /home/devops/bash.tar.gz -C /home/steam/l4d2/left4dead2/bash
tar -xzf /home/devops/cfg.tar.gz -C /home/steam/l4d2/left4dead2/cfg
tar -xzf /home/devops/scripts.tar.gz -C /home/steam/l4d2/left4dead2/scripts
dos2unix /home/steam/l4d2/left4dead2/bash/*.sh > /dev/null 2>&1
chmod +x /home/steam/l4d2/left4dead2/bash/*.sh
rm /home/devops/*.tar.gz