-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
66 lines (58 loc) · 2.01 KB
/
azure-pipelines.yml
File metadata and controls
66 lines (58 loc) · 2.01 KB
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
56
57
58
59
60
61
62
63
64
65
66
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
- develop
pool:
name: 'Default'
workspace:
clean: all # what to clean up before the job runs
steps:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$ROOT = (Get-Item -Path ".\").FullName
$URI = $env:GCF_PATH
$URI = "$($URI)GenerateNetlinxCompileCfg?"
$URI = "$($URI)root=$($ROOT)"
$URI = "$($URI)&logfile=compile.log"
$URI = "$($URI)&logconsole=false"
# Fetching compile.cfg
$R = Invoke-WebRequest -Uri $URI -Method POST -InFile ".\netlinx-global-code.apw" -OutFile ".\compile.cfg" -PassThru -UseBasicParsing
# Output to Console
Get-Content -Path ".\compile.cfg"
# Exit wtith Compiler Exit Code
IF($R.StatusCode -ne 200){
Exit 1
}
displayName: 'Fetching the compiler config'
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
# Set Absoulte Root to files
$ROOT = (Get-Item -Path ".\").FullName
# Compile the Workspace from the Compiler .cfg file
$P = Start-Process -FilePath "C:\Program Files (x86)\Common Files\AMXShare\COM\NLRC.exe" -ArgumentList "-CFG""$($ROOT)\compile.cfg""" -NoNewWindow -Wait -PassThru
# Exit wtith Compiler Exit Code
exit $P.ExitCode
displayName: 'Compiling the Project'
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
# Set Root File
$ROOT = (Get-Item -Path ".\").FullName
# Get a clean log report
$URI = $env:GCF_PATH
$URI = "$($URI)ProcessNetlinxCompileLog?"
$URI = "$($URI)root=$($ROOT)"
# Fetch the Report
$R = Invoke-WebRequest -Uri $URI -Method POST -InFile ".\compile.log" -OutFile ".\clean.log" -PassThru -UseBasicParsing
# Output to Console
Get-Content -Path ".\clean.log"
displayName: 'Getting Compile Report'
condition: always()