I'm evaluating https://wiki.jenkins-ci.org/display/JENKINS/Workflow+Plugin and very like its concept of Groovy DSL in Jenkinsfile under version control. I tried to create different build steps, nodes and stages.
I have a multi-module project and want to have a kind of separate "job" for each module. Each module should have it's own Junit, Findbugs, Checkstyle reports.
However when I tried to collect Junit report it was attached to Workflow job, not it's node or stage.
Question:
Is it possible to create (and update dynamically) a job from Jenkins Workflow plugin DSL? If not, is there any analogue of job that can handle several reports within single workflow?
Since Workflow flow scripts can access the Jenkins model I suspect they can update a job configuration (is that what you mean by the first question?), but don't know if that's its strong suit. That would be a task for Job DSL plugin.
Build steps can invoke other jobs--search for build job in that page--and each of those can have its own publish steps. That might get what you need.
JENKINS-27395 (and analogues for other publishers) would be needed to fully support this use case in one Workflow job. Currently reports from different parts of the build are simply aggregated.
Related
One thing that I really like about behave ( https://behave.readthedocs.io/en/stable/ ) is that you can use the stage flag and it will run different step implementations for each one. If you pass the flag --stage=ui, then all step implementations inside ui_steps will run.
I don't want to be stuck with behave, but I didn't see this feature in other runner ( like cucumber.js or even cucumber for java)
Any ideia on how to implement this?
I believe this is possible in cucumberjs. You can pass the location of step deps for cucumber runner. If you have step definitions in separate folders for api and ui tests, you can change your configuration accordingly in your npm script or configuration of the automation tool being used.
You can have two sets of support code and specify which to use via the CLI with --require. Like many things this is easier to manage using profiles.
Aslak (the creator of Cucumber) has a good talk where he is doing something similar to this, using different support code against the same features and steps to test different parts of the stack:
https://www.youtube.com/watch?v=sUclXYMDI94
The Groovy Postbuild Plugin has methods for adding badges and labels to the builds, but as the name suggests this can only be run after the main build stage.
Is it possible to get access to the methods provided by the plug-in such as addShortText from within a plain groovy command executed in Jenkins (Add build step - Execute Groovy Script)?
I want to show these labels from the start of the build process, as they are known from the parameters passed when triggering the build. This makes tracking the specific build which is currently being executed easier.
It's possible, it's called Groovy plugin
There is also another very useful plugin called Any Step plugin, that allows to use publishers as build steps, and build steps as post-build actions
In the current project we are using TeamCity as a CI platform and we have a bunch of projects and builds up and running.
The next step in our process is to track some statistics around our tests. So we are looking for a tool that could help us to get this numbers and make them visible for each build.
In the first place we want to keep track of the following numbers:
Number of unit tests
Number of specflow tests tagged as #ui
Number of specflow tests tagged as #controller
And also time spent running each of the test categories above.
Some details about the current scenario:
.net projects
nUnit for the unit tests
SpecFlow for functional tests categorized as #controller and #ui
rake for the build scripts
TeamCity as a CI Server.
I'm looking for tools and/or practices suggestions to help us to track those numbers.
The issue here is your requirements for tags. SpecFlow/NUnit/TeamCity/DotCover integration is already developed enough to do everything that you require, except for the tagging.
I'm wondering how much of a mix you expect to have between UI and Controller tests. Assuming that you are correctly seperating your domains (see Dan North - Whose domain is it anyway) then you should never get scenarios tagged with these two tags in the same feature. So then I assume its just a case of separating the UI features from the functionality (controller) features.
I've recently started separating my features in just this way, by adding Namespace folders in my tests assembly, mirroring how you would separate Models, ViewModels and Views (etc), and TeamCity is definitely clever enough to report coverage and each stage of the drill down through assemblies and namespaces.
i'm new to gradle. If i'm not using the either doFirst() or doLast(). In which order the lines in a plugin(say) are executed. i can observe that they are not executed sequentially?
Can somebody explain the execution flow of a gradle file?
Thanks
The Gradle build lifecycle is documented here.
It can be summarized by "ICE": Initialization, Configuration, Execution.
Your question is focused on Execution. For a single-project build, it is described in section "48.5. Configuration and execution of a single project build" at the above link.
For plugins, the task dependency graph will depend on the plugin specifics. For example, see the Java plugin for a list of its tasks and dependencies.
In our build process we're currently using MBUnit 2.x tests, called from an NAnt task, called from CruiseControl.NET. I've uprgaded to Gallio and MBUnit 3.x locally and am able to run tests from VS2008. I'm having trouble getting our build process upgraded. It looks like we have two options, either run the tests from CruiseControl.net or from NAnt. Based on this, I have two questions:
With all other things being equal, where should these tests be run, NAnt or CruiseControl.net, or does it really matter at all?
If you like doing this sort of thing in NAnt, do you have any documentation or examples of how to implement it? I've found documentation for the CC.NET soution in my Gallio\extra\CCNet directory in the Gallio installation.
Thanks
Your options for running tests as part of your build with Gallio are similar to what they were with MbUnit v2.
I recommend running the tests from your NAnt or MSBuild scripts using the provided tasks in Gallio.NAntTasks.dll and Gallio.MSBuildTasks.dll.
However, if you want to run the tests directly from the CCNet configuration, then you can add a CCNet task to execute the Gallio.Echo.exe program.
Here's a bit more info on the NAnt task that someone else blogged about. Some of the details have changed in recent releases but it should get you on the right track.
http://testdrivendevelopment.wordpress.com/2008/12/01/use-nant-to-run-mbunit-tests-using-gallio/