Teamcity "git repository" error - github

After migrating a project from "subversion" to "githhub" successfully,
I am trying to build it by hitting "run" in "teamcity" but getting the following
error:
How can i solve it?

This is expecting to be inside an actual Git repository so it can generate the GitVersion correctly.
You'll need to install git on your build agents and ensure that code is checked out on the agent. Further information as to why this needs to be done can be found in the TeamCity Checkout Mode Documentation
Hope this helps

Related

How to show pipeline artifact in the artifacts section in Azure DevOps

Maybe there's a fundamental concept I don't understand but it seems to me that it should be obvious that an artifact published by a pipeline appears in the section called "ARTIFACTS" which is super-accessible directly from the main menu and hightlighted with its own magenta icon. But no... it doesn't. This baffles me. I like DevOps... everything else works so beautifully, why is this SO complicated to do? Anyway, sorry for venting.
Question : Is there any easy way to publish an artifact from a pipeline directly in the "Artifacts" section in Azure DevOps?
image-1 : Published pipeline artifact to artifact section
image-2 : What I was expecting in the publishing task
As of now I retreive the pipeline actifacts manually thru Memu > Pipelines > myPipeline > theDesiredRun > relatedItems > publishedItem > clicArtifactName > downloadWithBrowser. It's a working workaround but this procedure will be a pain to teach and document when onboarding new members in the team.
I googled it and it looks like you can acheive that by creating a feed, publishing to the feed, then subscribing to it. I didn't find any good guide to do it, I tried and failed :(
Is there an easier way to do it? Did I miss something obvious? Maybe I'm just not using the right task in the pipeline? If the only way is thru the feed thing, then does anybody knows a link to a clear explanation on how to do it?
Thank you
--mo
So, there are two forms of artifacts within Azure DevOps:
Build Artifacts: Artifacts that are built and published for consumption during releases.
Azure Artifacts: Maven, npm, NuGet, and Python package feeds from public and private sources. These are designed to be consumed within your applications as shared modules. If you're familiar with .NET / dotnetcore. This would be where you publish custom NuGet packages.
The "Artifacts" tab on the left-hand menu is explicitly for custom packages, not build artifacts. You'll never be able to publish build artifacts there.
After reading #MaxMorrow 's answer I now understand the Artifacts section in Azure DevOps is not designed for what I intended. But for those who are still looking to achieve what I was asking in my original question…
Here’s the workaround I put in place : Commit the build artifact to the repository.
I know it’s not an elegant solution but it fully answers my original requirements to make it easy to find and to download. It’s 1 click away from the main Repos menu in DevOps and it can also be downloaded by synchronising that repository folder on any machine and by any team member, as needed. (git)
HOW TO:
First, a task in the build pipeline writes the artifacts in
$(Build.SourcesDirectory)\BuildArtifacts\myBuildArtifact_run$(Build.BuildNumber).zip
Then the next task is a command line script to commit to repos :
echo This is the current working direcotry : %cd%
echo get worktree list
git worktree list
echo commit all changes
git config user.email "joe#contoso.com"
git config user.name "Automatic Build"
git checkout master
git add --all
git commit -m "pipeline : $(Build.DefinitionName)"
echo push code to repo
git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin master
Finally, you’ll find the committed artifact in your repository, under
root > BuildArtifacts
Voilà !

VSTS\Azure-DevOps: Enabling Continuous Integration on pipeline with source from Bitbucket fails with error

Regards,
Your help will be appreciated.
I have created a pipeline in VSTS\Azure-DevOps. It gets its sources from a repository in Bitbucket. Queueing a build works fine. It builds and the tests succeed.
Now I want a build to run on every commit to the repository on Bitbucket. However, when I edit the pipeline and in the Triggers tab enable 'Continuous Integration' and click 'Save' I get the following error:
Unable to configure a service on the selected Bitbucket repository. Bitbucket returned the error 'Forbidden: '.
I am confused that I get 'Forbidden', while getting the source-code already works.
What is it that I am doing wrong? Is there something I must configure in VSTS\Azure-DevOps or in Bitbucket?
Answering my own question:
It appeared that in Bitbucket I only had the rights of 'Writer' for the Repository. When we changed it to 'Administrator' enabling Continuous Integration worked and we verified that committing a code change triggered the build.
Good news / bad news.
It looks like - for now - you can configure a pipeline without being a BitBucket admin on the repo... but not using the templates.
So you can build an empty pipeline based on a BitBucket repo (no admin access), and manually add each of the tasks.
Based on further tests: what you cannot do is set the Continuous Integration trigger, because that requires admin access to set up the webhooks
I know, this is not what you want... but at least there is a way to end up with a working pipeline.
Regards,
Jose

JFrog CLI is giving me a "Wrong number of arguments" error using the Artifactory Maven build step in Azure DevOps (VSTS)

I'm new to Azure DevOps (VSTS) and I'm attempting to set up a new Pipeline build using the Artifactory Maven build step. When running the build I get the following error:
2018-09-12T20:59:02.0861829Z ##[error]Error: Command failed: D:\a_jfrog\1.19.1\jfrog.exe rt mvn "install -f D:\a\1\s\pom.xml" D:\a\1\s\config --build-name="SomeProject-Maven-CI" --build-number="20180912.6"
2018-09-12T20:59:02.0988256Z [Error] Wrong number of arguments. You can read the documentation at https://www.jfrog.com/confluence/display/CLI/JFrog+CLI
I found this info on GitHub: https://github.com/jfrog/jfrog-cli-go/issues/165
Its a similar error but not quite the same. I'm not sure how to edit the command that Azure Pipeline is running or even if I can.
I figured out my issue. I had a space included in my build name and it apparently the JFrog Cli didn't like that. When I removed the space the error went away. Other errors came up but that's off-topic from this question.
Can you please report the errors your encountered in Artifactory VSTS extension's GitHub repository?
We'll really appreciate it.
Update: A pull request opened to target this issue. You can track it here.
Update 2: Fixed in latest release 1.4.0.

C# travis build fails because nuget packages cannot be found

I am having trouble running a build on travis. On our local jenkins machine everything is fine. The travis build fails with the following state
Unable to find version '4.8.0.770-beta' of package 'Lucene.Net'.
The solution folder contains a nuget.config file that specifies multiple nuget feeds. My guess is that something is going wrong there. I could use some help.
The project is on GitHub at https://github.com/RHEAGROUP/docupanel

sonar+github integration

I want to enable sonar with git but is it neccesary that first pull the project from git repository using hudson or something else and then sonar will analyse the code periodically on hudson .am I right means my steps :
1.Pull project from git using hudson.
2.Sonar on hudson will analyse the code and send the updates.?
or directly we can use git+sonar how it works ,can anybody guide me to get it work.
Yes, you need first to pull your project from GitHub, and then launch a Sonar analysis on your local copy (Sonar needs the file to exist on the file system to be able to analyse them).
So you can pull your project manually or obvioulsy using a CI server like Jenkins/Hudson.
The good news, yesterday (2015-07-08) SonarQube has launched a Github Pluging, every time a pull request is submitted, the CI system launches a SonarQube preview analysis.
Reference:
http://www.sonarqube.org/github-pull-request-analysis-helps-fix-the-leak/