TeamCity 6.x and Mercurial via SSH (on Windows) - ssh

I'm trying to reconfigure our TeamCity build server (running on WIN 2008) and switch from SVN to Mercurial repository.
I use the following link as Configuring Mercurial (Hg) with TeamCity over SSH at RepositoryHosting.
I spent several days and still can't get it work.
I can reach the Mercurial repository from TeamCity (via Test Connect) and I can pull code from Mercurial via TrotoiseHG, but the build fails every time because TeamCity cannot pull source code from the server.
Does anybody had the same issue?

Have you tried using Agent-Side checkout instead of the default? Otherwise, TeamCity tries to "intelligently" detect changes and distribute them to build nodes. Failure can occur whenever something happens in the VCS that TeamCity doesn't understand how to replicate, such as using subrepos.

Related

GitLab CI / CD: do I need docker for ASP.NET Core - Angular application

I am having self-hosted GitLab-EE. I want to enable CI / CD. I already have gitlab-runner on windows and it is activated for my project.
I also have custom server for hosting my ASP.NET Core 2.0 with Angular 5.0 application.
My final idea is when commit is made to GitLab, build and deploy (to custom server) is executed. Deploy path would be different if commit to master was made or any other branch (from merge request) conditional by Git Tag.
Almost all tutorials use docker, but I couldn't found why? What are the cons using docker?
I thought I only need msbuild (I can also install Visual Studio) on machine where GitLab-runner is running. It would build and deploy application. I found this configuration file which doesn't use docker, but question remains. Do I need docker and why?
A docker image would contain all the msbuild dependencies and build tools needed to build your application with out you going through the trouble of manually installing them on your server.
So basically docker helps you to manage dependencies of you application more efficiently.

Cannot connect Intellij Ultimate 2016.2 to GIT using PKI

So, I have been trying on and off to get IntelliJ IDEA Ultimate to connect to our GitLab and JIRA server but both require the use of PKI and I cannot figure out how to get this to work. When attempting to use the VCS menu option for Git to pull or interact with Git, I get Git Pull Failed fata: Could not read from remote repository. If I am using the terminal screen within IntelliJ it works just fine after I enter my passphrase for the cert.
Now note that I am on a Windows system.
A colleague next to me has IntelliJ same version running on a Linux system and he is able to use the Git VCS menu features.
Anybody know how to get Windows to work properly with IntelliJ to Git and or JIRA?
Make sure you have the .ssh/config file in your user home that specified the key to use, by their full path. Then make sure you have Built-in SSH executable selected in Settings - Version control - Git
Workaround - use Native SSH executable and ssh-agent. A similar setup described here

How to configure TeamCity to run last successful build on failure?

We're currently using TeamCity Enterprise 9.0 for our continuous deployment process; so please imagine the following scenario, you deploy your latest code to the dev branch, but one of the nugget packages was removed from the source and the build fails, QA team comes in at night and finds the build is broken and the environment is down for testing.
So I was wondering if there is a way to configure TeamCity to automatically run the last successful build in case the current code version fails, like configure it to make it aware that the current branch is broken and thus go back to a previous stable state.
Thanks,
The recommended approach is to have a separate build configuration for Deployment task. In this case you will be able to configure artifact dependency with option get artifacts from "Latest successful build".
Also see how to set up deployment with TeamCity.

Copy artifact in Artifactory to a remote repository

I have the following setup:
Development server for continuous build with Hudson, Maven and Artifactory up and running.
I am able to build an artifact by Maven, and let Hudson deploy it to Artifactory.
However, I would like to do the following:
Select an artifact in Artifactory on the local build server.
Deploy that artifact to a remote repository without doing a new build.
The reason I want to do that is, that the first server is a development server where new artifacts are changed at will. The other server / repository is the public visible server for all artefacts of the company.
I know that I am able to create a second build job, but that would be a duplication, and Hudson is only able to manage one Artifactory repository at one time. I could deploy that artifact by hand to a different URL, but this is error prune and I need a login on the build server and have to use the shell to do that.
Has anyone an idea how to finally reach the goal?
If I understood your question correctly it looks like a good scenario for User Plugin. It should be straightforward, you select the needed artifacts using the searches object, and then execute REST PUT call to put them on the remote server.
The Maven Stage plugin seems to support this case: http://maven.apache.org/plugins/maven-stage-plugin/usage.html
but I'm not sure if it works correctly. I'm working on it currently, so if it doesn't work perhapse I will find time to correct it.

GRAILS plugin error

All,
I am trying to test my grails app using Hudson. I have in grails I will run the command of test-app -unit and will recieve the following message:
Running script /home/test/grails-1.1.1/scripts/TestApp.groovy
Environment set to test
Plugin [hibernate-1.1.1] not
installed, resolving..
Reading remote plugin list ...
Error reading remote plugin list
[Connection timed out], building
locally...
Unable to list plugins, please check
you have a valid internet connection:
Connection timed out
Reading remote plugin list ... Error
reading remote plugin list [Connection
timed out], building locally...
Unable to list plugins, please check
you have a valid internet connection:
Connection timed out
Plugin 'hibernate' was not found in
repository. If it is not stored in a
configured repository you will need to
install it manually. Type 'grails
list-plugins' to find out what plugins
are available. Finished: FAILURE
I believe the reason for this is that I do not have access to an external network on the server. If I do a list-plugins there is no returns it just times out.
I also beleive that this is a grails issue not a hudson issue.
The answer is the following:
navigate to the /path/to/hudson/Jobs/JOBNAME/
run - grails install-plugin /location/to/grails-1.1.1/plugins/grails-hibernate-1.1.1.zip
This will install the hibernate plugin for the specific job. This workaround can also be used for other plugins needed.
This has been tested in hudson.
Grails is going to need the Internet somehow to get plugin information. What you might be able to do is get Grails installed on a machine that does have access, get all of the plugins you need (i.e. by running what Hudson would normally run, test-app or whatever), and then copy over the entire grails installation to $GRAILS_HOME on your Hudson machine.
I can't say I've ever tried this, but it seems like it should work.