Is there a way to get notified (email, desktop notifications etc.) after my maven clean install is completed in IntelliJ? - maven

I have a maven build that if successful takes couple of hours. However if it fails abruptly, i have no clue until i get back to IntelliJ and see what happened. Is there a way to get notifications regarding my run/build status from Intellij so i get to follow up right away?

First of all, it would be good to analyse why this build takes so long. Then one could find possible speed-ups.
Secondly, making such a build is a job for a build tool like Jenkins, not for IntelliJ. Jenkins can inform you about failed or succeeded builds.

Since the IDE is a desktop app it notifies about build status on build completion in status bar:
As for other means of notification I think Fabian's answer is right.

Related

Building a Xamarin app using a Dev-Ops pipeline, build completes, publish fails,

I have the following configured Azure DevOps pipeline which is building the Windows version of the Xamarin App, was going to try and get that one working first and the build works, but I'm getting an error in the publish, path not found, the 2 paths look fine but I guess this is down to me not building one of these before.
Build step which works fine
Publish artifact step which fails
The error that I get is as follows
Still trying to work out what I have got wrong, so I will keep going at it but if anyone
has any hints would be greatly apprecaited.
This thread as posted by Hongxin Sui was the solution for me, this is the thread.
Publishing build artifacts failed with an error: Not found PathtoPublish: D:\a\1\s\$(buildStagingDirectory)
However, what I did need to do was create a new YAML pipeline and I copied all the working steps in from the previous classic pipeline, I used the "Copy YAML" functionality and then I used the different Task as stated in that thread. Just make sure you change the case of the "Build" and "ArtifactStaging.." variable names as they need to be lower case not upper case.

Retry Jenkins Maven build if unstable?

Might be a very basic question, but I can't seem to find any straightforward documentation on how to do it.
I have a very basic UI test that runs every couple hours, and every once in a blue moon the build is unstable because the test fails for one reason or another(finicky selenium stale elements, other anomalies). I would like it so that that the job retries the build again if it is unstable, and if it is still unstable after the second try, then send out the alert (currently using Slack notifications in the post build actions section).
Is there a way to do this? Thanks in advance!
The naginator jenkins plugin allows you to rerun a build for unstable builds as well as failures. You will have to install the plugin in jenkins.
https://wiki.jenkins.io/display/JENKINS/Naginator+Plugin

maven build is taking too long to stop in Jenkins even though build is successful

I am new to Jenkins. Somehow I managed to install it and configure my Maven Project in that. But I am facing some issue for which I didn't find any solution. Please help me through that. Here is my question.
Once I click on the build Now it will start executing the maven commands. Build is successful also. But it is not stopping and showing the output of the build like build success or build failure. Here is the screenshot how it is showing in console output.
You can see the buffering in this screenshot
Here is the one more screenshot where it will show the status of the build.
#12 is the current build which got stuck
I tried to abort it by placing time limit. But the problem with this is it will not show the build success or build failure. It will show build is aborted.
Anyone please help me through this.

Build passes even on failing test cases in Jenkins

Some of the steps that i have done are described below:
Setup Jenkins on remote linux server.
Used own mac as a slave to
run Xcode build
I have setup a Web hook on bitbucket that runs a
build on Jenkins server.
Build gets triggered when i push code to
repo.
I have shared scheme in the Xcode project.
But whenever i push failing tests on my repo the build passes..Shouldn't CI server fail the build..I dont know where am i missing..I have posted some screenshots for clear reference
EDIT: with more research i came to know that build fails but you need to see the test results/reports that fails.How can i see the reports? I cant see any xml files under reports section
Even I have faced the same issue where build was successful even though test cases were getting failed. You can use Log Parser plugin to parse the console output and mark your build as either stable or failed based on the output.
The jenkins runs in a step by step fashion.Build succeeds means your build step is correct and there's no issue with that but it does not mean your test cases have also passed.You need to check that with Junit if your test cases pass or not.
In your execute shell phase, you might need to add set -exo pipefail at the top.

Multiple types of build for different build triggers

I have a setup where our code builds to dev every 5 hours on a schedule trigger. This works great, but the downside that the code could sit in teamcity for hours before it triggers and alerts us to a build error.
Is there a way to have a VCS trigger also run the build as soon as its checked in, but passing something to our NANT script to say "just build, don't deploy"?
I know I must be missing something.. is there any way to achieve this?
The only way I could think of was to have an entirely separate build configuration, but that seemed rather wasteful
You can setup a new build with a VCS trigger and then have that build have a env/system variable set that your build script can read to determine whether or not to deploy to dev.
See TeamCity Docs for information around this. I've used something like this in setting up builds before and it works well.

Resources