Pulizia yaml install

This commit is contained in:
Samuele Locatelli
2021-06-23 14:46:09 +02:00
parent b5f5e1381a
commit b7f67488b2
+1 -88
View File
@@ -9,39 +9,6 @@ variables:
NEXUS_PATH: 'MP-STATS'
APP_NAME: 'MP.Stats'
# # helper x fix version number
# .version-fix: &version-fix
# - |
# $env:NEW_REL = $env:VERS_MAIN+"."+(get-date format yyMM)+"."+$CI_PIPELINE_IID
# echo "Set vers: $env:NEW_REL"
# $contenuto = Get-Content -path 'VersGen\GPW.cs' -Raw
# $newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL
# $newContenuto | Set-Content -Path 'VersGen\GPW.cs'
# helper pulizia files zip
.cleanup-zip: &cleanup-zip
- |
$env:OUTPUT_DIR = $env:APP_NAME + "\bin\Release\*.zip"
if ((Test-Path $env:OUTPUT_DIR))
{
Remove-Item $env:OUTPUT_DIR -Force -Recurse -ErrorAction Ignore
}
echo "Clening ZIP dir: $env:OUTPUT_DIR"
# helper creazione files zip
.zipper: &zipper
- |
$7zipPath = $env:ProgramFiles+"\7-Zip\7z.exe"
if (-not (Test-Path -Path $7zipPath -PathType Leaf)) {
throw "7 zip file '$7zipPath' not found"
}
Set-Alias 7zip $7zipPath
$Target = $env:APP_NAME + "\bin\Release\" + $env:APP_NAME + ".zip"
$Source = $env:APP_NAME + "\bin\Release\*"
7zip a -tzip $Target $Source
echo "called ZIP $Source --> $Target"
# helper x fix pacchetti nuget da repo locale nexus.steamware.net
.nuget-fix: &nuget-fix
- |
@@ -52,19 +19,6 @@ variables:
C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
}
echo $hasSource
# helper creazione hash files x CORE
.hashBuildCore: &hashBuildCore
- |
$Target = $env:APP_NAME + "\bin\Release\" + $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"
# helper creazione hash files x IIS
.hashBuild: &hashBuild
@@ -79,30 +33,8 @@ variables:
echo "Created HASH files for $Target"
# helper x send su NEXUS CORE
.nexusUploadCore: &nexusUploadCore
- |
Set-Alias mCurl C:\Windows\system32\curl.exe
$currentDate = get-date -format yyMM;
$currentTime = get-date -format ddHH;
$VersNumb = Get-Content "Resources\VersNum.txt"
echo "Curr Version: $VersNumb"
if($CI_COMMIT_BRANCH -eq "master")
{
$version = "stable"
}
else
{
$version = "unstable"
}
$File2Send = Get-ChildItem($env:APP_NAME + "\bin\Release\*.zip*")
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/SLS/$FileName
}
# helper x send su NEXUS x pack
.nexusUploadIIS: &nexusUpload
.nexusUpload: &nexusUpload
- |
Set-Alias mCurl C:\Windows\system32\curl.exe
$currentDate = get-date -format yyMM;
@@ -176,25 +108,6 @@ IIS02:deploy:
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Stats/MP.Stats.csproj
- dotnet publish -p:PublishProfile=W2019-IIS-DEVProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Stats/MP.Stats.csproj
# staging:
# stage: installerCore
# only:
# - develop
# - master
# needs: ["build"]
# before_script:
# # - *nuget-fix
# # - dotnet restore
# # - '& "$env:NUGET_PATH" restore LPA.sln' # path alla solution corrente
# # - *version-fix
# - *cleanup-zip
# script:
# - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release MP.Stats/MP.Stats.csproj
# # deploy su nexus...
# - *zipper
# - *hashBuildCore
# - *nexusUploadCore
installer:
stage: installer
only: