我在我的GitRepo中有一个Project.sln。 我需要使用不同的配置(local,qa,sandbox和production)构建4个NuGet软件包。 我正在使用TeamCity和Octopus Deploy。
在TeamCity中,我的构建配置具有以下构建步骤:
1) NuGet Installer
2) Build Project.sln with *Local* Configuration
3) NuGet Pack with using .csproj file
4) NuGet Installer
5) Build Project.sln with *QA* Configuration
6) NuGet Pack with using .csproj file
7) NuGet Installer
8) Build Project.sln with *Sandbox* Configuration
9) NuGet Pack with using .csproj file
10) NuGet Installer
11) Build Project.sln with *Production* Configuration
12) NuGet Pack with using .csproj file
我有以下问题:
1) 使用AssemblyInfo patcher时,它只生成一个NuGet包文件。在第3步,TeamCity创建一个名为2.2.1.%build.counter%的包。在第6步,它创建了一个同名的包并进行了覆盖。在第9和第12步也是如此。最终,我只有一个具有最后配置(在我的情况下是Production)的NuGet包。
我希望有4个包,例如:
2.2.1.%build.counter%_local
2.2.1.%build.counter%_qa
2.2.1.%build.counter%_sandbox
2.2.1.%build.counter%_production
2) 接下来的问题出现在Octopus上。当TeamCity生成包时(它会生成4个包,但没有AssemblyInfo patcher),它们都具有相同的id(项目)。当我试图将“一些”(比如QA)包部署到QA环境时,Octopus要求我选择NuGet包的id。而Octopus只看到一个id - "Project"。我认为这是TeamCity最后创建的包。
2.2.1.%build.counter%-qa
等,而不是2.2.1.%build.counter%
。 - Jack Ukleja