Files
egtbeamwall/.gitlab-ci.yml
T
2022-03-31 14:38:07 +02:00

79 lines
2.5 KiB
YAML

variables:
NUGET_PATH: 'C:\Tools\nuget.exe'
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
ASPNET_MERGE_PATH: 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools'
EXE_RELEASE_FOLDER: 'c:\Projetcs\Compiled\GPW\Release'
DEPLOY_FOLDER: 'c:\Projects\Deploy\GPW\Builds'
APP_NAME: 'EgtBEAMWALL'
APP_NAMEG: 'EgtBEAMWALL'
NEW_REL: ''
OUTPUT_DIR: ''
NET_SHARE: '\\10.74.82.201\Artifacts'
NET_USER: 'steamw\steamware'
# helper x mount cartella Artifacts su truenas
.ReplicaCompiled: &ReplicaCompiled
- |
ROBOCOPY /MIR $env:APP_NAME\bin\x64\Debug Z:\
SLEEP 2
net use Z: /delete
.MakeFolderM: &MakeFolderM
- |
net use Z: /delete
new-item c:\EgtProg\EgtBEAMWALL -itemtype directory
net use Z: $env:NET_SHARE
.nuget-fix: &nuget-fix
- |
$hasSource = C:\Tools\nuget.exe sources list | find "`"Steamware Nexus`"" /C
if ($hasSource -eq 0) {
C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`""
} else {
C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`""
}
echo $hasSource
# helper creazione hash files
.hashBuild: &hashBuild
- |
$Target = "Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip"
$MD5 = Get-FileHash $Target -Algorithm MD5
$SHA1 = Get-FileHash $Target -Algorithm SHA1
New-Item $Target".md5"
New-Item $Target".sha1"
$MD5.Hash | Set-Content -Path $Target".md5"
$SHA1.Hash | Set-Content -Path $Target".sha1"
echo "Created HASH files for $Target"
.cleanup-zip: &cleanup-zip
- |
$env:OUTPUT_DIR = "Releases\" + $CI_COMMIT_BRANCH + "\*"
if ((Test-Path $env:OUTPUT_DIR))
{
Remove-Item $env:OUTPUT_DIR -Force -Recurse -ErrorAction Ignore
}
echo "Clening ZIP dir: $env:OUTPUT_DIR"
stages:
- build
- deploy
SupervisorR:build:
stage: build
tags:
- win
variables:
APP_NAME: EgtBEAMWALL.Supervisor
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore EgtBEAMWALL.sln -verbosity quiet'
- *MakeFolderM
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.vbproj" -target:Build /p:Configuration=Release /p:Platform="x86" /p:OutputPath=bin/ /verbosity:minimal /m'
- *ReplicaCompiled