88 lines
2.6 KiB
YAML
88 lines
2.6 KiB
YAML
variables:
|
|
VERS_MAIN: '0.9'
|
|
NEW_REL: ''
|
|
APP_NAME: 'SMGen'
|
|
SOL_NAME: 'SMGen'
|
|
|
|
# helper x fix pacchetti nuget da repo locale nexus.steamware.net
|
|
.nuget-fix: &nuget-fix
|
|
- |
|
|
echo "esecuzione Nuget FIX steps"
|
|
dotnet nuget list source
|
|
$hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus Proxy"
|
|
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
|
dotnet nuget remove source "`"Steamware Nexus Proxy`""
|
|
}
|
|
$hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus"
|
|
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
|
dotnet nuget remove source "`"Steamware Nexus`""
|
|
}
|
|
$hasSource = dotnet nuget list source | Select-String -Pattern "nexus-proxy-v3"
|
|
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
|
dotnet nuget remove source nexus-proxy-v3
|
|
}
|
|
dotnet nuget add source https://nexus.steamware.net/repository/nuget-group-3/index.json -n "Steamware Nexus" -u nugetUser -p $NEXUS_PASSWD --store-password-in-clear-text
|
|
echo "Steamware Nexus Source added"
|
|
|
|
|
|
|
|
stages:
|
|
- build
|
|
- staging
|
|
- deploy
|
|
|
|
# ---------- BUILD ----------
|
|
SMGen:build:
|
|
stage: build
|
|
tags:
|
|
- win
|
|
variables:
|
|
APP_NAME: SMGen
|
|
SOL_NAME: SMGen
|
|
before_script:
|
|
- *nuget-fix
|
|
- dotnet restore "$env:SOL_NAME.sln"
|
|
script:
|
|
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
|
|
|
|
|
# ---------- STAGING ----------
|
|
SMGen:staging:
|
|
stage: staging
|
|
tags:
|
|
- win
|
|
variables:
|
|
APP_NAME: SMGen
|
|
SOL_NAME: SMGen
|
|
only:
|
|
- develop
|
|
needs: ["SMGen:build"]
|
|
before_script:
|
|
- *nuget-fix
|
|
- dotnet restore "$env:SOL_NAME.sln"
|
|
script:
|
|
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
|
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
|
|
|
# ---------- DEPLOY ----------
|
|
SMGen:deploy:
|
|
stage: deploy
|
|
tags:
|
|
- win
|
|
environment:
|
|
name: production
|
|
url: https://office.egalware.com/MP/SMGEN
|
|
variables:
|
|
APP_NAME: SMGen
|
|
SOL_NAME: SMGen
|
|
only:
|
|
- master
|
|
needs: ["SMGen:build"]
|
|
before_script:
|
|
- *nuget-fix
|
|
- dotnet restore "$env:SOL_NAME.sln"
|
|
script:
|
|
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
|
# IIS PROD
|
|
- dotnet publish -p:PublishProfile=IIS-PROD.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|