Locking/Unlocking a file remotely in Subversion - ios

I have Subversion setup on a Windows machine for iOS development. The WIndows machine acts as the server and all the team members are working on Macs.
I use TortoiseSVN as the SVN client and I know you can lock files using that but you have to have access to the directory in the server to do that all the time. Therefore I'm looking for a way to do it remotely.
To explain further, when a team member starts editing a file, he should be able to issue a command through the terminal (I read that you cannot do this through Xcode though a feature like that would have been great!) to lock the file and again unlock it the same way.
How can I do this?
Thanks

svn lock <filename> on a file kept in a working copy is the equivalent of Tortoise's "Get Lock"

Related

TFS Release Task to Deploy a Web Deploy Package to specific directory

I've been digging for hours and i haven't been able to find what i would think is a pretty common scenario.
I am attempting to deploy a Web Deploy Package to my existing Web Site\Web App via a TFS Release. The location of my existing Web Apps is mapped to a different drive. My source code on my web server is not in C:\inetpub lets say its in D:\MyFiles.
I'm open to using any TFS task to do this. It seems like my two options are:
Run Batch Script - point to myApp.deploy.cmd
WinRm IIS Web App Deployment
I've seen lots of examples of overriding the computer name via the setParamater file but I have not seen one example of how to set the target path for the package?
Again, i want to deploy a web package via a TFS release to D:\MyFiles. I've created the package and it deploys locally to c:inetpub, I would assume if I can get it to deploy to a specified Target location locally then when I run that same. CMD file from TFS release it will use that location on the deploy to server.
UPDATE:
So... this just started working. I'm not sure what the issue was but the WinRm Task didn't do the deploy on Friday but did the deploy on Monday. I'm thinking it may have been related to a FQDN for the server path? Honestly I'm not sure what fixed it or what to do with this post? The answer below by #Andy may help someone so I won't delete it. That link is a good one and it showed me how to perform IIS configuration with Web Deploy.
Thanks in advance,
Greg
Seems you are trying to change the physical path of an IIS site/app using MSDeploy.
Just try adding an additional command (appcmd) to the MSDeploy package manifest to change the physical path of the IIS site during the deployment:
<runcommand path="%windir%\system32\inetsrv\appcmd set app /app.name:"Default Web Site/app12" /[path='/'].physicalPath:C:\temp\app12" waitInterval="5000"/>
Refer to this article for details:
WebDeploy/MSDeploy Quick TIP: Change IIS Site/APP Physical Path with MSDeploy

Location of Xcode Bots configuration files

I need to copy and transfer integration settings (trigger script, actually) from one to another project, but since my development Mac isn't connected to OS X Server, I can't check out Bot settings and take that script from existing project.
Is there a way to find Bot's configuration files? And where they are actually stored at (dev machine or server)?
I tried to look at
~/Library/Developer/XcodeServer
but found only bunch of .log files for every integration
For those coming to this using the newer version of Xcode Server, even though Xcode Server now runs as a specific user, the configuration files are kept in /Library/Developer/XcodeServer. You can also hit the Xcode Server API to get information about your bots.
I don't really know that this approach can work properly, however, my suggestion would be "export and import XCode configuration file". That can be understood as after your project completed configuration, start exporting "xconfig" files and then import to your other projects.
This link might be helpful Is there a way export xcode build settings to .xcconfig file?

How to make a setup/install for remote msi

I would want to make a setup which allows to install a remote MSI package.
The trade platform that i use does not allow to download too heavy files - my MSI package is too heavy.
So i am obliged to use a "light" setup which is capable of downloading and of executing my remote MSI package.
For information my MSI package is generated from ANT file with WIX technology.
Any ideas on the way of taking itself there to make this setup ?
Thanks you in advance.
The best answer that I can give depends on some assumptions:
That you can install an agent on the client systems.
That the client is permanently connected to the internet and can get to the remote MSI file, and the same applies if it's an intra-company network situation.
If you can't download the MSI (and "push" installs don't work anyway) then get an agent program onto each client system somehow, which installs the MSI file using your HTTP:// web site as the location of the MSI file, the equivalent of msiexec /i http://server/share/package.msi
This is effectively what group policy and so on do in corporate networks, the MSI being on a share rather than an internet location.
The other alternative if you can download MSI files with your own code is again to have an agent program on the client machine that explicitly downloads the MSI to a permanent location (NOT temp internet files location) and simply installs it with MsiInstallProduct or equivalent, and "how to download a file" is an internet question rather than a Windows Installer question.

Deploy features.xml in servicemix during jenkins Build

