Teamcity Max OS X Agent - Incompatible runner: Command Line - teamcity

I am running TeamCity 7.1.3 (yeah, I know it's an oldie). I have a Mac OS X Yosemite build agent.
I started the agent in the recommended way, sh bin/agent.sh start.
My build configuration contains one command line build step, but it can't run, because I get the following message on my agent:
Incompatible runner: Command line
I think it is a permission issue, because if I start the agent with sudo sh bin/agent.sh start it works. I don't want to run it with sudo though. Is there a permission I can give my agent account to make this work?
Update: it seems "chmod 777" on the buildAgent folder solved the problem. Of course, it is not the most secure idea. Would be happy to know the lowest permissions I need to apply.

When you installed the agent, did you use the Mac setup script in the agent's bin directory? I believe it's called mac.launchd.sh. You can't run it via remote terminal or Apple's Remote Desktop or you'll have issues. From the machine (or via VNC) login as the user you want to run TeamCity and run that script from Terminal. Then the agent will start on user login, and will properly upgrade itself when you finally get to upgrading to the latest TeamCity.
My experience with Mac OS X TeamCity agents improved greatly when I stopped trying to run it in the background as a 'daemon' (launchd's term for a boot service) similar to Linux, and instead ran it as an 'agent' (on login service). Typically on a Mac OS build agent you'll want auto login enabled for bits of Xcode to work correctly. Then you just lock it with a screen saver.

Related

Notarizing Mac App in bamboo with install4j9

I have recently updated from install4j6 -> install4j9, which I use within in my build server in bamboo. Bamboo has no issues code signing the files but the notarization process in never ran. I have no issues doing this manually on my Mac, but within bamboo it never runs. I've seen some posts about xcode plugins for bamboo, but I am not sure whether I need to implement script tasks to perform the notarization manually, or if install4j9 supports this. Any help/resources would be appreciated.
Here are the logs I am seeing from bamboo on my end:
[INFO] Important: macOS media sets have to be notarized before distribution.
[INFO] More information in the code signing help.
install4j can only perform notarization if the build runs on macOS. Notarization involves calling command line utilities on macOS that perform operations that my not be reverse engineered on other platforms.
If notarization might be executed at MacOS only then you can start Remote agent at your Mac env and configure Bamboo Server to send this job to that agent. Then it doesn't matter what OS Bamboo Server is running.

Launch VSCode from source through WSL

I would like to build/launch the VSCode source code in the native Bash for Windows client. I have followed the steps outlined in the VSCode wiki on how to contribute, and everything is working as expected (All commands have been run on the WSL terminal following the Linux instructions)
After running yarn run watch, I try to launch VSCode by running DISPLAY=:0 ./scripts/code.sh from the source code directory, but nothing happens. I get two duplicate warnings:
[21496:1128/120229.392130:WARNING:audio_manager.cc(295)] Multiple instances of AudioManager detected
but I'm not sure if this is causing the problem. I have an X Server client running, and have used to to successfully launch native Windows applications through WSL (terminator, emacs, etc.)
Is what I'm trying to do possible? If so, how can I make it work?
Amazing that you asked this! I was attempting to do the exact same thing at (it seems) the exact same time. Here's my process.
Install XMing
Install the xfree apps
Set DISPLAY=:0
Run xeyes ==> Awesome googly eyes!
Attempt to build vscode from source. The build docs seem to be incomplete b/c I had to install a ton of libraries beyond those listed e.g.
yarn
gulp
gulp-cli
pkg-config
libx11-dev
libxkbfile-dev
libsecret-1-dev
libgtk2.0-dev
libxss-dev
gnome-dev
libgconf2-dev
libnss3-dev
libasound2-dev
Eventually get the yarn tasks to finish such that I could run code.sh
./scripts/code.sh
[20474:1128/153959.035267:ERROR:bus.cc(427)] Failed to connect to the bus: F
ailed to connect to socket /var/run/dbus/system_bus_socket: No such file or
directory
[20474:1128/153959.081986:WARNING:audio_manager.cc(295)] Multiple instances
of AudioManager detected
[20474:1128/153959.082101:WARNING:audio_manager.cc(254)] Multiple instances
of AudioManager detected
Looking at ps I see that the process was running.
Conjectures
It seems that building from source from WSL is not yet supported. Or maybe you can build the artifact, but you can't connect to the Windows display to show it. Based on the quality of the xeyes session, it looks like a very, very, very primitive experience e.g. still using WinXP-style minimize / maximize / close icons.
I was literally writing an Issue on their github page when I thought I'd do one last search and found this post. Much of vscode treats WSL as a second-class environment on Windows. Recent work seems to suggest that things are going to get better as driving to integration between Windows' two internal environments continues to improve (e.g. https://github.com/Microsoft/vscode/issues/39144)
Update 2017-11-30
Based on some pursuit via Github, it seems that this issue has been reported to the WSL team: https://github.com/Microsoft/WSL/issues/2293. It appears to be under active consideration by the WSL team. I've added some commentary about my use case there.

AWS Opsworks cannnot install and use GIT on windows Setup recipe

I'm trying to setup a windows environment within AWS Opsworks.
I have a setup recipe that will install GIT and Ruby.
And a deploy recipe that will try to use git and rake.
Setup works successfully. However, deploy will complain that git/rake are missing.
If I reboot the instance, I can issue a deploy and git/rake will be found.
The symptoms I am experiencing are as follows:
Start brand new instance
Setup will properly install applications
Deploy will fail
Stop and Start instance
Setup and deploy will finally succeed.
Based on my searches online, seems windows requires a reboot after changing environment variables. Git and Ruby are added to the PATH after installation but it seems my scripts cannot locate these applications until a reboot. I'm using opsworks_scm_checkout and powershell and both will not work.
I tried modifying my setup recipe to reboot during the startup phase, which works perfectly but my deploy application doesn't follow after the reboot.
Start brand new instance
Setup will properly install applications
Reboot
Deploy never fires, have to manually trigger this in the App Deploy
Is there a proper workaround for this? Anyone have real life experience on how to resolve this?

Instruments wants permission to analyze other processes Jenkins

So my problem is that on pure swift project (almost :-) ) with test written also in Swift I got this every build. Build is started via Fastlane 1.63. :
▸ DTServiceHub: Instruments wants permission to analyze other processes. Please enter an administrator username and password to allow this.
▸ Username (jenkins): Password:
▸ Failed to authorize rights (0x1) with status: -60007.
Problem occurs when new command-line-tools and Xcode 7.3 was installed on MacPro with OSX Server. Objective-C project works every time. I've done what was suggested in those threads, didn't work:
Remove the authorization prompt from command line instruments (Under mavericks)
Is there a way to remove the authorization prompt from command-line instances of Instruments (XCode)? and in all other places that I could find. I have no idea how to fix it.
I just experienced a similar problem, triggered by Fastlane scan command to execute tests.
Following the discussion on this issue and this Apple Support discussion I managed to solve it by enabling "Developer Mode" on my CI machine.
$ DevToolsSecurity -status
Developer mode is currently disabled.
$ DevToolsSecurity -enable
Developer mode is now enabled.
I've got the same problem with Xcode 7.3. I wasn't admin on my Mac (I work on a company network) so the network manager gave me the admin rights and it works... I don't know why :)

Mac 10.6 server / tomcat / jenkins / vncserver can not run in directory

First let me point out I'm a newbie with tomcat & Jenkins. This is the first CI server i have setup.
Im developing a flex app, and my goal is to have jenkins auto-build and run flexUnit tests after changes are pushed to github.
so far I have:
installed Jenkins (1.450) under tomcat (6.0.33) on a headless mac mini server running (10.6.8)
(basically following "Servlet Container Installation on Mac OS X Server (10.6)" #
http://wiki.wocommunity.org/display/WO/Installing+and+Configuring+Jenkins+Build+Server)
downloaded flexSDK, setup user authentication and configured github hooks.
at this point everything is working fine, jenkins will build a simple flex app once changes are pushed to github
now I'm attempting to build the flexUnit Sample CI Project. on first attempt it gets stuck waiting for a replay from Flash Player Debugger (projector). After some research I found flash player needs to run in a virtual display. So I installed Xvnc Jenkins/Hudson Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Xvnc+Plugin).
Os X has a built in vnc server however it doesn't seem to communicate with Xvnc, so I installed tightvnc (via macports).
Then I setup the VNC password in my jobs workspace by running the following command in terminal
"sudo -u _appserver vncpasswd /Library/Jenkins/jobs/flexUnitSampleCIProject/workspace/.vnc/passwd"
And this is where I'm stuck, when I try to build flexUnitSampleCIProject I get the following error
FATAL: Cannot run program "vncserver" (in directory "/Library/Jenkins/jobs/flexUnitSampleCIProject/workspace"): error=2, No such file or directory
java.io.IOException: Cannot run program "vncserver" (in directory "/Library/Jenkins/jobs/flexUnitSampleCIProject/workspace"): error=2, No such file or directory
My gut feeling is this is a permissions issue since jenkins is running under the user _appserver
So I ran ran the following command in terminal
"sudo -u _appserver vncserver :6" and i get the following error
"vncserver: Wrong type or access mode of /Users/admin/.vnc."
However I read sudo doesn't inherit the home folder of the user (in this case "_appserver") and "su _appserver" dosen't work so I'm not sure where to go from here
Has anyone had any luck running flexUnit on mac server/tomcat/jenkins?
any ideas would be greatly appreciated
Have you told the VNC plugin where to find vncserver? It's under "Manage Jenkins" > "Configure System" > Xvnc.
However, depending on how the flash projector works, you may hit other issues because OSX doesn't really run X11, and in particular OSX versions of apps don't run X11;
See How to configure jenkins with xvnc on OSX Lion for maven project for more details on that.

Resources