How can you deploy a bitbucket-plugin (already built as jar) to the server via terminal? - bitbucket

We run a Bitbucket Server on version 7.21 and have recently developed a Plugin for it. Since this plugin finally reached a stable Version we wanted to integrate it into our cd/ci pipeline (bamboo).
We can build the plugin via bamboo build plan alright, but we are facing an issue when trying to deploy it.
atlas-sdk's "atlas-install-plugin" does not work for us (afaik) because we are not in the project space, but only have the built jar itself.
Is there any way to copy the jar to a specific location on the bitbucket server and it auto-deploys or something similar?

For anyone searching, I found the solution.
You can install plugins via the rest api: https://confluence.atlassian.com/confkb/installing-uninstalling-upgrading-and-downgrading-marketplace-apps-on-confluence-using-rest-api-1005343959.html

Related

There is no AWS Codedeploy Plugin in Jenkins

I use two different Jenkins servers(tomcat jenkins) and i was trying to install a plugin for aws codedeploy.
However, I couldn't find it in the list of a Jenkins but another one has it.
Why the plugin libraries are different? even though i install them in a same way.
Also, How can i add a particular plugin in my Jenkins server?
Thank you.
Why the plugin libraries are different?
The plugin libraries shouldn't be different.
Which way did you search the plugin (jenkins gui, in the web)? Both your servers are on the same Jenkins version?
Also, How can i add a particular plugin in my Jenkins server?
I do it always via the GUI as described here: https://jenkins.io/doc/book/managing/plugins/

Continuous Integration with hybrid mobile app

I have a problem. I need to build a job in my Jenkins server hosted by macmini (localhost) to automatic build a deploy for my mobile hybrid apps. That's apps was building with ionic2, and need a deploy for Android (apk) and for iOS (ipa).
But when i run a build from Jenkins, with this shell command
I get this error
that's not all... because i try to execute, from the jenkins folder, the npm i and the result was this:
When i try to build my application from other "folder" and not from jenkins, they works correctly. How i can solve?
Without more information hard to say; you can either just script the things you do when you deploy "manually", or you might want to try a CLI tool like https://www.bitrise.io/cli or https://fastlane.tools which can auto-scan your project and configure a suitable configuration which is then easier to tweak.
In case of Bitrise CLI the base config can be generated with bitrise init in the repo root, and you can also use a visual editor to modify your configuration: https://discuss.bitrise.io/t/how-to-experiment-with-bitrise-configs-locally-on-your-mac-linux/1751
After a lot of time, just find the solution. Jenkins have a own "tools management". So i need to install, into jenkins, a property version of nodeJS, Npm and all other tools i need to deploy the application.
So, first of all you need to install property plugin (in my case nodejs).
After this, going into Jenkins Management System and configure a NodeJS version. That's all

Jenkins plugin upgrade

I have a large fleet of Jenkins instances running in a cluster, all having the LDAP plugin version 1.6 (Jenkins version 1.611). I want to fleet-upgrade the LDAP plugin version to 1.7 (to incorporate environment variables in my plugin configuration). How do I achieve this without manually uploading 1.7 version through UI for each Jenkins instance?
I tried writing a script which basically performs these operations for each Jenkins instance:
Replace the existing .jpi/.hpi file in $JENKINS_HOME/plugins for ldap plugin with the correct .hpi file (of the 1.7 version)
Edit config.xml under $JENKINS_HOME which has the version number
Safe restart Jenkins
It works fine till step 2 but as soon as I perform safe restart, Jenkins magically puts in the original .jpi/.hpi file (the 1.6 version file) back inside $JENKINS_HOME/plugins. Jenkins instance has the 1.6 plugin version again in the UI. Is there a better way to perform fleet plugin upgrades in general? I want to mention that I want the 1.7 plugin version, not the latest
How do I fix this? I even tried using curl (mentioned at https://stackoverflow.com/a/20848745/1746529) but didn't help.
Got a working answer on Google groups.
"As you are on 1.x create an empty ldap.jpi.pinned file as a sibling and that marker will instruct Jenkins not to replace with the bundled plugin."
Came across the documentation for it as well - https://wiki.jenkins-ci.org/display/JENKINS/Pinned+Plugins

Unity3D + Jenkins Configuration

I'm using Unity3D, Jenkins and Bitbucket private repository. Jenkins is installed in cloud service. I want to automate buildings and probably run some tests in Jenkins before pushing to repository.
I have configured Jenkins properly to such step that it works when pushing some changes to repository, but this configuration doesn't contain configuration of Unity3D Build Plugin. In order to get Unity3D Build Plugin working properly you must configure it by providing the directory of your Unity3D Editor. Problem here is that Jenkins is installed in cloud service and Unity3D Editor on my computer. If you want to configure Unity3D Build Plugin you must provide it's .exe file location. So my question is that is it possible to tell Jenkins that is installed in cloud service that Unity3D installation directory is located at my computer? If yes how it is done?
right now it's a limitation on the plugin. I hope to fix this. Open a bug in the issue tracker (https://issues.jenkins-ci.org/browse/JENKINS) and let's move the conversation there!

Updating jenkins plugin from source

I currently have Build User Vars Plugin 1.1 installed in my Jenkins. Since version 1.1 of the plugin, there has been some important changes to the plugin code, and I want to pick them up. The question is what is the least amount of work to package up the hpi/jpi file that I can push on my Jenkins install that will contain latest changes.
It's fairly easy to build a plugin locally; you can then upload the hpi/jpi file to Jenkins via the Advanced tab in the plugin manager.
See the Jenkins plugin tutorial for detailed steps.

Resources