Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 001c8dbb58 | |||
| 3e9d703c48 | |||
| 37858a857e | |||
| 9d23f67dba | |||
| b79ac951e2 | |||
| b61d1852a1 |
+9
-9
@@ -15,9 +15,9 @@ variables:
|
||||
- |
|
||||
$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`""
|
||||
C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`""
|
||||
} else {
|
||||
C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
|
||||
C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`""
|
||||
}
|
||||
echo $hasSource
|
||||
|
||||
@@ -79,9 +79,9 @@ variables:
|
||||
$version = "unstable"
|
||||
}
|
||||
$File2Send = "Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip"
|
||||
mCurl -v -u GitLab:viaDante16 --upload-file $File2Send http://nexus.steamware.net/repository/utility/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip
|
||||
mCurl -v -u GitLab:viaDante16 --upload-file $File2Send".md5" http://nexus.steamware.net/repository/utility/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip".md5"
|
||||
mCurl -v -u GitLab:viaDante16 --upload-file $File2Send".sha1" http://nexus.steamware.net/repository/utility/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip".sha1"
|
||||
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"
|
||||
|
||||
|
||||
# mCurl -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
|
||||
@@ -92,8 +92,8 @@ stages:
|
||||
|
||||
build_job:
|
||||
stage: build
|
||||
# rules:
|
||||
# - if: '$CI_COMMIT_BRANCH == "develop"'
|
||||
tags:
|
||||
- win
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- '& "$env:NUGET_PATH" restore LPA.sln' # path alla solution corrente
|
||||
@@ -103,8 +103,8 @@ build_job:
|
||||
|
||||
deploy_job:
|
||||
stage: deploy
|
||||
# rules:
|
||||
# - if: '$CI_COMMIT_BRANCH == "master"'
|
||||
tags:
|
||||
- win
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- '& "$env:NUGET_PATH" restore LPA.sln' # path alla solution corrente
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
# This file is a template, and might need editing before it works on your project.
|
||||
# The following script will work for any project that can be built from command line by msbuild
|
||||
# It uses powershell shell executor, so you need to add the following line to your config.toml file
|
||||
# (located in gitlab-runner.exe directory):
|
||||
# shell = "powershell"
|
||||
#
|
||||
# The script is composed of 3 stages: build, test and deploy.
|
||||
#
|
||||
# The build stage restores NuGet packages and uses msbuild to build the exe and msi
|
||||
# One major issue you'll find is that you can't build msi projects from command line
|
||||
# if you use vdproj. There are workarounds building msi via devenv, but they rarely work
|
||||
# The best solution is migrating your vdproj projects to WiX, as it can be build directly
|
||||
# by msbuild.
|
||||
#
|
||||
# The test stage runs nunit from command line against Test project inside your solution
|
||||
# It also saves the resulting TestResult.xml file
|
||||
#
|
||||
# The deploy stage copies the exe and msi from build stage to a network drive
|
||||
# You need to have the network drive mapped as Local System user for gitlab-runner service to see it
|
||||
# The best way to persist the mapping is via a scheduled task (see: https://stackoverflow.com/a/7867064/1288473),
|
||||
# running the following batch command: net use P: \\x.x.x.x\Projects /u:your_user your_pass /persistent:yes
|
||||
|
||||
|
||||
# place project specific paths in variables to make the rest of the script more generic
|
||||
variables:
|
||||
EXE_RELEASE_FOLDER: 'C:\Testb\bin\Release'
|
||||
MSI_RELEASE_FOLDER: 'C:\Testb\Setup\bin\Release'
|
||||
TEST_FOLDER: 'C:\Testb\Tests\bin\Release'
|
||||
#DEPLOY_FOLDER: 'P:\Projects\YourApp\Builds'
|
||||
NUGET_PATH: 'C:\Tools\NuGet\nuget.exe'
|
||||
#MSBUILD_PATH: 'C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe'
|
||||
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\msbuild.exe'
|
||||
#NUNIT_PATH: 'C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe'
|
||||
|
||||
stages:
|
||||
- build
|
||||
#- test
|
||||
#- deploy
|
||||
|
||||
build_job:
|
||||
stage: build
|
||||
only:
|
||||
- master # the build process will only be started by git tag commits
|
||||
tags:
|
||||
- msbuild
|
||||
script:
|
||||
- '& "$env:NUGET_PATH" restore' # restore Nuget dependencies
|
||||
- '& "$env:MSBUILD_PATH" LPA/LPA.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m' # build the project
|
||||
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\LPA.exe' # saving exe to copy to deploy folder
|
||||
- '$env:MSI_RELEASE_FOLDER\LPA.msi' # saving msi to copy to deploy folder
|
||||
#- '$env:TEST_FOLDER\' # saving entire Test project so NUnit can run tests
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"serverIp": "iis01",
|
||||
"serverBaseAddr": "http://iis01/MP/MAG/"
|
||||
"serverBaseAddr": "http://iis01/NKC/"
|
||||
}
|
||||
Reference in New Issue
Block a user