We are using CloudBees Jenkins Distribution 2.277.4.3.
We are unable to save or apply the jenkins configure system changes.
Steps to reproduce:
Go to https://<jenkins_ui>/configure with any browser
Make a configuration change of any sort
Click on "Apply" or "Save".
nothing happens and the changes are not accepted.
Related
We have a nighly build that triggers build of many different projects to verify external testing like contracts and such to avoid triggering such tests on every checkin.
However lately we have encountered a problem, if you open a build configuration and enter any parameter or build triggers and then saves the configuration. Once you save it gives no indication as to an error or anything but if you open it again its not there, no build trigger or parameter gets saved.
We have managed to isolate it to pipeline build, freestyle builds still works.
We installed Blue Ocean recently and are not wondering if it somehow changes how a pipeline job definition is saved. It seems a bad decision if Blue ocean hinders such a basic setting but still. We haven't been able to create a pipeline job throught blue ocean either since our job isn't triggered by any SCM and blue ocean requires that.
I am an admin on our Jenkins master but, this button is not available for any builds for any user.
I found this question which has a somewhat relevant answer since we are also using Matrix-based security, however no one has this button showing up on any build
Is there a plugin required to have this feature available?
My version isJenkins ver. 2.105
Keep forever option appears only when relevant, meaning only if you opt in on other option Discard old builds. If not it's irrelevant see jenkins users answer
option only appears if you have chosen to Discard Builds
from the config for the job. (i.e. if you have chosen not to discard
any builds have a certain time/build number, then the button won't
show).
Where is the pipeline editor located within the Blue Ocean Jenkins plugin?
I can see my pipeline jobs, and when clicking into these I cant see any links\buttons that take me to the editor.
I'm sure in previous beta releases I could get to it, but now since the official release has been launched which I am now using, I cannot find it.
Anyone know where it's hiding?
Use following url to open the pipeline editor:
http://<host>:<port>/jenkins/blue/organizations/jenkins/pipeline-editor/
In addition to Prashant Kajale's answer, you can edit a specific item with
[Url of Jenkins]/blue/organizations/jenkins/pipeline-editor/[item-name]
Edit: According to the issue tracker, saving doesn't work with none-github repositories. You have to go to [Url of Jenkins]/blue/organizations/jenkins/pipeline-editor/ and open the load/save dialog with Ctrl+S, paste you Jenkinsfile (if you have one yet), edit it, and then save it manually by using Ctrl+S and copy.
It is hidden and does not show up until you hover over. I suppose simply a bad UI
design.
Open Blue Ocean from a job.
Select a branch from Branches.
Hover over to the right and buttons will show up.
Select "Edit" and the editor will open.
There is an open bug where the editor links do not display when the job is moved to a folder.
https://issues.jenkins-ci.org/browse/JENKINS-46441
There is two possible reasons why the pipeline editor button isn't showing, either you're not logged in as a user or you're pipeline project is not into github repository.
Blue ocean doesn't support yet generating pipelines with blueocean-pipeline-editor-plugin when your SCM is bitbucket or gitlab or any other git tool.
The good news is that we will have editor support for Bitbucket and plain Git (which will include Gitlab) in our 1.3 release soon.
You can find more details about this issue here
In the Blue Ocean pipeline view, there's a pencil icon on the upper right that lets you edit. So if you click an entry under the Activity tab, if you click any run of the job it will take you to this (green indicates a successful run):
An example URL for a pipeline named my-pipeline would be:
http://localhost:8080/blue/organizations/jenkins/my-pipeline/detail/jenkins/1/pipeline
After installing Jenkins (either for Windows or Linux), you will need to install the plugin for Blue Ocean:
https://www.jenkins.io/doc/book/blueocean/getting-started/
How To Use Blue Ocean and edit an existing pipeline
After installing Blue Ocean and creating a small pipeline, you should be able to see this context menu:
Then, you will see your pipeline in a new "dashboard". Click on the row for the pipeline you need to work on:
You will get another "dashboard" looking screen. Editing is done from the configuration button (the gear icon) on the top menu:
This will take you to the Classic UI look, click on the Pipeline tab:
This is a complicated UI that either is designed to dissuade you not to use it or is in a desperate need for a redesign, in my opinion.
Our current setup consist of a single master controlling several slave machine. Usually, the master would issue the test scripts to slaves based on list. Which ever machine is finish a script or idle, it would continue down the list. All of these are tested against a same single build.
We are moving towards CI way and would wish to do something similar to our current plans. I would think it could work the same whereby the master would build, then distribute to the slave for testing. How would this be done?
edit: Just to clarify my position, I have not use Jenkins before, therefore the lack of knowledge for it. Before flaming me into oblivion, I just need someone to point me to the right direction, not asking for a spoon feed solution.
Since you didn't accept hyde's response, I'll assume you're looking for a more detailed answer. First, if you're new to Jenkins I highly recommend Jenkins: The Definitive Guide. Jenkins isn't difficult to use, but it can be hard to get started. That book provides a nice guided tour from the beginning into some of the more intricate parts of running a Jenkins installation. Now on to your question. Jenkins allows you to try things out very quickly without having to really "install" it, so follow along here. You'll also want access to a second computer to make the temporary slave (don't worry, there's no real installation, so just use a coworker's computer).
These instructions look long, but only because I'm walking through every single step. This won't take much time. Also, feel free to click on the little question marks next to all of the fields in Jenkins as we go. By the way, when I quote something, type what's inside the quotes but not the quotes themselves.
Go to Meet Jenkins and scroll down to the Launch button to start Jenkins without installing anything.
Go to http://localhost:8080/. Look! Jenkins is running!
On the left, click Manage Jenkins, then click the Manage Nodes item.
On the left, click New Node. Name it "Foo", select "Dumb Slave", and click OK.
Set "# of executors" to 1 (it's the number of builds you want this slave to run concurrently).
Set "Remote FS root" to "c:\jenkins" or "/tmp" (this will create some files on the slave machine, so use a directory that has write permissions).
Set "Labels" to "tester"
Set "Launch method" to "Launch slave agents via Java Web Start" (you probably don't want to do this in production, but it will allow us to bring up a slave quickly).
Click Save
Click on Jenkins in the upper left corner to go back to the main page.
Click New Job on the left.
Name the job "My build" and select "free-style software project" and click OK.
Check Restrect where this project can be run and type "master" for the label (it should even auto-complete). This makes the build only run on the master.
Towards the bottom click Add build step.
If your master (the current machine) is a Windows machine, select "Execute Windows batch command", otherwise, select "Execute shell".
Either way, for the command type "echo Building". This isn't necessary, but it allows you to see that the build really did something that you told it to do.
At the bottom of the screen, click Save.
You should now be at the "Project My Build" page. Click the Build Now link on the left. Since the build barely does anything, it finishes almost instantly. An entry appears in the history with a blue circle, indicating that the build was successful.
Go back to the main Jenkins screen and add a New Job.
Name this one "My test", make it another "free-style software project", and click OK.
Again, check "Restrict where this project can be run", but make the label "tester" (again, it should auto-complete).
Scroll down and click Add build step again. Select "Windows batch" or "shell" depending on what the slave computer (e.g., your coworker's computer) is.
Type "echo Testing"
Click Save down at the bottom.
Now for the fun part. Go to your other computer (or tell a coworker that their headlights are on and use their computer). Open the web browser and go to http://your-masters-ip-address:8080/
Click Manage Jenkins, and then Manage Nodes.
Click Foo, and click the Launch button. Click through any security/"are you sure" warnings, and you should see a little window saying Jenkins is connected. Now your slave is running.
Go back to your master computer, go to your Jenkins home screen, and click My test in the list of builds.
On the left, click Build Now. This will take a little longer, because it has to contact the slave and farm out the job, but it should finish and add the build to the history.
Click the entry in the build history. Then, on the left, click Console Output.
The log should say that the build was remotely executed on Foo, and have the echo statement. Woohoo! We now have remote builds working.
Lastly, we'll link the builds together. Navigate your way back to "My build" and click Configure on the left.
In the Post-build Actions section, click Add post-build action, and select "Build other projects". Type "My test" in the field (it should autocomplete). Click Save.
Go to the Jenkins main screen, and click the clock/play icon to the right of "My Builds". If you watch carefully, you may see the jobs appear in the "Build Queue" or the "Build Executor Status" on the left.
Wait a minute or so, and then refresh the page, and you should see the "Last Success" time for both of your builds update. Clouds should part, and you should hear angels singing, but don't celebrate just yet.
You now have a master doing the "build" and a slave doing the "test", and a build triggers the test. You could add more slaves and so long as they have the label "tester", the build server will auto-distribute. You could also have many tests following the build, and have the build trigger all of them. That's all the easy stuff, the thing that requires some elbow grease is getting Jenkins to run your build and tests. Start small and work your way up. Oh, and seriously, go buy that book I linked to (it's available in dead-tree and DRM-free ebook, and no, I don't have any connection to O'Reilly or the author, it's just a very useful book) so you have an idea of what Jenkins can do and how best to fit it with your system and what you want.
Is this what you mean:
Go to slave node configuration, and give slave appropriate label, like "unittest". Repeat this for all slaves you want for unit tests (note that slave can have many labels if needed).
Go to job configuration, tick "restrict where this job can run", type "unittest" there.
Also read help texts of these fields!
For more advanced/complex CI setup, also check out node label parameter plugin, if you want to parametrize where a job can run.
I've used the Simple Promote Plugin in Jenkins and it set my build to "keep this build forever".
Is there any way I can delete it?
I got access to the slave who build it and to the master (tried to find anything related in there but no luck).
I'm not sure whether (or how) the Simple Promote Plugin affects this at all, but can't you just click the button that says "Don't keep this build forever", followed by "Delete"?
When a build is marked as "keep forever" (and the padlock icon shows next to the build), you should be able to "unlock" it by pressing that "Don't keep..." button on the build page.
Just as Christopher said, you can remove the build just by deleting the build directory on the master, inside the job directory.
However if you access the page again, the build data gets dumped to disk again. So you either shut down Hudson first, or you go to the Hudson management console and 'Reload Configuration from Disk' which basically discards whatever's in memory and reloads from your config files.
Just make sure you do it right after deleting the folder.
In order to delete builds marked "keep this forever" you should change that flag to opposite state.
Please follow next steps
Open within a text editor $HUDSON_HOME/jobs/job-name/builds/xx/build.xml
Change
<keepLog>true</keepLog> to <keepLog>false</keepLog>
Go to Manage Jenkins -> Reload Configuration from Disk
After these steps you will be able to delete build marked as "keep this forever"
I think that the final (and may be the only one step) to completely delete build from Hudson's history is to modify "nextBuildNumber" file placed in job directory.
Please remember that "Don't keep this build forever" button will only appear when you enable "Discard Old Builds" inside job configuration. I am not sure if it affects Simple Promote Plugin, but it work in this way with 'Release Plugin'.
MichalT
Not sure about masters and slaves, but there is an answer here that allowed me to delete a build "explicitly marked to be kept".
List all keep-forever builds in Jenkins?