Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Get Git Source not getting from correct branch
-
Thank you for the report - we added some more logging in the latest Git (and GitHub) extensions, and likely fixed this (problem was local branches were not being created). Let me know if v5.6.1 of the Git extension resolves this.
-
Hello,
There was an update available (I did think they were all up to date), it's now at 5.6.1. However, I think that is worse, it's not picking up the production branch or the master branch. I only knew it was picking up the master branch before, as I'd put a file called master in it, same as production.
We have a few other branches, so I'm assuming it's one of those.This is the log from the job as it is running. Is there are more detailed log anywhere?
Getting source from 'http://gitlan/*****/*****2.git' on 'PRODUCTION' branch... Using LocalAgent agent on BUILDMASTER3 No executable path specified, using build-in git library... Using repository at 'C:\BuildMaster\_SVCTMP\GitWorkspaces\******2.git'... Finding local branch 'PRODUCTION'... Using local branch 'refs/heads/PRODUCTION'... Fetching commits from origin... Connecting as user 'buildmaster'... Using repository at 'C:\BuildMaster\_SVCTMP\GitWorkspaces\******2.git'... Archiving HEAD ('refs/heads/PRODUCTION', commit '7df0b2dcd6012138797d4fe5c0a4e8b8014b6419') to 'C:\BuildMaster\deploy\******'.... -
I would suggest manually deleting that workspace at
C:\BuildMaster\_SVCTMP\GitWorkspaces\******2.gitand trying again. There should not have been a local branch in that workspace if the extension was just upgraded (unless it were created in a previous execution after the extension was upgraded of course).After that, can you verify the files at the listed SHA commit match?
-
Hi,
Thanks for your help, that's all working now.
Regards,
David
-
Hi,
I've noticed that any new files we push to Git aren't be pulled. It seems to be because C:\BuildMaster_SVCTMP\GitWorkspaces\ subfolders aren't being cleared out.
So I put a line to delete the contents in the script and it worked.
Is that what this line should do: CleanWorkspace: true
Thanks,
David
-
You are correct,
CleanWorkspaceis supposed to delete that directory but apparently it is ignoring that value - we'll have a fix shortly in the next version.Regardless, new files should definitely come down without that setting. Note that by setting the
DiskPathproperty as the final destination for the files, existing files in that directory will not be deleted. To ensure your target directory matches exactly what is in the repo, try something like:Git-GetSource ( Credentials: GithubGitTest, Branch: master ); Transfer-Files ( Include: **, ToDirectory: c:\tmp\your-target-dir, DeleteTarget: true );Also worth noting is the
Credentialsproperty, if you go to Admin > Resource Credentials, you can create a Git Credential and put the username and password (and optionally repository URL) there so it's not directly in the script. -
Hello,
Thanks for the Credentials tip, that works fine.
New files do not come down unless the workspace directory is clear. I've made a little video to show you what I mean: My VideoAlso, the workspaces directory seems to be based on the Git repo name, so if I ran 2 plans at the same time for different branches, from the same Git repo, Buildmaster would put all the files in the same directory. Is that correct?
Thanks,
David
-
Thank you for the video, was able to reproduce it after that and resolve it in the latest version.
You are correct that the workspace would be the same. If they aren't run at the same time it's OK that they use the same workspace. For any Git operation you can specify your own
WorkspaceDiskPathif you know there could be conflicts. -
Hi Tod,
Thanks very much for the reply, I'll check it out in the new version :-)
Happy New Year!
David
-
Hi David,
I came across your post and noticed that you're experiencing an issue with Git source providers in BuildMaster. I understand that you're trying to use the "Get Git Source" command but can only get the source from the master branch.
Based on the command you provided, it looks like you have the syntax partially correct. However, it seems that the code is being picked up from the master branch instead of the production branch that you specified.
Have you tried specifying the branch name with the "refs/heads/" prefix? For example:
bash
Copy code
Branch: refs/heads/PRODUCTION
This may help in correctly identifying the production branch.Additionally, you mentioned that you have deleted the repo details from C:\BuildMaster_WEBTMP\SrcRepos, but are still facing the same issue. Have you tried clearing your Git credentials and re-entering them? It's possible that the issue may be related to authentication.
Plus I was researching on Elmedia Player for Mac, and As someone who's been using Elmedia Player for Mac for quite some time, I can definitely say that it's a great media player that offers a lot of useful features. One thing I particularly appreciate about Elmedia Player is its ability to play virtually any video or audio format that you throw at it.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login