by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 05 18:50

    matkoch on develop

    Fix DiscardCost property in Dup… Fix DotCoverTasks to use double… Fix missing Configuration enume… and 50 more (compare)

  • Aug 05 18:42

    matkoch on develop

    (compare)

  • Aug 05 18:41

    matkoch on yaml

    (compare)

  • Aug 02 19:23

    matkoch on develop

    Remove GITHUB_TOKEN variable (compare)

  • Aug 02 15:57

    matkoch on develop

    Consolidate InspectCodeTasks, D… Use SSH for external repositori… Remove default branch specifica… and 1 more (compare)

  • Jul 31 15:58

    matkoch on develop

    Update repositories.yml (compare)

  • Jul 31 13:25

    matkoch on develop

    Use SSH for external repositori… Remove default branch specifica… (compare)

  • Jul 31 13:24

    matkoch on develop

    Use SSH for external repositori… (compare)

  • Jul 28 18:13
    smezger commented #536
  • Jul 24 14:46
    matkoch labeled #539
  • Jul 24 14:45
    matkoch closed #539
  • Jul 24 14:45
    matkoch commented #539
  • Jul 24 14:44
    matkoch commented #539
  • Jul 24 13:20
    fogzot opened #540
  • Jul 24 13:10
    fogzot commented #539
  • Jul 24 12:12
    matkoch commented #539
  • Jul 24 12:10
    matkoch commented #539
  • Jul 24 08:00
    fogzot commented #539
  • Jul 24 03:50
    smezger commented #536
  • Jul 23 17:30
    matkoch commented #539
Charles Wagner
@metalfork
Hey @Sam13 I was doing something similar. Current I am using a makefile to run the gitversion image to determine the version because all other approaches were failing to get the git history required by gitversion.
docker run --rm -v "$(GIT_ROOT):/repo" gittools/gitversion:latest-linux-netcoreapp2.1 /repo /showvariable LegacySemVer
But even this failed because TC was not doing a full history checkout even when TC teamcity.git.fetchAllHeads setting is true

Currently the only approach that has consistently worked is providing gitversion tool running in a docker container all the arguments it needs to reach out to the repository itself

BUILD_NUMBER = $(shell docker run --rm -v "$(GIT_ROOT):/repo" gittools/gitversion:latest-linux-netcoreapp2.1 /repo /showvariable LegacySemVer /url https://$(GITHUB_ORIGIN_URL_TRIMMED) /b $(GIT_BRANCH_NAME) /c $(GIT_COMMIT_SHA) /u $(GITHUB_USERNAME) /p $(GITHUB_TOKEN))

This is less than ideal and I still want to get away from this approach

@Sam13 does Gitversion with nuke require these environment variables?

env.TEAMCITY_BUILD_CHECKOUTDIR => %teamcity.build.checkoutDir%
env.TEAMCITY_AGENT_HOME_DIR => %teamcity.agent.home.dir%

to the best of your knowledge?

Sam13
@Sam13
@metalfork For GitVersion only TEAMCITY_AGENT_HOME_DIR is required since TeamCity stores the full GIT repository outside the TeamCity working copy (at least for my case). You need to map that directory into your container, otherwise GitVersion cannot access the full repository. Check your TC working copy .git\objects\info\alternates.
TEAMCITY_BUILD_CHECKOUTDIRis required if you need build script interaction with TeamCity.
damiang78
@damiang78
Hi, new user of Nuke here. Thanks for the work put in here. I have a few questions tho. The NUKE logo is showing up in a strange character set on TeamCity. Any ideas?
Volkmar Rigo
@VolkmarR
@damiang78 have you tried to add the NoLogo parameter?
damiang78
@damiang78
I saw that option, but I didn't try it. I like the logo :)
MonkAlex
@MonkAlex
Hello
I want to use Nuke in work project.
We have big monolith in repo (single git repo) with many solutions
Need build first sln, resolve reference for another sln, build them and do it for every sln
Has any examples of multiple sln in single nuke build?
Or i need another example how to do it better =)
MonkAlex
@MonkAlex
I fount only https://stackoverflow.com/a/58652694/3768545 answer, but its not enough for newbie =_=
Volkmar Rigo
@VolkmarR
@MonkAlex : In Nuke, a Solution is an Object. The build class has a Solution field, that is automatically initialized with the solution defined in the .nuke file. If you need multiple solutions, you can create additional solution objects and load them manually using ParseSolution. This page explains it a bit better: https://nuke.build/docs/authoring-builds/solutions-and-projects.html
MonkAlex
@MonkAlex
Not understand, how to "build all" with correct build graph
Its 200 csproj, 20 sln, i have no idea how to make it easy
Matthias Koch
@matkoch
grab all solution files and invoke msbuild on them?
MonkAlex
@MonkAlex

Hello
MSBuild task console output have some problem with codepage, i think
I run it on 'ru' locale, msbuild have errors in ru culture.
Error on compile:

"D:\Projects\Sungero\Kernel\src\Tests\Server.Tests\Server.Tests.csproj" (????? ???? ?? ?????) (1) ->
"D:\Projects\Sungero\Kernel\src\SungeroWorker\Worker\SungeroWorker.csproj" (????? ???? ?? ?????) (15:2) ->
(??????? ???? CoreCompile) ->
  WorkerServer.cs(64,13): error CS0246: ?? ????? ???? ? ??? ??? ??????? ???? "SqlCommentThreadStore" (????????, ????????? ????? using ??? ???? ?? ???). [D:\Projects\Sungero\Kernel\src\SungeroWorker\Worker\SungeroWorker.csproj]

