Chrome browser not launching through jenkins user in jenkins - maven

But this does not launch chrome browser. It just shows below output and keeps loading
The same thing works if I execute a shell command "sudo mvn clean install".
But it does not work if I specify goals and options.
This looks like jenkins user is not authorized to launch chrome.
Can someone please help me out here?

Related

Jenkins : run app and command in same time

I want to know if it exists a way or not to run an app in Jenkins job then run commands meanwhile app is running. I explain my situation, I need to audit my website in my pipeline with Asqatasun services but to do it I need to have an app is running. The problem is : if my app is running, commands below are not going to be executed until app is going shutdown.
Do you know a way to run an app and execute command in same time please ?
You can run your pipeline while your app is up and running. Jenkins pipeline has it's own workspace where your pipeline will be executed under the jenkins user. There your code will be cloned and all commands will be executed. It won't affect your on going running app.

Heroku deployment error via codeship

I want to deploy django app to heroku via codeship and it generate an error and that is wget -O/dev/null http://something.herokuapp.com
How to fix the problem
Marko from the Codeship team here. Could you paste some more log output, or open a ticket on https://helpdesk.codeship.com?
Judging from the command you pasted above, I'd guess the check if the Heroku app, that you just deployed to, is running fails and this causes the build itself to fail.
Without any additional configuration we check the root URL for your application at http://HEROKU_APP_NAME.herokuapp.com via wget and see if it returns an HTTP/2xx or HTTP/3xx status code.
If it does, the check succeeds, else the build fails.
You can take a look at the script we use to perform the check at https://github.com/codeship/scripts/blob/master/utilities/check_url.sh

Nagios calling 'mvn test' in a project returns a error, but without details

I have a command defined as:
define command {
command_name xyz_minimal_check
command_line mvn --global-settings=(dir)/settings.xml -f (proj)/pom.xml -Dtest=ThingTest#testThing test
}
and a service defined to call this command. When it runs, I see:
[ERROR] Error executing Maven.
But I do not see any details in any log. Where might these be? I am sure there are some things I need to set up or some environment variables I have to provide to the command that nagios is running, but I cannot tell what they are. I have looked in the usual logs and see nothing specific to this service.
This is running on an Ubuntu 14.04 system. The usual ping and http services in nagios are working fine.
Well, the only place I can see the output of my command is in the web interface itself. Click on the service name and the output is in the description of the service there. It seems very strange that nothing goes into var/nagios.log or any other log file.....
And once I saw my output, I could see my errors. The issue was that I had to make it possible for the nagios user to run the "mvn test". My default, the permissions prevent this. The easiest way to do this is to create a directory owned by the nagios user, give it its own copy of the project, and give it its own .m2 directory. Then it will work.

How to use expect for remote deployment using script

I am trying to automate deployment on the remote server.After doing some investigation I came across two approaches:
1.Using expect
2.Using sshpass
I want to run a script file with deployment steps,without manually entering any password or any other input parameter required by my script from command line.
Please suggest me the right approach.
I went through Ref1 and downloaded expect5.45.tar. Can anyone please let me know what should I do next. I am not able to install as I don't have admin rights.
Would Jenkins not suite this questions. Jenkins will allow for script control as an environmental file as well as control over the remote host (via the publish over ssh plugin).
This would allow you to automated your process.

Changing the user executing the build script in Atlassian Bamboo

Here is my problem:
I have a python build script building a .air package and deploying it on a server. If I run this script from a cmd.exe window, there is no problem, the files are correctly created and deployed.
But I would like to use Bamboo to be able to build my app everytime I commit/push changes. I configured it but have a serious problem: the .air package is created but the deployment (with a fabric script) doesn't finish... I noticed that the process is launched by 'Administrator' in a cmd.exe and by SYSTEM trough Bamboo. I think that this is the problem (maybe SYSTEM cannot find the ssh host or whatever), so I wanted to know if someone knows how to change the user executing the script to 'Administrator'.
Yes, you can change the user that your bamboo server runs as. I recently posted an answer with details on how do just that in Windows Mercurial global keychain . All the documentation for the windows stuff in the wrapper file can found at http://wrapper.tanukisoftware.com/doc/english/props-nt.html .

Resources