Created
December 4, 2017 22:38
-
-
Save aaronsteers/3e4dd9dbb7e9ee2dcc207f8c695ad95f to your computer and use it in GitHub Desktop.
Sample GitLab CI file (YAML)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## A simple CI script that builds the data warehouse and tests that any dependent views are still able to compile | |
## | |
## | |
## Schema Names: | |
## dw production schema | |
## dev shared development schema | |
build_on_master: | |
stage: build | |
only: | |
- master | |
tags: | |
- wwu-bi | |
script: | |
- mkdir packages | |
- nuget install MSTest.TestAdapter -OutputDirectory packages -Version 1.1.11 | |
- nuget install Newtonsoft.Json -OutputDirectory packages -Version 9.0.1 | |
- msbuild.exe | |
- powershell -Command {Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted} | |
- powershell .\DeploySQLScripts.ps1 pre_scripts dw | |
- cd .\dw\bin\Release | |
- dw.exe build -all -schema dw | |
- cd ..\..\.. | |
- powershell .\DeploySQLScripts.ps1 post_scripts dw | |
- powershell .\DeploySQLScripts.ps1 bi_views dw | |
build_on_dev: | |
stage: build | |
except: | |
- master | |
- post-scripts | |
tags: | |
- wwu-bi | |
script: | |
- mkdir packages | |
- nuget install MSTest.TestAdapter -OutputDirectory packages -Version 1.1.11 | |
- nuget install Newtonsoft.Json -OutputDirectory packages -Version 9.0.1 | |
- msbuild.exe | |
- powershell -Command {Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted} | |
- powershell .\DeploySQLScripts.ps1 pre_scripts dev | |
- cd .\dw\bin\Release | |
- dw.exe build -all -schema dev | |
- cd ..\..\.. | |
- powershell .\DeploySQLScripts.ps1 post_scripts dev | |
- powershell .\DeploySQLScripts.ps1 bi_views dev | |
##################################################################### | |
# Uncomment this section if you want to run as separate job steps: | |
##################################################################### | |
#stages: | |
# - build | |
# - test | |
# - deploy | |
#my_unit_tests: | |
# stage: test | |
# script: | |
# - dir bin | |
# - echo "Testing!" | |
# tags: | |
# - wwu-bi | |
#my_deploy: | |
# stage: deploy | |
# script: | |
# - echo "Deploying!" | |
# tags: | |
# - wwu-bi | |
# only: | |
# - master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment