Blue Ocean deleted my code (everything in the branch)

Has this been reported? I’m using Gitea and Jenkins 2.356. I just installed blue ocean and created my first pipeline. I have a master branch with nothing in it other than the initial readme and a develop branch that I have been coding in, with 5 or 6 commits. None of it’s ready enough to go to master, and I was installing jenkins to start ci/cd to the test location.

So, when blue ocean wanted to commit the jenkinsfile, my choices were master or a new branch. I understood that “develop” wasn’t new, but typed it anyway. Since there wasn’t an option for any existing branch, I thought it should either fail because the branch exists, or use the existing branch.

Nope, it completely ovewrote the branch, wiping all of the code as far as I can tell. I don’t actually know what the underlying sequence is, because I don’t even know git that well (day-to-day, I’m in a microsoft shop running tfs on an azure devops server, so linux open-source and git are all fairly recent at-home hobby stuff). I don’t know if it issued a standard command to gitea and gitea should have failed, or if jenkins actively deleted the existing branch and then created the new one or gave it some no-prompt option that prevented gitea from throwing a warning, or if maybe both branches really exist, but jenkins gave some command that forced gitea to create a new branch with the same name, hiding the commits, or what.

If this really is a “bug”, I’ll report it (or someone quicker can). At the very least, if this is a “by design” thing, blue ocean should give some notice that the branch already exists and prevent the commit.

And as a corrollary, if the original commits are just somehow hidden, does anyone know how to get them back?

On a “silver lining” side, the app I’m working on is a wrapper around rclone to do rolling offsite encrypted backups, and I’ve been using the gitea repository as my backup source for testing. So if nothing else, I guess I get to test a restore. :slight_smile:

Please goto, search for blueocean and click on the issue tracker links on the sidebar.

(I should make a canned response for this)

I also highly recommend not using blueocean.

Cloudbees abandoned blueocean a few years ago, they put in a few fixes here and there for big customers, or security fixes, but otherwise its dead. Its such a huge undertaking with nobody at the helm, its pretty stuck as it is. I recommend you try and switch to the more maintainable and upgraded classic ui, and there are some standalone plugins that take care of visualization.

Am I reading the wrong documentation, then? The docs I hit are from jenkins dot io (if I leave the dot, it becomes an automatic link, and then I can’t put the two links below), and say that blue ocean is the newer ui expected to replace more and more of the classic ui. And the only UI version of editing pipelines in the docs that I found was either blue ocean or using the texteditor in the classic ui.

Are we both talking about the same Blue Ocean?

and pipelines

It is still valid documentation, just none of the volunteers have had the time to rewrite the many references to blueocean

woh! I was planning to switch to blueocean just for what I read in the documentation, why not insert a warning in order to avoid installing software that is no longer maintained?

1 Like

short answer is not enough volunteers and not enough time.

Longer answer is anything massively sweeping like putting warnings everywhere would require agreement from a bunch of people, and just nobody has championed it. After the last couple of blueocean threads i’ve started to put something together to get people on board, but i have other priorities.


It could be a banner (such as consent to cookies) that is shown when a user lands on the site and disappears when the user closes it, this approach should be a little effort compared to the damage caused by outdated information.

Anyway thanks