Use Post-build Actions as Build steps - hudson

Is it possible to use Post-build Actions as Build steps? The problem I have is that the JIRA Hudson Integration Plugin doesn't allow me to use some steps as build steps, but just like Post-build actions. I use the following actions: "Mark a JIRA Version as Released", "Move issues matching JQL to specified version". When I use them as post actions and the job fails, this steps get executed at the end and this is really annoying.

Yes. This plugin will do what you are asking for:
https://wiki.jenkins-ci.org/display/JENKINS/Any+Build+Step+Plugin

Related

How to make GitHub Action installation as simple as possible

I'm working on a relatively simple GitHub Action that I'd like to add to the GitHub Marketplace, and I'd like to make it as simple as possible for people to install in their repositories. But, even the simple instructions provided by GitHub involve steps such as creating a workflow file, copying content into it, etc.
Is there no simpler installation process? Ideally, I'd like to find a single-step or push-button solution – something like a one-step "click this link to install this action" process. Is there such a thing?

Seeing JUnit reports in GitLab using GitLab CI

We want to use GitLab CI to run JUnit tests periodically (every day) and to have a place to see the results of said tests.
Reading GitLab's docs, it seems that the artifacts:reports:junit directive automatically collects XML JUnit reports to display them in Merge Requests.
What I want to know is, are these visible in other places than merge request pages in the GitLab UI? Our tests are going to be ran based on a schedule, merge-request/push/commit pipelines are going to be entirely avoided.
What I want to know is, are these visible in other places than merge request pages in the GitLab UI?
Yes, for jobs that store artifacts there is a download button in GitLab UI Project -> CI/CD views.
Gitlab docs have all described with examples.

TeamCity: Build only when changes are available

I have the following structure in my TeamCity
Commons
* Commons Release Build (takes quite long because of integration tests)
Applications
* AppA Release Build
* AppB Release Build
* AppC Release Build
All three (independent) Applications depends on the Commons-Release-Build. Currently, the single Applications trigger the Commons-Release-Build before building. But in most cases the Commons-Release-Build hasn't changed, so it is unnecessary to rebuild it.
Is it somehow possible to configure Teamcity so it triggers the commons-release-build only when changes are available?
Or is it possible to tell the commons-release-build to do nothing when no changes are available?
NOTE: Gradle is used for every build.
Thanks in advance
Guenther
Answer to my own question:
It is possible to trigger the commons-build, and say "only build when changes are available", but the better solution is to configure the commons-library not to build at all but to be triggered by the depending projects when changes are detected. So do
Disable VCS-Triggers in commons
Create VCS-Triggers in the depending projects
enable the Flag "Trigger a build on changes in snapshot dependencies" on all the VCS-Triggers of the depending projects

Hudson post build tasks

I have an issue in hudson post build tasks,
I am using two plugin FTP Upload(which uploads artifacts to FTP server) and Post Build Tasks(which execute my external batch file).
Now my issue is that Post Build Tasks executes before FTP Upload, that should not happened, I want to execute batch file after completion of FTP upload. See my attached screenshot for reference. Any help will be appreciated.
Can't you just use FTP to upload the file in your batch file? Then you have full control of the ordering?
Later versions of Jenkins (after April 2012) allow you to reorder post-build actions as you wish.
There is also the Flexible Publish Plugin that allows ordering the post-build actions through conditions.
Is there a reason you are sticking with Hudson?
Edit
From official sources:
JIRA issues indicating this problem
https://issues.jenkins-ci.org/browse/JENKINS-7408
https://issues.jenkins-ci.org/browse/JENKINS-9381
Resolution by Kohsuke Kawaguchi (creator of Hudson/Jenkins). Unfortunately, the resolution is in Jenkins.
https://groups.google.com/forum/?fromgroups#!topic/jenkinsci-dev/UQLvxQclyb4
So to answer your question directly: it is impossible in Hudson. Only thing you could try is workarounds with multiple jobs linked up. Let me know if this is something you would consider.

How to make Hudson promote a build after the completion of chained downstream jobs?

I'm using the Hudson promoted build plugin to try an automatic deploy if all of the maven projects are good.
My setup is similar to the following
Hudson job creates a version control tag and then triggers downstream builds of projects A and B. A triggers a downstream project Z.
I currently have the promoted builds plugin listening for success of A,B,Z. But no promotion ever happens.
I currently don't have the project triggering all 3 since there is no point in building Z before A.
Any ideas?
I think you need to configure fingerprinting so that Jenkins can keep track of which downstream build tested which upstream build.
You could try the Build Pipeline Plugin, or take some inspiration from Kohsuke's recent blog post "Doing choreography/workflow with Jenkins CLI" (login with CloudBees/Google/GitHub account required) which should give you more freedom in orchestrating your jobs.