From 87c5a0d29912c0d85101312decd434ccbd44e758 Mon Sep 17 00:00:00 2001 From: Anton Zimin Date: Fri, 31 Aug 2018 13:41:52 +0700 Subject: [PATCH] Add Config Transformations article #7 --- README.md | 5 ++++ docs/ConfigTransformations.md | 44 +++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 docs/ConfigTransformations.md diff --git a/README.md b/README.md index 1eb8597..cff8b9d 100644 --- a/README.md +++ b/README.md @@ -167,3 +167,8 @@ Create a credential with **secret file** type. Add credential parameter to job w SecretConfigPath = credentials("${env.SecretConfig}") } ``` + +Articles +-------- + +[Config Transformations](docs/ConfigTransformations.md) diff --git a/docs/ConfigTransformations.md b/docs/ConfigTransformations.md new file mode 100644 index 0000000..3a72285 --- /dev/null +++ b/docs/ConfigTransformations.md @@ -0,0 +1,44 @@ +Config Transformations +====================== + +Development +----------- + +### First Development Build + +Actor | Action +--------------------- | ---------------------------------------------------------------- +Developer | Copy Config.Development.ps1.template to Config.Development.ps1. +Developer | Modify properties in Config.Development.ps1. +Developer | Execute `psake build`. +copy-configs (psake) | Copy App.Development.config.template to App.Development.config. +copy-configs (psake) | Replace variable placeholders with values in App.Development.config. +BeforeBuild (MSBuild) | Apply App.Development.config transformation to App.config. + +### Second Development Build + +Actor | Action +--------------------- | ---------------------------------------------------------------- +Developer | Execute `psake build` or run project in Visual Studio. +BeforeBuild (MSBuild) | Apply App.Development.config transformation to App.config. + +### Change Development Setting + +Actor | Action +--------------------- | ---------------------------------------------------------------- +Developer | Modify App.Development.config transformation. +Developer | Execute `psake build` or run project in Visual Studio. +BeforeBuild (MSBuild) | Apply App.Development.config transformation to App.config. + +Production +---------- + +Actor | Action +---------------------- | ---------------------------------------------------------------- +Jenkins | Set `Environment` and `SecretConfigPath` environment variables. +Jenkins | Execute `psake clean`. +clean (psake) | Revert all changes in working copy. +Jenkins | Execute `psake publish-web`. +copy-configs (psake) | Replace variable placeholders with values in App.Production.config. +update-version (psake) | Execute `GitVersion /updateassemblyinfo`. +GitVersion | Add or update AssemblyVersion, AssemblyInformationalVersion, AssemblyFileVersion attributes.