Conditional Post-Build step in Jenkins (Ideally without plugins)

If I understand correctly I can make a build step conditional using this plugin:

First does this plugin work the Post-Build steps?
Second is there a way to make Post-Build steps conditional without a plugin?

  • How to build a multi-module maven project in jenkins
  • Jenkins git plugin with ssh access to bitbucket: Permission denied (publickey). fatal: Could not read from remote repository
  • Plugin with id Android not found
  • jenkins git how pull instead of clone?
  • Prioritise older pipeline runs over newer
  • How to list all `env` properties within jenkins pipeline job?
  • The scenario I have is I am supporting both WebDriver and Selenium IDE tests with one universal Jenkins Job setup. If they have checked in either type of test it runs them. I then want it to conditionally look if any results files show up and if so then do the publish results Post-Build step, otherwise skip that step.

    Currently if no results show up it simply marks the build as a failure since no test results were found.

    Any suggestions would help!

  • Jenkins user-based job security
  • Getting Spring Error “Bean named 'x' must be of type , but was actually of type ” in Jenkins
  • How to enable debug logging on jenkins?
  • Platform command not found for Jenkins for ios build?
  • Get the error when creating the view “cleartool mkview -tag $view-name $view-name" with Clearcase UCM Plugin 1.7.4
  • How to ensure same git checkout for build and deploy jobs in Jenkins?
  • One Solution collect form web for “Conditional Post-Build step in Jenkins (Ideally without plugins)”

    You can make any Build step execute as Post-build step.

    • Install Flexible Publish plugin
    • Install Any Build Step plugin
    • Under Configure System, look for “Flexible publish”, and choose Any build step from drop-down.

    The configure Job.

    • In your Job configuration, add Post-build action called “Flexible Publish”.
    • Select condition.
    • Select action.
    Git Baby is a git and github fan, let's start git clone.