I started to set up the new Xcode service in Mavericks. I created a new bot - but I wasn't asked for the branch it should build?
How can I select the branch for each bot? I do not only want to build master, but different branches too.
In the current version, when you create the bot in Xcode, it will be linked to the currently active branch. You can easily verify (but not change) it from the web interface, when you navigate to the bot -> Bot settings (when you click the cog wheel in the upper right).
Alternatively you can create the bot via the web interface where you can specify the branch name plain-text.
Assuming you want to change it whenever you want and not recreate bots each time, you can use the script: (pre-trigger)
cd "$XCS_SOURCE_DIR/<repo name here>"
git checkout development
Just change it to whatever branch you want and whatever repo you want. (you can look in the pre trigger logs to see if you mess up the change directory, ie if you misspel the repo name or whatever else. Good luck!
Create a bot for each branch you are interested in testing.
You can create as many bots as you want. Each one will check out whatever branch you specify, and run per the schedule you set individually.
It seems like this is now possible (in Xcode 7.1). However, you only get the option your project actually has more than one branch (makes sense).
Related
I have created a repo. on bitbucket. Now I want to connect that repo to the Xcode 9.So I can directly push, pull and do all the git stuff from Xcode.
is there any way to do that?
thanks!!!
If the project folder is already on your computer, and is already under git control, skip this first step. Otherwise, use the command line, or Xcode's Source Control > Clone dialog, to clone your bitbucket repo onto your computer.
Open the project in Xcode and work with it.
There is no step 3! Xcode will see that this repo is under git control and you'll be able to use Xcode's built-in source control features as usual.
I just spent an hour cajoling Xcode 9.2 into using a new Bitbucket git repo as a new remote. I had trouble adding a new remote using the Bitbucket SSH URL since Xcode assumed my user name is "git" and did not allow me to edit it. Here are some tips in hopes it saves you some time and aggravation. This assumes you are already using Xcode's source control and have made commits locally on your Mac. Make sure your commits are up to date before going through this procedure.
Create a new empty git repo on Bitbucket. Do not create a readme at this point, as this would make your new repo not... empty.
Use the HTTPS address to access your Bitbucket repo from Xcode. Problem is, for an empty repo, Bitbucket does not make it easy to figure out what this address is. For me, it was the same URL Bitbucket shows for SSH access but replacing "git#bitbucket.org:" with "https://user#bitbucket.org/", with user#bitbucket.org (hopefully obviously) YOUR username.
In Xcode, open the Source Control Navigator. This is the second icon from the left in Xcode's left panel next to the folder icon, it looks like a square with an x and a circle in the middle. Right click "Remotes" and select "Add Existing Remote...". Under "Remote Name" enter "origin" or "Bitbucket" or whatever floats your boat and under location enter the https:// URL from step 2.
Now, hooray, in Xcode you can do Source Control->Push successfully.
Thank goodness Apple does all my thinking for me, it saves me from hurting my little brain. Now my only brain trauma is from banging my head against the wall dealing with this kind of nonsense.
You can actually add real Github* account to your Xcode under Xcode/Preferences/Accounts.
This will actually do authentication when you checkout Bitbucket project after that. I guess that they joined user databases.
I had exactly the same problem as You had. To solve it I created a project with a git version control within Xcode 9 and then someone asked me to share it. To do it I created an empty repo on bitbucket, copied its address and then went in terminal to my project's directory.
cd ~/repos/<repo_name>
Once there you just have to write
git push --mirror *copiedRepoAddress
Make sure that the repository you created at bitbucket is EMPTY and that you have commited all changes on your local repo.
Just follow below steps your project will be added automatically to bitbucket.
1.Go to Source Controller ---> create git repository
once click on create option.
2.Open your Bitbucket account and create new repository.And choose i have an existing project.
3.Select your repository address.
I maintain our build process on our TFS 2012 system.
Up till now I've been making changes locally to a solution that generates our custom activity DLLs. These DLLs are checked into TFS and are used by the build controllers and agents for the custom activities in our custom build template.
For all of my code and workflow activities I have a unit test library that I can locally run to put in some base test values. While this gives me a good idea at how my custom tasks will run it is not optimal.
What I would like to be able to do is run the entire build definition. Is there a way to test the whole build process locally so that I can be sure that my changes to the workflow are acceptable before checking in and kicking off a build? Right now my builds take between 30 and 40 minutes to complete and I would like to be able to start, monitor, debug, and stop the build locally without occupying one of our agents.
Edit
Another method for me to solve this problem is to come up with some manner to execute the workflow that is the build template locally. Has anyone been able to do this?
Take a look at the Ranger Build Customization Guidance. There is a HOL for doing a lot of this. It doesn't look like it is in v2 so take a look at v1.2.
http://vsarbuildguide.codeplex.com/releases/view/87995
If I am understanding the issue correctly, one way to do this may be:
Install a build agent locally and register it with the TFS Build Controller.
Give the new agent a custom tag so it doesn't get assigned other builds from the queue
Shelve your changeset
In VS, right click the build definition you want, and select queue new build. A "Queue Build" window will open
Under the general tab, "What do you want to build", select your shelveset.
Under Parameters tab ->Advanced -> agent settings, enter your agent's tag.
Click queue.
I accomplish this using a modified version of #malexander recommendation.
Create a code branch in TFS, commit your changes there, especially the changes to your custom activity DLL's (compiled binaries, not just source).
Install a TFS Build Controller and Build Agent locally, registering the controller with your TFS server.
Configure your new local controller to use your modified custom activity DLL's, stored in your new TFS code branch. Team Explorer > Builds > Actions > Manage Build Controllers >
(select your new local controller) > Properties > Version control
path to custom assemblies
4.
Queue a new build, from an existing TFS build definition: change its controller to use your new local controller.
The new build will execute on your local controller/agent, using your modified custom activity DLL's, without interfering/restarting your production agents.
Also: since you're in your own code branch, you can commit debug versions of your custom activity DLL's, without impacting your production agents.
I'm trying to get Continuous Integration setup in Mavericks using OS X Server for Mavericks.
I have the Server installed and my source code is in a local directory using Git from assembla. I'm following the Apple Xcode Continuous Integration Guide, and I'm at the part where I'm adding a bot to the product in Xcode.
I'm getting the error:
Creating a bot requires a project that is under source control. This project appears to be in a local git repository. To be able to create a bot, the project must be in an repository the server can access so it can clone it. [cancel] [Configure Remotes...]
Clicking either cancel or configure remotes brings up the configure for my folder and I see my remote added just fine. I also tried adding the remote repository again with a different name.
How do I move forward?
It seems like this issue happens when there isn't a remote named "origin", as that's what Xcode is looking for. When I renamed my remote to origin (in <ProjectRoot>/.git/config), Xcode stopped complaining and let me add a bot through the Xcode UI.
This is hacky, but worked.
In Xcode I clicked the Source Control menu then checkout. I checked out my repository to a new folder and I was able to create my bot.
It seems adding the repository from the command line caused things to not look correctly configured to Xcode.
After numerous trials I did the following steps to get the whole process to work:
Connect a device to the server. Make sure it is active.
Set up the server and ensure that the XCode service is active.
Create a new project with a local GIT.
In the Source Control menu, select Configure, and under Remotes select to Create New Remote.
Go to Manage Schemes and check the Shared check box.
Commit the project and select Push to master.
Go to the developer site and create an developer and Ad-Hoc profile.
Go to the Xcode settings and reload the profiles for the team / developer.
Configure this profile in the app build settings.
Select to create a bot with CI to run on commit.
The next time you commit this should run the bot etc.
I had the same issue when I tried to edit a bot that I created before. In my case the problem was that I created the bot for the master branch, but when I tried to edit it, I had checked out a different branch. After switching back to master I was able to successfully edit my bots.
Tried most of the things here. None worked for me. Got this error
Creating a bot requires a project that is under source control..
But when I proceeded with the popup it said
All projects are in workspace (something similar).
I did the below
Removed .git folder
git init
git remote add origin <repo.git>
git pull origin <branch_name>
removed the conflicting folders and files
git pull origin <branch_name>
Then when I clicked create bot from Products it worked.
I think I had the easiest time of all. I simply did an Xcode-based commit and push, then tried the bot again, and the nasty error was gone.
[In Xcode 6.4, this would crash the Xcode].
I have a question about git.I'm working in a project and i have 9 branches, the first branch name was make users system.
Today i want to add an avatar to my users but i don't know what is the step to do with git.
Should i create a new branch ?
git checkout -b add-more-details-to-users
Or just switch to my first branch make users system then add changes ?
thank for helps
It all depends on your workflow. If you're working in a team, most of the times when implementing a new feature it's better to create a new branch, test it and merge with the master. It's not a good practice to put too much code and implemented features in one branch since it increases the possibility of breaking up some other functionality.
Also I would suggest you to make your branch names more descriptive, like: add-avatar-to-user , not make-users-system and if you're using any project management tools, task/story id like so: add-avatar-to-user-12345
Take a look at this link, I like this kind of workflow, we are currently using it in our team:
http://scottchacon.com/2011/08/31/github-flow.html
Since it sounds like make users system is like your master branch, you should checkout a new branch from it, which is called a feature branch, add the changes and, when you're happy the changes and everything works, merge it back.
You should really read up on some articles on how to keep your branches organized
http://nvie.com/posts/a-successful-git-branching-model/
Simply as titled, I can't create Branches/Trunks/Tags for SVN although I am able to connect to the repo. In the screen where I enter the Trunks, Branches and so, it can't connect to them (showing red indicator). What am I doing wrong?
Go to Source Control->Project Name->COnfigure
Over there, select configuration and update the paths of trunk,
tags and branches.
Now along with info and configuration, you'll get branches option as well/
From there add a new branch and an auto switch to that branch will happen.