129 lines
4.0 KiB
YAML
129 lines
4.0 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: ''
|
|
VERS_RD: 'Release'
|
|
ARCH: 'x86'
|
|
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\$env:ARCH\$env:VERS_RD Z:\$CI_COMMIT_BRANCH\$env:ARCH
|
|
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-dir: &cleanup-dir
|
|
- |
|
|
rm $env:APP_NAME\bin\$env:ARCH\$env:VERS_RD\*.xml
|
|
rm $env:APP_NAME\bin\$env:ARCH\$env:VERS_RD\*.pdb
|
|
|
|
stages:
|
|
- build
|
|
- deploy
|
|
|
|
Supervisor_x86:build:
|
|
stage: build
|
|
tags:
|
|
- win
|
|
variables:
|
|
APP_NAME: EgtBEAMWALL.Supervisor
|
|
VERS_RD: 'Release'
|
|
ARCH: 'x86'
|
|
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=$env:VERS_RD /p:Platform="$env:ARCH" /p:OutputPath=bin/$env:ARCH/$env:VERS_RD/ /verbosity:minimal /m'
|
|
- *cleanup-dir
|
|
- *ReplicaCompiled
|
|
|
|
Supervisor_x64:build:
|
|
stage: build
|
|
tags:
|
|
- win
|
|
variables:
|
|
APP_NAME: EgtBEAMWALL.Supervisor
|
|
VERS_RD: 'Release'
|
|
ARCH: 'x64'
|
|
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=$env:VERS_RD /p:Platform="$env:ARCH" /p:OutputPath=bin/$env:ARCH/$env:VERS_RD/ /verbosity:minimal /m'
|
|
- *cleanup-dir
|
|
- *ReplicaCompiled
|
|
|
|
ViewOptimizer:build:
|
|
stage: build
|
|
tags:
|
|
- win
|
|
variables:
|
|
APP_NAME: EgtBEAMWALL.ViewOptimizer
|
|
VERS_RD: 'Release'
|
|
ARCH: 'x86'
|
|
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=$env:VERS_RD /p:Platform="$env:ARCH" /p:OutputPath=bin/$env:ARCH/$env:VERS_RD/ /verbosity:minimal /m'
|
|
- *cleanup-dir
|
|
- *ReplicaCompiled
|
|
|
|
ViewOptimizer_x64:build:
|
|
stage: build
|
|
tags:
|
|
- win
|
|
variables:
|
|
APP_NAME: EgtBEAMWALL.ViewOptimizer
|
|
VERS_RD: 'Release'
|
|
ARCH: 'x64'
|
|
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=$env:VERS_RD /p:Platform="$env:ARCH" /p:OutputPath=bin/$env:ARCH/$env:VERS_RD/ /verbosity:minimal /m'
|
|
- *cleanup-dir
|
|
- *ReplicaCompiled
|