Skip to content

Instantly share code, notes, and snippets.

@XEngine
Created May 29, 2019 09:15
Show Gist options
  • Save XEngine/38f9095dd4afbe425c9aa4dc846c3d96 to your computer and use it in GitHub Desktop.
Save XEngine/38f9095dd4afbe425c9aa4dc846c3d96 to your computer and use it in GitHub Desktop.
variables:
EXE_RELEASE_FOLDER: ''
DEPLOY_FOLDER: 'C:\htdocs\www.test.de'
NUGET_PATH: 'C:\Runner\nuget.exe'
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
.backup: &backup |
$path = "$target"
$destination = "$target-$datetime.zip"
$exclude = @("marketing","marketing-test","")
$files = Get-ChildItem -Path $path -Exclude $exclude
Compress-Archive -Path $files -CompressionLevel Fastest -DestinationPath "$target-$datetime.zip"
.publish: &publish |
$array = @("assets", "Views", "bin", "config")
foreach ($element in $array) {
xcopy ".\Publish\$element" "$target\$element" /i /y /s
}
.build:
only:
- tags
before_script:
- 'cd .\Store\'
- 'npm i --silent'
- 'npm run production'
- 'cd ..'
script:
- '& "$env:NUGET_PATH" restore -verbosity "quiet"' # restore Nuget dependencies
- '& "$env:MSBUILD_PATH" Core.sln /p:PublishProfile=just4menpublishprofile.pubxml /p:Configuration=Release /p:DeployOnBuild=true /verbosity:minimal' # build the project
- ' $target=Join-Path -Path "C:\htdocs\" -ChildPath (Get-ChildItem "C:\htdocs" -Directory | ?{ $_.Name -match "www.*.de" } | select -First 1)'
- ' $datetime=Get-Date -UFormat %d-%m-%Y--%H-%M'
- *backup
- *publish
build:alb1: # ALBERTO 1
extends: .build
variables:
SHOPNUMBER: "9"
tags:
- iis-alb-01
build:alb2: # ALBERTO 2
extends: .build
variables:
SHOPNUMBER: "9"
tags:
- iis-alb-02
build:fas1: # FASHIONSISTERS 1
extends: .build
variables:
SHOPNUMBER: "5"
tags:
- iis-fas-01
build:fas2: # FASHIONSISTERS 2
extends: .build
variables:
SHOPNUMBER: "5"
tags:
- iis-fas-02
build:hea1: # HERRENAUSSTATTER 1
extends: .build
variables:
SHOPNUMBER: "1"
tags:
- iis-ha-01
build:hea2: # HERRENAUSSTATTER 2
extends: .build
variables:
SHOPNUMBER: "1"
tags:
- iis-ha-02
build:hea3: # HERRENAUSSTATTER 3
extends: .build
variables:
SHOPNUMBER: "1"
tags:
- iis-ha-03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment