test gitlab x upload develop/master su nexus

This commit is contained in:
Samuele Locatelli
2021-04-15 10:53:40 +02:00
parent c891687578
commit 597c84bd1d
+18 -2
View File
@@ -4,6 +4,8 @@ variables:
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'
NEXUS_PATH: 'LPA/LPA'
APP_NAME: 'LPA'
VERS_MAIN: '1.2'
NEW_REL: ''
@@ -27,6 +29,19 @@ variables:
$newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL
$newContenuto | Set-Content -Path 'VersGen\VersGen.cs'
# helper x send su NEXUS
.nexus-upload: &nexus-upload
- |
if($CI_COMMIT_BRANCH -eq "master")
{
$version = "stable"
}
else
{
$version = "develop"
}
curl -v -u "$env:NEXUS_USER":"$env:NEXUS_PASSWD" --upload-file bin/release/$env.APP_NAME.zip "$env:NEXUS_SERVER"/utility/$env.NEXUS_PATH/$version/$env.APP_NAME-version.zip
stages:
- build
- deploy
@@ -45,12 +60,13 @@ build_job:
deploy_job:
stage: deploy
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
# rules:
# - if: '$CI_COMMIT_BRANCH == "master"'
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore LPA.sln' # path alla solution corrente
- *version-fix
script:
- '& "$env:MSBUILD_PATH" LPA\LPA.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
- 'curl -v -u "$env:NEXUS_USER":"$env:NEXUS_PASSWD" --upload-file bin/release/LPA.zip "$env:NEXUS_SERVER"/utility/LPA/LPA/stable/LPA-stable.zip'
needs: ["build_job"]