ancora test yaml functions

This commit is contained in:
Samuele E. Locatelli
2021-03-26 22:16:58 +01:00
parent 3b648d967e
commit 6d8007af49
+34 -68
View File
@@ -20,7 +20,7 @@ variables:
# https://docs.gitlab.com/ee/ci/quick_start/index.html
# https://docs.gitlab.com/ee/ci/yaml/
# helper x fix pacchetti nuget da repo locale nexus.steamware.net
.nuget-fix: &nuget-fix
- |
$hasSource = C:\Tools\nuget.exe sources list | find "`"Steamware Nexus`"" /C
@@ -30,6 +30,8 @@ variables:
C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
}
echo $hasSource
# path alla solution corrente
- '& "$env:NUGET_PATH" restore GPW.sln'
stages:
- build
@@ -37,56 +39,34 @@ stages:
admin:build:
stage: build
# only:
# - tags # the build process will only be started by git tag commits
before_script:
- *nuget-fix
script:
# - |
# $hasSource = C:\Tools\nuget.exe sources list | find "`"Steamware Nexus`"" /C
# if ($hasSource -eq 0) {
# C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
# } else {
# C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
# }
# echo $hasSource
- '& "$env:NUGET_PATH" restore GPW.sln'
- '& "$env:MSBUILD_PATH" GPW_Admin/GPW_Admin.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /m'
artifacts:
expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on
paths:
# - '$env:EXE_RELEASE_FOLDER\YourApp.exe' # saving exe to copy to deploy folder
# - '$env:MSI_RELEASE_FOLDER\YourApp Setup.msi' # saving msi to copy to deploy folder
# - '$env:TEST_FOLDER\' # saving entire Test project so NUnit can run tests
- '$env:EXE_RELEASE_FOLDER\GPW_Admin\' # saving entire Test project so NUnit can run tests
- '$env:DEPLOY_FOLDER\GPW_Admin\' # saving entire Test project so NUnit can run tests
# artifacts:
# expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on
# paths:
# # - '$env:EXE_RELEASE_FOLDER\YourApp.exe' # saving exe to copy to deploy folder
# # - '$env:MSI_RELEASE_FOLDER\YourApp Setup.msi' # saving msi to copy to deploy folder
# # - '$env:TEST_FOLDER\' # saving entire Test project so NUnit can run tests
# - '$env:EXE_RELEASE_FOLDER\GPW_Admin\' # saving entire Test project so NUnit can run tests
# - '$env:DEPLOY_FOLDER\GPW_Admin\' # saving entire Test project so NUnit can run tests
bcode:build:
stage: build
# only:
# - tags # the build process will only be started by git tag commits
script:
- |
$hasSource = C:\Tools\nuget.exe sources list | find "`"Steamware Nexus`"" /C
if ($hasSource -eq 0) {
C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
} else {
C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
}
echo $hasSource
- '& "$env:NUGET_PATH" restore GPW.sln'
before_script:
- *nuget-fix
script:
- '& "$env:MSBUILD_PATH" GPW_Barcode/GPW_Barcode.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /m'
artifacts:
expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on
paths:
# - '$env:EXE_RELEASE_FOLDER\YourApp.exe' # saving exe to copy to deploy folder
# - '$env:MSI_RELEASE_FOLDER\YourApp Setup.msi' # saving msi to copy to deploy folder
# - '$env:TEST_FOLDER\' # saving entire Test project so NUnit can run tests
- '$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
# artifacts:
# expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on
# paths:
# # - '$env:EXE_RELEASE_FOLDER\YourApp.exe' # saving exe to copy to deploy folder
# # - '$env:MSI_RELEASE_FOLDER\YourApp Setup.msi' # saving msi to copy to deploy folder
# # - '$env:TEST_FOLDER\' # saving entire Test project so NUnit can run tests
# - '$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
# test_job:
# stage: test
@@ -105,19 +85,14 @@ bcode:build:
admin:deploy:
stage: deploy
script:
- |
$hasSource = C:\Tools\nuget.exe sources list | find "`"Steamware Nexus`"" /C
if ($hasSource -eq 0) {
C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
} else {
C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
}
echo $hasSource
- '& "$env:NUGET_PATH" restore GPW.sln'
- '& "$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/ GPW_Admin/GPW_Admin.csproj'
# rules:
# - if: '$CI_COMMIT_BRANCH == "develop"'
# only:
# - tags # the build process will only be started by git tag commits
before_script:
- *nuget-fix
script:
- '& "$env:MSBUILD_PATH" /p:m=4 /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/ GPW_Admin/GPW_Admin.csproj'
needs: ["admin:build"]
dependencies:
- admin:build
@@ -125,19 +100,10 @@ admin:deploy:
bcode:deploy:
stage: deploy
script:
- |
$hasSource = C:\Tools\nuget.exe sources list | find "`"Steamware Nexus`"" /C
if ($hasSource -eq 0) {
C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
} else {
C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
}
echo $hasSource
- '& "$env:NUGET_PATH" restore GPW.sln'
- '& "$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/ GPW_Barcode/GPW_Barcode.csproj'
before_script:
- *nuget-fix
script:
- '& "$env:MSBUILD_PATH" /p:m=4 /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/ GPW_Barcode/GPW_Barcode.csproj'
needs: ["bcode:build"]
dependencies:
- bcode:build