Inizio gestione fix gitlab

This commit is contained in:
Samuele Locatelli
2021-09-10 18:17:07 +02:00
parent 1d6788c89d
commit a5bb3f7285
+18 -32
View File
@@ -4,11 +4,10 @@ variables:
ASPNET_MERGE_PATH: 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools'
EXE_RELEASE_FOLDER: 'c:\Projetcs\Compiled\MoonPro\Release'
DEPLOY_FOLDER: 'c:\Projects\Deploy\MoonPro\Builds'
VERS_MAIN: '2.8'
VERS_MAIN: '6.13'
NEW_REL: ''
# VERS_MAIN: '1.0'
NEXUS_PATH: 'MoonPro'
# APP_NAME: 'MP.Stats'
NEXUS_PATH: 'MP'
APP_NAME: 'MP-XXX'
# VARIABILI
@@ -53,7 +52,7 @@ variables:
Set-Alias mCurl C:\Windows\system32\curl.exe
$currentDate = get-date -format yyMM;
$currentTime = get-date -format ddHH;
$VersNumb = Get-Content "Resources\VersNum.txt"
$VersNumb = $env:NEW_REL
echo "Curr Version: $VersNumb"
if($CI_COMMIT_BRANCH -eq "master")
{
@@ -66,11 +65,11 @@ variables:
$File2Send = Get-ChildItem($env:APP_NAME + "\bin\publish\*")
ForEach ($File in $File2Send) {
$FileName = Split-Path $File -leaf
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File http://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/0/$FileName
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File http://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/$VersNumb/$FileName
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File http://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$env:APP_NAME/$version/0/$FileName
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File http://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$env:APP_NAME/$version/$VersNumb/$FileName
}
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "Resources\manifest.xml" http://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/0/manifest.xml
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "Resources\ChangeLog.html" http://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/0/ChangeLog.html
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "Resources\manifest.xml" http://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$env:APP_NAME/$version/0/manifest.xml
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "Resources\ChangeLog.html" http://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$env:APP_NAME/$version/0/ChangeLog.html
@@ -78,7 +77,7 @@ variables:
# helper x fix version number
.version-fix: &version-fix
- |
$env:NEW_REL = $env:VERS_MAIN+"."+(get-date format yyMM)+"."+$CI_PIPELINE_IID
$env:NEW_REL = $env:VERS_MAIN+"."+(get-date format yyMM)+"."+(get-date format dHH)
echo "Set vers: $env:NEW_REL"
$contenuto = Get-Content -path 'VersGen\MoonPro.cs' -Raw
$newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL
@@ -91,8 +90,10 @@ stages:
- installer
AC:build:
AIS:build:
stage: build
variables:
CURR_PRJ: "MP-ADM"
tags:
- win
before_script:
@@ -101,9 +102,7 @@ AC:build:
- *version-fix
script:
- '& "$env:MSBUILD_PATH" MP-ADM/MP-ADM.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
- '& "$env:MSBUILD_PATH" MP-IO/MP-IO.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
- '& "$env:MSBUILD_PATH" MP-SITE/MP-SITE.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
@@ -124,7 +123,7 @@ AC:build:
# - '$env:EXE_RELEASE_FOLDER\GPW_Barcode\' # saving entire Test project so NUnit can run tests
# - '$env:DEPLOY_FOLDER\GPW_Barcode\' # saving entire Test project so NUnit can run tests
BHS:build:
LMMT:build:
stage: build
tags:
- win
@@ -133,12 +132,9 @@ BHS:build:
- '& "$env:NUGET_PATH" restore MAPO.sln'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" MP-LAND/MP-LAND.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
- '& "$env:MSBUILD_PATH" MP-LAND/MP-LAND.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
- '& "$env:MSBUILD_PATH" MP-MON/MP-MON.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
- '& "$env:MSBUILD_PATH" MP-TAB/MP-TAB.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
- '& "$env:MSBUILD_PATH" MP-MAG/MP-MAG.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
@@ -157,7 +153,7 @@ BHS:build:
# - build_job
AC:staging:
AIS:staging:
stage: staging
tags:
- win
@@ -171,19 +167,9 @@ AC:staging:
- '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal MP-ADM/MP-ADM.csproj'
- '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal MP-IO/MP-IO.csproj'
- '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal MP-SITE/MP-SITE.csproj'
needs: ["AIS:build"]
# cache:
# #key: ${CI_COMMIT_REF_SLUG}
# # key: ${CI_JOB_NAME}
# key: GPW-pack
# paths:
# - packages/
# policy: pull
needs: ["AC:build"]
# when:
# manual
BHS:staging:
LMMT:staging:
stage: staging
tags:
- win
@@ -198,7 +184,7 @@ BHS:staging:
- '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal MP-MON/MP-MON.csproj'
- '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal MP-TAB/MP-TAB.csproj'
- '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal MP-MAG/MP-MAG.csproj'
needs: ["BHS:build"]
needs: ["LMMT:build"]
AC:deploy: