diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index baffcffd..5655a914 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,33 +19,33 @@ 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 pulizia files zip -.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" +# # helper pulizia files zip +# .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" -# 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 = "Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip" - $Source = "Publish\" + $CI_COMMIT_BRANCH + "\*" - 7zip a -tzip $Target $Source - echo "called ZIP $Source --> $Target" +# # 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 = "Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip" +# $Source = "Publish\" + $CI_COMMIT_BRANCH + "\*" +# 7zip a -tzip $Target $Source +# echo "called ZIP $Source --> $Target" # helper creazione hash files .hashBuild: &hashBuild - | - $Target = "Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip" + $Target = $env:APP_NAME + "\bin\publish\" + $env:APP_NAME + ".zip" $MD5 = Get-FileHash $Target -Algorithm MD5 $SHA1 = Get-FileHash $Target -Algorithm SHA1 New-Item $Target".md5" @@ -67,7 +67,7 @@ variables: { $version = "unstable" } - $File2Send = "Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip" + $File2Send = $env:APP_NAME + "\bin\publish\" + $env:APP_NAME + ".zip" mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File2Send http://nexus.steamware.net/repository/utility/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File2Send".md5" http://nexus.steamware.net/repository/utility/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip".md5" mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File2Send".sha1" http://nexus.steamware.net/repository/utility/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip".sha1" @@ -134,13 +134,13 @@ staging: # - dotnet restore # - '& "$env:NUGET_PATH" restore LPA.sln' # path alla solution corrente # - *version-fix - - *cleanup-zip + # - *cleanup-zip script: - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release MP.Stats/MP.Stats.csproj # da fare qui il deploy su nexus... # - *zipper - # - *hashBuild - # - *nexusUpload + - *hashBuild + - *nexusUpload release: stage: release