Jenkins build trigger configuration getting lost - jenkins

I am trying to use the
Build after other projects are built
feature of Jenkins. I am using Jenkins ver 2.73.2 and whenever I go to
Configure job -> Build Triggers
and specify my projects, the configuration does not get saved. There is no save button so when I navigate to another page the configuration gets lost.
I am using JenkinsFile in all projects to build it so this is the first thing I am doing from the UI.
Couldn't find a proper solution to this issue anywhere.

Try to restart your jenkins.
Possibly you my have harmed you jenkins folder in program files.
Please try to upgrade your jenkins

Related

Run jenkins post build step on the slave node instead of Master

I have created a Jenkins job and am able to assign it to run on the master/slave using their label name in Restrict where this project can be run. My job needs to do this
Copy test data to a target folder (not Jenkins workspace)
Run the test
Summarize results
Cleanup the folder with data - Yet to be implemented
Regarding step4, I have to delete the data before marking the job as complete. I have considered a Conditional Build step and it looks to be working in all cases except when the job is aborted.
I am considering a Post Build step using PostBuildTask/GroovyPostBuild and it only works when the job is assigned to run on Master. The issue here is when I try to run the job on Slave1/Slave2, the same task doesn't seem to work and I realized that its being executed on Master instead of Slave1/2.
Would appreciate any guidance on how I can solve this issue.
Thanks
Yes, Post build steps run on Master by default. So, you need another plugin allow you to choose which node you want to run Post build step. In my system, I use "Flexible Publish" plugin that I see it can solve you issue
Flexible plugin example

How to trigger Jenkins job when a change is made in Server folders?

I want to trigger my Jenkins Job when a particular folder is modified in WAS server.Is there any plugin available ? I tried with 'FSTrigger' plugin but it is working only for local machine folder changes but not for server side changes. I am getting following message in FSTrigger floder log.
Trying to monitor the folder 'https:\server_name\folder_path'
The directory 'https:\server_name\folder_path' doesn't exist.
Kindly help me on this.!!
Regarding this answer:
How to set FSTrigger's folder path in Hudson CI integration tool?
I think you can only monitor a local URL, like:
/var/www/html/test/test1/config
To solve your problem, one solution is to connect your WAS server to your Jenkins master as a Jenkins slave.
And next, create a Jenkins job using the FSTrigger plugin and launch it on your WAS slave.

Jenkins MultiJob Plugin- "Phases" option not available in Build Section

We're using Jenkins for deployment, and would like to use the Jenkins MultiJob plugin to deploy a bunch of services at once. From the description, it looks like this will do exactly what we want. I have the latest version of the plugin (currently 1.9) and all other plugins and Jenkins are up to date.
On the plugin page, it says this: This job can define in the Build section phases that contains one job or more., and it shows a screen print with the ability to configure phases and jobs. But, I don't see that option anywhere after I create a new MultiJob project (which is step one in their process). I have restarted Jenkins in case something wasn't right.
I'm hoping someone can help.
Thanks in advance.
I had reboot Jenkins, and still could not find it.
I finally found it under "Add Build Step" -> MultiJob Phase
OK, figured it out. For some reason, I cannot get the "phases" option to show up on the original MultiJob that I created before restarting Jenkins, although it told me that the feature would be available without a restart.
I created a new MultiJob project (after the Jenkins restart), and I now have the phases option available, and is working.
Hope this helps someone.

Trigger Jenkins with Puppet

Recently our organization decided to move from using Maven/Cargo-plugin to deploy our applications to using Puppet. We still have all of our builds and test jobs in Jenkins. So what I'm trying to figure out is how do I trigger a specific Jenkins job based on a specific line being changed in a puppet manifest? We are using a manifest that has all of our deployed components and their versions. If I change the version of one of the components, I want a specific test job to be triggered based on which component was changed. And eventually I will want to rollback the puppet change if the test fails. Has anyone done something related?
I haven't used it for your specific use case, but for a "pull" scenario where you want to monitor the contents of the Puppet manifest for changes, the Jenkins FSTrigger plugin should work for you as long as your Jenkins job can access the Puppet manifest file. You can set it up to look for changes in the entire file content, or just in a particular part of the contents.
If you want a "push" scenario to trigger a build as soon as the Puppet manifest is changed, you could write a script that runs after the changes are saved, checks which components have been changed, and triggers a build via the Jenkins CLI.

Build other projects post-build action missing Trigger radio buttons

I'm running Jenkins version 1.466.12.1 (Jenkins Enterprise 12.11). With a new job I'm trying to add a post-build action to build other projects, but the expect radio buttons for trigger options isn't there.
I have jobs that were already created that have the following options:
Trigger only if build succeeds
Trigger even if the build is unstable
Trigger even if the build fails
Those options don't exist if I create a new job. If I copy a job, then those options exist. I don't recall the version number of the previous Jenkins Enterprise, but it was working then.
I also have a non-enterprise version of Jenkins running on my desktop computer and those Trigger options don't exist on version 1.483.
Did something change with this post-build action? Maybe I forgot a fancy/useful plugin?
JENKINS-16444 was fixed in Jenkins 1.500. The workaround should be to add the build trigger, save the configuration, then go back to the configuration page again and these options should be visible—the problem applies only when first adding the trigger.

Resources