I have my features.xml file in src/main/resources/features folder , when I build my project through Jenkins after building my bundle goes to the nexus repository , my requirement is that after my bundle goes to nexus then features.xml should automatically be deployed on servicemix as part of build only. I should not open the servicemix console to install the feature. Please help
You may think about using a KAR (KAraf aRchive).
More information can be found here: http://karaf.apache.org/manual/latest-3.0.x/users-guide/kar.html
You can build а KAR (through Jenkins), containing your feature, then you can use a hot deployment.
Apache Karaf also provides a KAR deployer. It means that you can drop
a KAR file directly in the deploy folder.
Apache Karaf will automatically install KAR files from the deploy
folder. You can change the behaviours of the KAR deployer in the
etc/org.apache.karaf.kar.cfg:
I have also been working on this and my solution was to turn to automated scripting to accomplish this. I wrote a ssh and FTP based program which would stop an smx, delete the ${karaf.home}/data/cache/ directory, replace the new feature file with the one retrieved from the ftp operation, then restart the karaf container.
If you are open to looking into other possibilities:
You can look into Fuse Fabric which can link many smx Containers together and implement version increases and rollbacks. Currently I believe this would also need scripting to accomplish it automatically.
The third option is relatively new and comes in the form of Building docker images and deploying them via OpenShiftV3 which was just unveiled at the Redhat Summit 2015. Its worth noting its fairly new, but it does pack a very impressive feature set.

OS X Server - bot can't get source from repository

I had a previous version of OS X Server set up and running fine, but when I installed the upgrade to 3.2.1, I found that none of my bots would work correctly. These are the issues I get on each attempted integration:
Build Service Error Can't fit data in the buffer (-1).
Build Service Warning The source control operation failed because no working copy could be found.
Build Service Warning An error occurred updating existing checkout. Falling back to a clean checkout..
I may be looking in the wrong place, but I think the errors mean that I can't connect to my Git repository. This was partially confirmed when I deleted my repository from Xcode and ran the bot again and got the same errors. (I have since re-added the repository in Xcode and performed a Check Out to test it, so am pretty certain I have all the connection details right.)
With the previous version of OS X Server, I'm sure I'd connected to the repository directly from the server, as explained in Help > Server Tutorials > Automate Xcode builds:
Step 3. Give Xcode service access to the git repository
Xcode service bots access projects and code from your source git repository.
Click Repositories, then click the Add button (+). Choose Connect to a Git Repository from the New Repository pop-up menu.
But in the latest version, when you click the Add button you just get the option to create a new repository, rather than connect to an existing one. And the instructions on the web (now) say:
Connect to Remote Repositories
If you have projects in Git or Subversion repositories on remote servers, you can store your credentials for them on your development Mac in the Accounts preferences in Xcode. Then, when you need to access the repositories, you won’t have to reenter your credentials every time.
To add a remote repository’s credentials to a development Mac
For Xcode Server to perform integrations on your projects, it must also have access to their source code repositories. Configure Xcode Server to connect to your remote repositories.
Choose Xcode > Preferences on your development Mac.
Click Accounts in the toolbar.
Click the Add button (+), and choose Add Repository.
In the text field, enter the URL for the repository (for example, svn+ssh://svn.example.com/ProjectName or https://example.com/git/repository.git), and click the Next button.
Enter your user name and password in the Repository pane of Accounts preferences.
which is a bit vague, but seems to suggest that now OS X Server uses repositories that are set up in Xcode's preferences.
Anyway, now my OS X Server can't seem to access the repository. Am I missing something here?
Thanks
UPDATE:
I've come back to this problem after a month of pretending it didn't exist, and have made the following findings:
-The problem occurs with OS X Server 3.2.1, OS X Server 3.2.2 and OS X Server 4.0, on two different machines.
-The problem occurs when the repo is on a server running Gitblit, but not for remote Bitbucket repos, or for a Git repo hosted within a local OS X Server.
-The problem only occurs for larger repos.
I've solved this problem in the most convoluted way imaginable!
When OS X Server connects to the repository to download the source, it uses the Xcode library. Xcode uses libgit2 to do the downloading which had a known bug which caused the buffer error. It was fixed in v0.21.2, but the latest Xcode (6.1.1) only uses v0.21. That previous Xcode version only used v0.20, so hopefully a future Xcode release will use v0.21.2+ in which case this fix shouldn't be necessary.
Anyway, the solution for Xcode 6.1.1 was to:
Download and unzip the version of gitlib used by Xcode from here: https://github.com/libgit2/libgit2/releases/tag/v0.21.0
Make the changes to src/transports/http.c as detailed here: https://github.com/libgit2/libgit2/commit/7d729d0bfd897e8685099b160b6dbfd7f4ebd588
Save the http.c file
Build your edited version of gitlib2 using the instructions here, i.e:
Download CMake
Run the following commands in Terminal after navigating to your unzipped libgit2-0.21.0 folder:
$ mkdir build && cd build
$ cmake ..
$ cmake --build .
In Finder on your server, go to the Applications folder, right-click on Xcode and select "Show Package Contents". Go to the Contents/Developer/usr/lib folder and rename the 'libgit2.dylib' file to 'libgit2.dylibold' or similar.
Take the newly created 'libgit2.0.21.0.dylib' file from the libgit2-0.21.0/build folder, rename it to 'libgit2.dylib' and copy it into the /Applications/Xcode/Contents/Developer/usr/lib folder on your server.
Restart OS X Server, and integrate your bot again from Xcode.
The remote repository will be added when you create a bot. You don't have to add repository in OSX server.

Resources