Error, when i run command manual:

"D:\Projects\Sungero\Kernel\src\Tests\Server.Tests\Server.Tests.csproj" (целевой объект по умолчанию) (1) ->
"D:\Projects\Sungero\Kernel\src\SungeroWorker\Worker\SungeroWorker.csproj" (целевой объект по умолчанию) (15:2) ->
(Целевой объект CoreCompile) ->
  WorkerServer.cs(64,13): error CS0246: Не удалось найти тип или имя пространства имен "SqlCommentThreadStore" (возможно, отсутствует директива using или ссылка на сборку). [D:\Projects\Sungero\Kernel\src\SungeroWorker\Worker\SungeroWorker .csproj]
Mike
@devMike_gitlab
@MonkAlex
Try in cmd "chcp 65001" this command set console encoding to UTF-8
4 replies
Sam13
@Sam13
Hello all,
How do you usually share a Nuke "build" when you have multiple GIT repositories which produce NuGet packages of independent modules and have the same basic build structure (compile, unit test, publish package)?
How do you deal with configuration files (e.g. Directory.Build.props, NuGet.config, ...)? Do you duplicate them for each repository?
Thanks in advance for your thoughts
Matthias Koch
@matkoch
build sharing is documented
Sam13
@Sam13
@matkoch Thanks, I'm aware of that. I'm looking for a more detailed example which may include customizing of certain build steps and also handling of Directory.Build.props and other configuration files
Matthias Koch
@matkoch
that question is a bit too broad. what customizations?
Sam13
@Sam13
Ok I'll start with two concrete questions:
1) Let's say I have a Nuke build (class) which contains different targets and is shared via NuGet. Lets say those targets are Compile, UnitTest and IntegrationTest and depend on each other. For one specific build which consumes this package I want have another target called Foo which is executed between UnitTest and IntegrationTest. How can I achieve this without changing the build class in the NuGet package?
2) How do you share the Directory.build.props file?
2) If it applies to the build project, copy it. Otherwise external-files.
Sam13
@Sam13
@matkoch Thanks. For 1) you mean usage of DependentFor and DependsOn?
Matthias Koch
@matkoch
yes
Sam13
@Sam13
Ok, another one related to the topic of customizing targets: How do I achieve that a target from the build class in the NuGet package can be skipped only from the client side? E.g. in my example stated above I'd like to create a custom "Compile" target and want to skip the entire "Compile" target from the build in the NuGet package.
Matthias Koch
@matkoch
Why?
Sam13
@Sam13
Maybe I want to use MsBuild instead of DotNet build? Maybe I want to provide different settings to the tool executed in the compile target?
Matthias Koch
@matkoch
nothing is stopping you from extracting methods and marking them virtual
Andrew-Archon
@Andrew-Archon
Will lightweight CLI integration work with gradle? It's not an exe, it's launched from a shell script or batch file
Matthias Koch
@matkoch
batch should work
Sam13
@Sam13

nothing is stopping you from extracting methods and marking them virtual

Ok, thanks. Then that's the way to go. I just wanted to make sure if there's another way which I have missed or not understood in the documentation...

nawfalhasan
@nawfalhasan
Is there a way to add alias to Targets? Like if my target is PackNugets, I would like to add a shortcut to it like pn, so that I can execute:
nuke pn
Its hard to remember the whole thing sometimes. Looking up at history is tedious
Matthias Koch
@matkoch
global tool has shell completion
nawfalhasan
@nawfalhasan
I often fire up powershell to execute nuke, I dont get autocompletion there. aliases would have been convenient.
Andrew-Archon
@Andrew-Archon
I'm having trouble passing nuke a parameter whose value begins with a hyphen: eg nuke TestTarget --TestValue ---helloworld--- where I want the parameter value to be ---helloworld--- it instead leaves the parameter empty. Is there any way I can get around this? I have tried quoting the value and using --TestValue=---helloworld---
Matthias Koch
@matkoch
quotes?
ahh sry
yes... known issue i think
Andrew-Archon
@Andrew-Archon
Maybe i can add a placeholder at the start and then strip it inside the script haha
Matthias Koch
@matkoch
or add the hyphen :)
Duskone39
@Duskone39
hello everyone, using nuke it is really good. But there was a problem, you need to divide the code into separate steps, and then apply different steps in different projects, I have not figured out how to do this using Nuke, can you tell me?
Now it looks like this, is it possible to make each step as ITargetDefinition but at the same time use them as blocks from which to collect different deployment strategies
image.png
Matthias Koch
@matkoch
it looks like you’re using another framework inside this
not sure how that fits
Duskone39
@Duskone39
indeed, at first I essentially wrote something nicer for my framework internally, and I don't like it ((but it works for 5 projects in my company
the main question is, is it possible to create a set of Target delegates, move them into a separate library and use a set of delegates from the library for each project (because different projects need different steps and projects more than 30)
2 replies
Duskone39
@Duskone39
also wondering for me how can I sync the logging and posting to Slack (as an example)? if in NukeBuild I could set the OutputSink property, then this is possible, is it planned to give this opportunity to users?
nawfalhasan
@nawfalhasan
@matkoch is there a simple way to execute powershell ps1 file from nuke script?
1 reply
Johannes Ebner
@Structed
Hey folks!
What's the preferred way in NUKE to make sure NPM is installed?
2 replies