question
stringlengths
11
28.2k
answer
stringlengths
26
27.7k
tag
stringclasses
130 values
question_id
int64
935
78.4M
score
int64
10
5.49k
I have a problem running a gradle build on Jenkins: Gradle version is https://services.gradle.org/distributions/gradle-2.14.1-bin.zip FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'myApp'. > Could not resolve all dependencies for configuration ':classpath'. ...
As the error tells you Nome o servizio sconosciuto, repo1.maven.org cannot be resolved via DNS. So you have some networking problem or you need to use a proxy server which you did not configure for Gradle. Ask your IT support as to why you cannot resolve the hostname.
Jenkins
41,979,802
45
Here is my current Jenkins setup for a project: one job runs all development branches one job runs all pull requests one job runs only the master branch one job makes the automated release only when master passes This setup allows me to have continuous automated delivery as well as constant feedback during developme...
You can choose "Inverse" strategy for targeting branches to build. Check out Jenkins job configuration, "Source Code Management" section (choose "Git") Additional Behaviours click "Add" button choose "Strategy for choosing what to build" select "Inverse" strategy in combo box. (Don't forget to fill in "Branches to bu...
Jenkins
21,314,632
45
Where do the environment variables under Jenkins ( manage jenkins -> system information ) come from? I checked /etc/init.d/tomcat5, /usr/bin/dtomcat5, /usr/bin/tomcat5, /etc/sysconfig/tomcat5 and /etc/profile but do not see any such variables there specially the ones related to Oracle (Base, Home, Ld_lib, path, etc.). ...
The environment variables displayed in Jenkins (Manage Jenkins -> System information) are inherited from the system (i.e. inherited environment variables) If you run env command in a shell you should see the same environment variables as Jenkins shows. These variables are either set by the shell/system or by you in ~/....
Jenkins
21,130,931
45
I'm using Jenkins to execute daily tasks with my projects, but every execution, Jenkins stores a 20MB dir in PROJECT_HOME/builds, so after a lot of executions, the space in the disk of every project is huge (10GB for some Jenkins tasks). It isn't very important for me to store the result of the previous executions, so ...
If you go into the project's configuration page, you will find a checkbox labeled "Discard Old Builds". Enabling this allows you to specify both the number of days to retain builds for and the maximum number of builds to keep.
Jenkins
7,994,379
45
I have already added 2 secret files to Jenkins credentials with names PRIVATE-KEY and PUBLIC-KEY. How can I copy those 2 files to /src/resources directory inside a job? I have the following snippet withCredentials([file(credentialsId: 'PRIVATE_KEY', variable: 'my-private-key'), file(credentialsId: 'PU...
Ok, I think I managed to do it. my-private-key variable is a path to the secret, so I had to copy that secret to the destination I needed. withCredentials([file(credentialsId: 'PRIVATE_KEY', variable: 'my-private-key'), file(credentialsId: 'PUBLIC_KEY', variable: 'my-public-key')]) { sh "cp \$my-pub...
Jenkins
49,460,520
44
I seem unable to create a Jenkins Pipeline job that builds a specific branch, where that branch is a build parameter. Here's some configuration screenshots: (i've tried with a Git Parameter and a String Parameter, same outcome) (I've tried $BRANCH_NAME_PARAM, ${BRANCH_NAME_PARAM} and ${env.BRANCH_NAME_PARAM}, same ou...
https://issues.jenkins-ci.org/plugins/servlet/mobile#issue/JENKINS-28447 Appears that its something to do with a lightweight checkout. if i deselect this option in my config, my parameter variables are resolved
Jenkins
47,565,933
44
I'm trying to get a declarative pipeline that looks like this: pipeline { environment { ENV1 = 'default' ENV2 = 'default also' } } The catch is, I'd like to be able to override the values of ENV1 or ENV2 based on an arbitrary condition. My current need is just to base it off the branch but I co...
Maybe you can try Groovy's ternary-operator: pipeline { agent any environment { ENV_NAME = "${env.BRANCH_NAME == "develop" ? "staging" : "production"}" } } or extract the conditional to a function: pipeline { agent any environment { ENV_NAME = getEnvName(env.BRANCH_NAME)...
Jenkins
44,007,034
44
I have a pipeline groovy script in Jenkins v2.19. Also I have a "Slack Notification Plugin" v2.0.1 and "Groovy Postbuild Plugin" installed. I can successfully send "build started" and "build finished" messages. When a build fails, how can I send the "Build failed" message to a Slack channel?
You could do something like this and use a try catch block. Here is some example Code: node { try { notifyBuild('STARTED') stage('Prepare code') { echo 'do checkout stuff' } stage('Testing') { echo 'Testing' echo 'Testing - publish coverage resul...
Jenkins
39,140,191
44
After going through the pipeline and Jenkinsfile documentation, I am a bit confused on how to create a Stage -> Production pipeline. One way is to use the input step like node() { stage 'Build to Stage' sh '# ...' input 'Deploy to Production' stage 'Build to Production' sh '# ...' } This seems a bit clunky,...
EDIT (Oct 2016): Please see my other answer "Use milestone and lock" below, which includes recently introduced features. Use timeout Step As first option, you can wrap your sh step into a timeout step. node() { stage 'Build to Stage' { sh '# ...' } stage 'Promotion' { timeout(time: 1, unit: 'HOURS') { ...
Jenkins
37,831,386
44
A strange thing happen sometime, Jenkins start displaying " Jenkins is going to shut down" even when nobody turned this message on and restarting Jenkins. Screenshot:
I have a plug in "Thin backup" which was configured to shut down after back up. Changed this setting and it is working fine now. It's bit tricky to find it because this plug in is not under configure system, its under manage jenkins. You can easily miss it. As mentioned by Florian below the ThinBackup setting in questi...
Jenkins
26,218,018
44
How can I delete a build from the Jenkins GUI? I know that I can delete the directory from the 'jobs' folder, but I want to do it from the GUI. Is it also possible to delete multiple builds?
If you go into the build you want to delete and if you have the permissions to delete, then you will see on the upper right corner a button "Delete this build".
Jenkins
7,995,079
44
Is there any way to import the changelog that is generated by Jenkins to the subject of an email (either through the default email, or the email-ext plugin)? I am new to Jenkins configuration, so I apologize if this is a simple issue, but I was not able to find anything on the email-ext documentation.
I configured my Email-ext plug-in to use the CHANGES Token (official documentation here): Changes: ${CHANGES, showPaths=true, format="%a: %r %p \n--\"%m\"", pathFormat="\n\t- %p"} That prints the following in my build notifications: Changes: Username: 123 - Project/Filename1.m - Project/Filename2.m -- "My ...
Jenkins
7,773,010
44
I'm trying to deploy my working Windows 10 Spring-Boot/React app on Ubuntu 18.04 but keep getting "react-scripts: Permission denied" error despite numerous attempts to fix. Hopefully one of you react experts can spot what I'm doing wrong. My package.json looks like this { "name": "medaverter-front", "version": "0.1...
Solution 1: I think you have react-script globally installed. so try this command npm install react-scripts --save and then run the application again. Solution 2: try this command sudo chmod +x node_modules/.bin/react-scripts and then run the application again. Solution 3; I think your npm not have permission. you ca...
Jenkins
62,140,265
43
I have a declarative pipeline script for my multibranch project in which I would like to read a text file and store the result as a string variable to be accessed by a later step in the pipeline. Using the snippet generator I tried to do something like this: filename = readFile 'output.txt' For which filename would be...
The error is due to that you're only allowed to use pipeline steps inside the steps directive. One workaround that I know is to use the script step and wrap arbitrary pipeline script inside of it and save the result in the environment variable so that it can be used later. So in your case: pipeline { agent any ...
Jenkins
42,540,148
43
Absolute Jenkins pipeline/groovy noob here, I have a stage stage('Building and Deploying'){ def build = new Build() build.deploy() } which is using the shared lib, the source of the Build.groovy is here: def deploy(branch='master', repo='xxx'){ if (env.BRANCH_NAME.trim() == branch) { def script = l...
The sh step returns the same status code that your actual sh command (your script in this case) returns. From sh documentation : Normally, a script which exits with a nonzero status code will cause the step to fail with an exception. You have to make sure that your script returns a nonzero status code when it fails. ...
Jenkins
42,428,871
43
I want to update submodule on git clone. Is there a way to do this with Jenkins pipeline Git command? Currently I'm doing this... git branch: 'master', credentialsId: 'bitbucket', url: 'ssh://bitbucket.org/hello.git' It doesn't however update submodule once cloned
The git command as a pipeline step is rather limited as it provides a default implementation of the more complex checkout command. For more advanced configuration, you should use checkout command, for which you can pass a whole lot of parameters, including the desired submodules configuration. What you want to use is p...
Jenkins
42,290,133
43
I can't seem to figure out how to use the basic archive artifacts statement. What I want is to archive an entire subtree but naming it doesn't seem to work. Nor does directory/** nor directory/**/ I've read the ant doc but it doesn't make much sense to me. How do I specify a subtree? Or... where can I find a meaningfu...
Directory/**/*.* -> All the files recursively under Directory **/*.* -> all the files in the workspace **/*.xml -> all xml files in your workspace. Directory/**/*.xml -> All the xml files recursively under Directory
Jenkins
40,597,655
43
I am using @NonCPS in front of my Jenkinsfile function which performs a regex match and i'm still getting java.io.NotSerializableException java.util.regex.Matcher error even with the @NonCPS annotation. Note, it calls the function many times and the exception only occurs once a match is actually made. Here is my code: ...
Jenkins require all variables to be serializable because the state of the pipeline is periodically saved to disk in case of interrupts like a server restarts. This feature allows pipelines to maintain their state and continue even after the server is restarted. Variables of type Matcher are not serializable and require...
Jenkins
40,454,558
43
When building a Jenkins pipeline job (Jenkins ver. 2.7.4), I get this warning: Using the ‘stage’ step without a block argument is deprecated How do I fix it? Pipeline script snippet: stage 'Workspace Cleanup' deleteDir()
From Jenkins pipeline stage step doc: An older, deprecated mode of this step did not take a block argument... In order to remove the warning just add a block argument: stage('Stage Name') { // some block } You can also generate a stage step using Snippet Generator.
Jenkins
39,445,488
43
I am trying to create a job where I have to select multiple values for one parameter. env: dev1, dev2, qa1, qa2 etc I want to be able to select dev1 & dev2 to update certain values. Is there a way/plugin for Jenkins to handle it?
Extended Choice Parameter plugin is the way to go for such requirement. You need to select Extended Choice Parameter from the drop-down list as shown below: In Name text-box, assign a name. For example, Environment. This is the name with which you will be accessing all the values (dev1,dev2,...) that you will select w...
Jenkins
26,006,265
43
Are Jenkins parameters case-sensitive? I have a parametrized build which needs an ant parameter named "build_parameter" to be set before the build. When I try to access the ${BUILD_NUMBER} set by Jenkins, I get the value set for the ant parameter. If the build parameters are not case sensitive, can anyone suggest me a ...
To Answer your first question, Jenkins variables are case sensitive. However, if you are writing a windows batch script, they are case insensitive, because Windows doesn't care about the case. Since you are not very clear about your setup, let's make the assumption that you are using an ant build step to fire up your a...
Jenkins
19,179,447
43
How to change Jenkins default folder on Windows where Jenkins runs as Windows service. I want to change C:\Users\Coola\.jenkins folder to d:\Jenkins due to lack of space on C: partition (Every build takes ~10MB of free space). I don't want to reinstall Jenkins as Windows service. I just want to change folder of existi...
Stop Jenkins service Move C:\Users\Coola\.jenkins folder to d:\Jenkins Using regedit, change HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Jenkins\ImagePath to "d:\Jenkins\jenkins.exe" Start service
Jenkins
12,689,139
43
I am setting up a new server to run Jenkins. I have an existing Jenkins server with jobs in place. Now, I want to copy the jobs over from the old instance to the new instance. On the new instance I am at the New Job screen. I notice that there is a "copy existing job" option. When I put in the path to the job on th...
According to the manual, https://wiki.jenkins-ci.org/display/JENKINS/Administering+Jenkins, it's simply to move the corresponding job directory to the new Jenkins instance. The "Copy existing Job" option requires the job to exist on the current Jenkins instance. It's an option to use the existing job as a template. It ...
Jenkins
9,038,748
43
I've stored username and password as credentials in jenkins. Now I would like to use them in my Jenkinsfile. I am using withCredentials DSL, however, I'm not sure how to get the username password as separate variables so I can use them in my command. This is what I'm doing: withCredentials([usernameColonPassword(cred...
Here is a tiny bit simpler version of StephenKing's answer withCredentials([usernamePassword(credentialsId: 'mycreds', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { sh 'cf login some.awesome.url -u $USERNAME -p $PASSWORD' }
Jenkins
43,026,637
42
I'd like to leverage the existing Mailer plugin from Jenkins within a Jenkinsfile that defines a pipeline build job. Given the following simple failure script I would expect an email on every build. stage 'Test' node { try { sh 'exit 1' } finally { step([$class: 'Mailer', notifyEveryUnstableBui...
In Pipeline failed sh doesn't immediately set the currentBuild.result to FAILURE whereas its initial value is null. Hence, build steps that rely on the build status like Mailer might work seemingly incorrect. You can check it by adding a debug print: stage 'Test' node { try { sh 'exit 1' } finally { ...
Jenkins
37,169,100
42
I am trying to do continuous integration with Hudson and MSTest. When I try to run this job I get the following error: 1 Warnung(en) 0 Fehler Verstrichene Zeit 00:00:00.13 [workspace] $ sh -xe C:\Windows\TEMP\hudson4419897732634199534.sh The system cannot find the file specified FATAL: Befehlsausführung fehlgeschl...
This happens if you have specified your Windows command as "Execute shell" rather than "Execute Windows batch command".
Jenkins
15,135,771
42
This is my composer.json file: "require": { "php": ">=5.4", "zendframework/zendframework": "2.*", "doctrine/doctrine-module": "dev-master", "doctrine/doctrine-orm-module": "0.*", "gedmo/doctrine-extensions": "dev-master" }, "require-dev": { "phpunit/phpunit": "3.7.*" }, "scripts": { "post-up...
To do the non-development environment update without triggering any scripts, use the --no-scripts command line switch for the update command: php composer.phar update --no-scripts ^^^^^^^^^^^^ By default, Composer scripts are only executed1 in the base package2. So you could have one package f...
Jenkins
13,087,088
42
I have a parameterized job that uses the Perforce plugin and would like to retrieve the build parameters/properties as well as the p4.change property that's set by the Perforce plugin. How do I retrieve these properties with the Jenkins Groovy API?
Update: Jenkins 2.x solution: With Jenkins 2 pipeline dsl, you can directly access any parameter with the trivial syntax based on the params (Map) built-in: echo " FOOBAR value: ${params.'FOOBAR'}" The returned value will be a String or a boolean depending on the Parameter type itself. The syntax is the same for script...
Jenkins
10,882,515
42
Jenkins requires a certificate to use the ssh publication and ssh commands. It can be configured under "manage jenkins" -> "Configure System"-> "publish over ssh". The question is: How does one create the certificates? I have two ubuntu servers, one running Jenkins, and one for running the app. Do I set up a Jenkins ce...
You will need to create a public/private key as the Jenkins user on your Jenkins server, then copy the public key to the user you want to do the deployment with on your target server. Step 1, generate public and private key on build server as user jenkins build1:~ jenkins$ whoami jenkins build1:~ jenkins$ ssh-keygen Ge...
Jenkins
37,331,571
41
In this integration pipeline in Jenkins, I am triggering different builds in parallel using the build step, as follows: stage('trigger all builds') { parallel { stage('componentA') { steps { script { def myjob=build job: 'componentA', propagate: true, wait: true ...
The step documentation is generated based on some files that are bundled with the plugin, which sometimes isn't enough. One easy way would be to just print out the class of the result object by calling getClass: def myjob=build job: 'componentB', propagate: true, wait: true echo "${myjob.getClass()}" This output would...
Jenkins
51,103,359
41
How can I teach my Jenkisfile to login via basic auth in this setup? I'm using a custom docker image for my Jenkins build. As described in the documentation here I defined a docker agent like so: pipeline { agent { docker { image 'registry.az1:5043/maven-proto' registryUrl 'https://registry.az1' ...
As specified in Using a custom registry, you can specify the credentials and registry URL to use as such: Scripted pipelines syntax: docker.withRegistry('https://registry.az1', 'credentials-id') { ... } Declarative pipelines syntax: agent { docker { image 'registry.az1:5043/maven-proto' regist...
Jenkins
49,029,379
41
Jenkins is running on localhost. I have my repository in GitHub. I have the option to 'Build when a change is pushed to GitHub' checked. When I click 'Build Now', build is done successfully, no issues there. But when am committing code to my repository, auto build is not happening. I can access GitHub from my system a...
I suspect you missed the webhook url. Besides checking the Build when a change is pushed to GitHub option, you should also add the webhook url into your Github repository to get the Auto trigger mechanism to work and here is how: Go to your Github repository: Settings--> Webhooks&Services-->Service--> Add Services--...
Jenkins
30,576,881
41
I have a Jenkins job that builds from a github.com repository's master branch with Maven (mvn clean install), then checks for license headers in Java files and missing NOTICE files, and adds them if necessary (mvn license:format notice:generate). Sometimes this will result in changed or added files, sometimes not. When...
git diff --quiet && git diff --staged --quiet || git commit -am 'Added license headers' This command do exactly what is required, 'git commit only if there are changes', while the commands in the other answers do not: they only ignore any error of git commit.
Jenkins
22,040,113
41
I am able to use the Jenkins API to get information about my build via the url http://localhost:8080/job/myjob/149/api/json I want to be able to query the changeSet node using the tree query string parameter. I can successfully query non-indexed nodes like "duration" via http://localhost:8080/job/myjob/149/api/json?...
The API documentation has a hint: A newer alternative is the tree query parameter. [snip] you need only know what elements you are looking for, rather than what you are not looking for (which is anyway an open-ended list when plugins can contribute API elements). The value should be a list of property names to include...
Jenkins
17,236,710
41
I've setup Jenkins, and it's working well. It uses the Perforce plugin as the SCM, and builds automatically upon a checkin. My issue is that when a user makes a commit to the tree it auto creates a user account on the system, but no password is set, and the user cannot login. The system is secured on a intranet, and ...
Users created by SCM are not "full" users. They are created for purposes of showing SCM changes and receiving e-mails. Therefore they need to sign up (using 'Sign Up' icon that appears to the left of of 'log in' icon in the upper right corner) and provide their password. It is advisable for the username to match the SC...
Jenkins
10,805,946
41
I am trying to create a file called groovy1.txt with the content "Working with files the Groovy way is easy." Note: I don't want to use the shell to create this file, instead I want to use Groovy to achieve this. I have following script in my Jenkins pipeline. node { def file1 = new File('groovy1.txt') file1.write 'Wor...
Jenkins Pipeline provides writeFile step that can be used to write a file inside job's workspace. Take a look at following example: node { writeFile file: 'groovy1.txt', text: 'Working with files the Groovy way is easy.' sh 'ls -l groovy1.txt' sh 'cat groovy1.txt' } Running this pipeline scripts generates...
Jenkins
51,233,919
40
[Symptoms] Install Jenkins by using official steps, but failed with error message Failed to start LSB: Start Jenkins at boot time. Reproduce Steps wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - sudo apt-add-repository "deb https://pkg.jenkins.io/debian-stable binary/" sudo apt in...
[Root cause] Ubuntu 18.04 LTS use Java 9 as default java Jenkins 2.107.2 still use Java 8 [Solution] Install Java 8 before install Jenkins sudo add-apt-repository ppa:webupd8team/java sudo apt install oracle-java8-installer wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - sudo ap...
Jenkins
49,937,743
40
Is there any environment variable available for getting the Jenkins Pipeline Title? I know we can use $JOB_NAME to get title for a freestyle job, but is there anything that can be used for getting Pipeline name?
You can access the same environment variables from groovy using the same names (e.g. JOB_NAME or env.JOB_NAME). From the documentation: Environment variables are accessible from Groovy code as env.VARNAME or simply as VARNAME. You can write to such properties as well (only using the env. prefix): env.MYTOOL_VERSION = ...
Jenkins
41,604,854
40
I have just started with Jenkins My freestyle project used to report JUnit tests results in Slack like this MyJenkinsFreestyle - #79 Unstable after 4 min 59 sec (Open) Test Status: Passed: 2482, Failed: 13, Skipped: 62 Now I have moved the same to pipeline project, and all is good except that Slack notifications d...
For anyone coming here in 2020, there appears to be a simpler way now. The call to 'junit testResults' returns a TestResultSummary object, which can be assigned to a variable and used later. As an example to send the summary via slack: def summary = junit testResults: '/somefolder/*-reports/TEST-*.xml' slackSend ( ...
Jenkins
39,920,437
40
I'm doing a build on my Ubuntu 14.04 LTS but I'm getting the following: Started by user anonymous Building in workspace /var/lib/jenkins/workspace/videovixx > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > /usr/bin/git config remote.origin.url https://bitbu...
There are multiple things here. You either didn't select Maven version in Job configuration. Or you didn't configure Jenkins to install a Maven version. Or you expected to use locally installed Maven on the Slave, but it's not configured for jenkins user. Since I don't know what you've configured (or didn't configure) ...
Jenkins
26,906,972
40
I'm trying to ssh from Jenkins to a local server but the following error is thrown: [SSH] Exception:Algorithm negotiation fail com.jcraft.jsch.JSchException: Algorithm negotiation fail at com.jcraft.jsch.Session.receive_kexinit(Session.java:520) at com.jcraft.jsch.Session.connect(Session.java:286) at co...
TL;DR edit your sshd_config and enable support for diffie-hellman-group-exchange-sha1 and diffie-hellman-group1-sha1 in KexAlgorithms: KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group...
Jenkins
26,424,621
40
I am keeping a shell script file named urltest.sh in /var/lib/jenkins and executing the file from jenkins build. When I execute the build, It fails. The Environment Variables are - HOME - /var/lib/jenkins ; JENKINS_HOME - /var/lib/jenkins The console output comes as: Started by user anonymous Building in w...
Based on the number of views this question has, it looks like a lot of people are visiting this to see how to set up a job that executes a shell script. These are the steps to execute a shell script in Jenkins: In the main page of Jenkins select New Item. Enter an item name like "my shell script job" and chose Freesty...
Jenkins
21,276,351
40
Below is my build script (not using xcodebuild plugin). Build step works I have created a separate keychain with the required certs and private keys, and they are visible in Keychain Access keychain commands don't fail in the script security list-keychains shows these as valid keychains It's acting like unlock co...
We don't use Jenkins but I've seen this in our build automation before. Here's how we solved it: 1) Create your build Keychain. This will contain the private key/certificate used for codesigning: security create-keychain -p [keychain_password] MyKeychain.keychain The keychain_password is up to you. You'll use this lat...
Jenkins
16,550,594
40
Just installed Jenkins in Ubuntu 12.04 and I wanted to create a simple build that just clones a project and builds it. It fails because it cannot tag. It cannot tag because it errors out saying "tell me who you are" apparently because I didn't set git settings UserName and UserEmail. But, I should not need to set those...
The idea of tagging when pulling/cloning a repo is common to most Build Scheduler out there: Hudson-Jenkins, but also CruiseControl (The build label determined by the labelincrementer), or RTC Jazz Build Engine (where they are called "snapshots"). The idea is to set a persistent record of the input to a build. That way...
Jenkins
11,122,913
40
I want to build a project using two Git repositories. One of them contains of the source code, while the other has the build and deployment scripts. My problem is that I need to have a repository for building and deployment of different parts of the project (big project, multiple repositories, same build and deployment...
UPDATE Multiple SCMs Plugin is now deprecated so users should migrate to Pipeline plugin. Old answer Yes, Jenkins can handle this. Just use Multiple SCMs under Source Code Management, add your repositories and then go to the Advanced section of each repository. Here you need to set Local subdirectory for repo (optional...
Jenkins
16,538,198
39
We are thinking to move our ci from jenkins to gitlab. We have several projects that have the same build workflow. Right now we use a shared library where the pipelines are defined and the jenkinsfile inside the project only calls a method defined in the shared library defining the actual pipeline. So changes only have...
GitLab 11.7 introduces new include methods, such as include:file: https://docs.gitlab.com/ee/ci/yaml/#includefile include: - project: 'my-group/my-project' ref: master file: '/templates/.gitlab-ci-template.yml' This will allow you to create a new project on the same GitLab instance which contains a shared .g...
Jenkins
47,790,403
39
I have a Jenkins running as a docker container, now I want to build a Docker image using pipeline, but Jenkins container always tells Docker not found. [simple-tdd-pipeline] Running shell script + docker build -t simple-tdd . /var/jenkins_home/workspace/simple-tdd-pipeline@tmp/durable- ebc35179/script.sh: 2: /var/jenki...
You're missing the docker client. Install it as this in Dockerfile: RUN curl -fsSLO https://get.docker.com/builds/Linux/x86_64/docker-17.04.0-ce.tgz \ && tar xzvf docker-17.04.0-ce.tgz \ && mv docker/docker /usr/local/bin \ && rm -r docker docker-17.04.0-ce.tgz Source
Jenkins
44,850,565
39
When using the Jenkins pipeline where each stage runs on a different agent, it is good practice to use agent none at the beginning: pipeline { agent none stages { stage('Checkout') { agent { label 'master' } steps { script { currentBuild.result = 'SUCCESS' } } } stage('Build') { agent ...
wrap the step that does the mailing in a node step: post { always { node('awesome_node_label') { step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "test@test.com", sendToIndividuals: true]) } } }
Jenkins
44,531,003
39
I just upgraded my project to Asp.Net 4, from 3.5. When the build kicks off from TeamCity, I get the following error: [Project "Website.metaproj" (Rebuild target(s)):] C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /Website -p Website\ -u -f PrecompiledWeb\Website\ [12:11:50]: [Project "Website.m...
For me it was indeed an x86/x64 mismatch. I solved it by specifying the path to the x64 MSBuild through the MSBuild environment variable:
TeamCity
3,055,633
20
I need to run some code only if I'm running from within the TeamCity test launcher. What's the easiest way to detect this?
Check if TEAMCITY_VERSION environment variable is defined. Another approach is to use NUnit categories. Based on the comment below this code should be able to check if the test is being run by teamcity: private static bool IsOnTeamCity() { string environmentVariableValue = Environment.GetEnvironmentVariable("TEAM...
TeamCity
1,907,479
20
I'm trying to use assembly info patcher to create a version number something like: 1.2.3.1a3c19e where the last bit is the git short hash. I've tried using a powershell script build step to create the short hash (as I cant find a variable that has it) and adding this to a system variable but this build step appears to ...
If you want to write this to the Assembly Info field it can be done, but it requires a separate build configuration to generate the build number. The sole purpose of this step is to create the build number that has the hash appended to it. 1. Create a build configuration to generate the short hash 2. Add a step to gen...
TeamCity
30,416,789
20
I need to exclude some files from TC's artifacts during my ASP MVC project's build. These files include web.debug.config files, but there are others as well. At the moment the Artifact path setting in TC looks like this: src/Project.Web/*.config => arch.zip I need somehow to tell it to skip the web.debug.config file....
Starting from TC10 it's possible. In your case it would be: +:src/Project.Web/*.config => arch.zip -:src/Project.Web/*.debug.config => arch.zip
TeamCity
16,040,016
20
how can I copy the artifacts from Teamcity to another server? Thanks
The way I have done this, make things a lot easier.. Setup another configuration that pulls in, via artifact dependencies, all the files you need then run a cmd script to xcopy/copy the files to another drive on the network. You can do this using cmd script, vbs, python, shell etc.. Remember, you only need to refer to...
TeamCity
2,545,677
20
The default path for teamcity artifacts is C:\#User#\.BuildServer\system\artifacts How can i change it to d:\TeamCity\Artifacts Thanks
For me the default is D:\BuildServer\system\artifacts Yes you can, set the TEAMCITY_DATA_PATH environment variable. See here: http://www.jetbrains.net/confluence/display/TCD4/TeamCity+Data+Directory By default, the is placed in the user's home directory (e.g. it is $HOME/.BuildServer under Linux and C:\Document...
TeamCity
2,092,604
20
I am setting up TeamCity and I am wondering what should be used as the VCS Root. My svn repository is located at http://obfuscatedserver/svn/main/MyProject1/ Should I set the VCS Root at http://obfuscatedserver/svn/main/MyProject1/ or use the trunk folder at http://obfuscatedserver/svn/main/MyProject1/trunk/ ? Right no...
I would recommend using http://obfuscatedserver/svn/main/ as the VCS Root, and then restricting which folders are checked out using checkout rules. Add the following checkout rules (section 2 of the build config): +:/MyProject1/trunk You will probably also need to update the location of your msbuild file to MyPro...
TeamCity
1,560,969
20
I have a Git setup with the typical master --> develop --> feature structure. I have 5 TeamCity (v8.1) build agents. Is it possible to configure TeamCity so that if multiple people commit to develop at the same time, the develop branch won't run concurrent builds? Part of our CI process is deploy-on-success, so I do...
On the General Settings configuration page you can set the number of simultaneous builds to 1 instead of 0 for unlimited. This means that it am queue up say 5 builds but only 1 will run at a time.
TeamCity
21,761,138
19
How can I create a git tag after successful build in Team City?
You can use VCS Labeling build feature to tag successful builds in TeamCity.
TeamCity
28,836,775
19
I upgraded to TeamCity 10.0 this morning, and since the upgrade, TC cannot connect to my Subversion server. The error I see is: Test connection failed in MyProject Error connecting the specified URL: svn: E200015: Server SSL certificate for 'https://svnserver:8443' rejected There was no issue with the cert prio...
TeamCity 10.0 seems to have added an option to 'VCS Root' under 'Subversion Connection Settings' to 'Enable non-trusted SSL certificate'. Checking that option fixed those errors for me.
TeamCity
38,534,050
19
We're using TeamCity 7 and wondered if it's possible to have a step run only if a previous one has failed? Our options in the build step configuration give you the choice to execute only if all steps were successful, even if a step failed, or always run it. Is there a means to execute a step only if a previous one f...
Theres no way to setup a step to execute only if a previous one failed. The closest I've seen to this, is to setup a build that has a "Finish Build" trigger that would always execute after your first build finishes. (Regardless of success or failure). Then in that second build, you could use the TeamCity REST API to de...
TeamCity
19,689,093
19
I'm trying to run my karma (version v0.10.2) unit tests on teamcity (version 7.1). When I run karma start --reporters teamcity --single-run I get the following error: Can not load "teamcity", it is not registered! Perhaps you are missing some plugin? I have installed the karma-teamcity-reporter module, but that hasn'...
Turned out I needed to add karma-teamcity-reporter to the plugins section to get this to work: ... plugins: [ 'karma-teamcity-reporter', 'karma-jasmine', 'karma-coverage', 'karma-chrome-launcher', 'karma-phantomjs-launcher' ], ...
TeamCity
19,514,395
19
I added a self-signed certificate to my Teamcity BuildServer to introduce https support so that it can now be accessed at https://ServerUrl:8443 (More details about how here ) The result was that I was able access the server via https, but my build agent was now disconnected. How to fix this?
The build agent works as a client to the build server and communicates with it using http/https, and it turns out that when you add a self-signed certificate the build agent does not accept it. I needed to Let the build agent know the new path for communicating with the server Let the build agent know that it could tr...
TeamCity
14,980,207
19
How do you pass the artifact paths to a script in TeamCity. The scenario is this Build Project Deploy Project (with an artifact dependency to #1) Step 2 consists of a a script which Stops a service (to unlock files) Copies the build artifacts to the server Restarts the service I'm struggling with step 2, I figure I...
We do something like this. It is not 100% clear but it looks like you want to do the build and deployment as two separate builds in TeamCity with an artifact dependency from the deployment build on the main build which is exactly what we do. Here is how we do it. Setup your artifacts from the main build which it sound...
TeamCity
10,354,187
19
I have created a new application using Entity Framework 4.3 database migrations. The migrations work great from the package manager console using the "update-database" command. Now I want to run the database migrations every time the application is built using Team City, it looks like I need to create a powershell scri...
migrate.exe is what I was looking for, it is found in "packages\EntityFramework.4.3.1\tools". Add a new build step in Team City using: Runner type: command line Command executable: packages\EntityFramework.4.3.1\tools\migrate.exe Command parameters: MyApplicationName /StartupDirectory:MyApplicationName\bin
TeamCity
9,868,252
19
Has anyone had any success with running StyleCop from TeamCity? I know StyleCop supports a command line mode, however i am not sure how this will integrate into the report output by TeamCity. I've checked out this plugin found here: https://bitbucket.org/metaman/teamcitydotnetcontrib/src/753712db5df7/stylecop/ However ...
I don't know how familiar you are with MSBuild, but you should be able to add a new Build Step in TC 6 and above, and set MSBuild as the build runner, and point it to a .proj file which does something similar to the following: <Target Name="StyleCop"> <!-- Create a collection of files to scan --> <CreateItem Inclu...
TeamCity
6,370,278
19
Does anyone know how to use the TeamCity REST API to find out which builds are currently running, and how far through they are (elapsed time vs estimated time)?
The URL returns what you are asking for, including percentage complete. http://teamcityserver/httpAuth/app/rest/builds?locator=running:true <builds count="1"> <build id="10" number="8" running="true" percentageComplete="24" status="SUCCESS" buildTypeId="bt3" startDate="20110714T210916+1200" href="/httpAuth/app/re...
TeamCity
4,750,963
19
I'm working on a C#/VB.Net project that uses SVN and TeamCity build server. A dozen or so assemblies are produced by the build. I want to control the assembly versions so that they all match up and also match the TeamCity build label. I've configured TeamCity to use a build label of Major.Minor.{Build}.{Revision} Whe...
I'd suggest using TeamCity's AssemblyInfo patcher build feature: http://confluence.jetbrains.net/display/TCD65/AssemblyInfo+Patcher Just create your projects from VisualStudio, configure the build feature in the BuildSteps page (see http://confluence.jetbrains.net/display/TCD65/Adding+Build+Features), and as long as yo...
TeamCity
1,223,245
19
I deploy website through Teamcity using webdeploy method: web.csproj /P:Configuration=%env.Configuraton% /P:DeployOnBuild=True /P:DeployTarget=MSDeployPublish /P:MsDeployServiceUrl=%env.DeployServiceUrl% /P:AllowUntrustedCertificate=True /P:MSDeployPublishMethod=WMSvc /P:CreatePackageOnPublish=True /P:Us...
I have fixed this problem by restarting the Web Management Service in Services.
TeamCity
18,248,488
18
I have inherited a TeamCity server and I am reviewing the configuration. To make it a little easier, I would like to rename a build agent from a long random name to something a little more easily identifiable. However, I cannot find any options to change the name in the Agent Summary page. Has anyone got a way to chan...
You need to edit the name field in the buildAgent.properties file on the agent itself: name=change-this-name Depending on where you installed the TeamCity Agent, on Windows the file may live at C:\TeamCity\buildAgent\conf\buildAgent.properties or on Linux at /home/teamcity/buildagent/conf/buildAgent.properties.
TeamCity
36,158,402
18
I have a build chain with two projects: A is the root project, B depends on it. B has two dependencies configured: an artifact and a snapshot dependency. One build configuration for B has an environment variable (parameter) set. However, I also need this parameter set for the root project A. Is there any way in TeamCit...
Since TeamCity 9.0 it is possible to override the dependencies parameters by redefining them in the dependent build: reverse.dep.<btID>.<property name>
TeamCity
28,822,099
18
I have done a number of changes to a build configuration in TeamCity 8. I know I can see an audit trail of the changes that I have done to the build configuration and I can check the details of each individual change, but I wonder if I can select one of those previous versions of the build configuration and restore it;...
You are right ,there is no obvious option in Teamcity to rollback to a previous version. However, all teamcity build configurations are maintained in a xml file on the local disk drive in the Local Build Server. The files are created in a rolling format (the latest config is called config.xml, the one previous to it i...
TeamCity
25,085,047
18
I'm having trouble with my NuGet Installer build step. We're using both official NuGet.org packages and our own packages hosted on the TeamCity NuGet server. If I leave Packages Sources blank, then packages from nuget.org are found, but as soon as I specify %teamcity.nuget.feed.server% as the package source, then packa...
Had same problem, funny enough my Nuget sources were specified as https://www.nuget.org/api/v2/ http://nugetserver/nuget Adding a forward slash on the second url to make it http://mynugetserver/nuget/ fixed the problem. Took me a while to figure out. Now my Nuget-installer build step is running fine.
TeamCity
12,897,747
18
I have been studying MSBuild as I have the need to automate my development shop's builds. I was able to easily write a .BAT file that invokes the VS command prompt and passes my MSBuild commands to it. This works rather well and is kinda nifty. Here is the contents of my .BAT build file: call "C:\Program Files (x86)\M...
Use the MSBuild task to build the solution passing the properties you need. <?xml version="1.0" encoding="utf-8"?> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" DefaultTargets="Build"> <PropertyGroup> <OutputDir>c:\TESTMSBUILDOUTPUT</OutputDir> </Pr...
TeamCity
5,119,913
18
I have many build configurations in TeamCity, each servicing a large project. In the past if a build is kicked off the Build Agent could be busy for up to 20min! In order to improve throughput I installed a second Build Agent on the same machine such that if a build run is kicked off by say Build Agent 1 and it is busy...
You can "Limit the number of simultaneously running builds" for a build configuration (general settings page). Set it to 1, to fulfil your task.
TeamCity
5,060,790
18
I have set up multiple targets in a single xml file. I expect all targets to run but only the frist target gets executed. Here is a simplified version of what iam trying to do: <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="T1"> <Copy SourceFiles="c:\temp\a.txt" DestinationFo...
You need to tell MSBuild about your multiple targets Try <Target Name="Build" DependsOnTargets="T1; T2"> </Target>
TeamCity
1,112,913
18
Are there real tangible differences or is it just a matter of taste?
Getting cruise control setup and maintained takes more time than TeamCity (where you can setup automated project (sln) build in matter of minutes). TeamCity also has a couple of very nice features, such as reporting build failure (via email, jabber, web site) immediately, so you don't have to wait for x minutes. Versi...
TeamCity
242,339
18
I am using Team City 7.1.1 (build 24074), and I would like to exclude some namespaces in code coverage. I am using dotcover as code coverage tool. I am using MSPec, Machine.Fakes and Rhino Mocks in my tests. Thanks!
Finally I have found the way to exlude NAMESPACES -:assemblyName;type=nameSpace.*
TeamCity
12,729,952
17
I have gone through the documentation for TeamCity on build artifact outputs (https://confluence.jetbrains.com/display/TCD8/Configuring+General+Settings#ConfiguringGeneralSettings-ArtifactPaths) However, it doesn't seem clear to me as to how I can output a standard file from the build checkout directory, AND rename it...
Add command line step which will rename the artifact ren Release\oldname.exe newname_%build.number%.exe Define artifact as path to the renamed file. newname_%build.number%.exe
TeamCity
26,280,244
17
I've recently starting seeing the above error with ever-increasing frequency on our build server. Nothing has changed in our TeamCity configuration during this period, so I'm guessing it might be changes at GitHub that are causing the error. I've tried changing our VCS polling interval from 60s down to 600s in case Git...
I've figured out the answer. TeamCity has no issues - it's actually AZURE that has a problem. For proof, try doing this in your server, where TC is installed. (command line, of course) C:\git\bin\git.exe clone https://github.com/libgit2/libgit2.git and this should not work most of the time. So AZURE has a networking bu...
TeamCity
21,400,320
17
I don't want Build Config A and Build Config B to run at the same time. This is because they share the same resource which cannot be accessed simultaneously. However each build config is run by a separate agent so it is possible for them to run simultaneously. Instead I would like one build config, when triggered, to w...
Keith, there are two plugins that can help you: The first one is Groovy plugin. It has functionality of creating name locks over all projects. The second one is TeamCity.SharedResources. It has functionality of definig shared resources and locking them with read and write locks. However, resources defined in this plug...
TeamCity
14,468,161
17
I am using msdeploy to deploy a asp.net-mvc web application via teamcity. I am using a paramaters.xml file to manipulate my application's web.config, specifically the application settings section. I have some Settings where it is only valid to have a value for a specific environment and the rest of the time the value s...
I ran across this issue a while back and found the solution at Richard Szalay's blog. You need to add the parameterValidation to your parameter declaration: <parameters> <parameter name="ReplaceVariable" description="Sample variable that allows empty values" defaultValue=""> <parameterValidation kin...
TeamCity
25,663,912
17
We have been writing specifications for our JavaScript business logic using Jasmine. We're able to run our test suite within a browser, but how would we integrate this within TeamCity? Preferrably we do not want to use NodeJS, rather something as simple as possible.
I have created a modified version of run-jasmine.js that is found in the PhantomJS sources (original version is here. This version can be used within TeamCity (it will automatically detect that it is running in TeamCity). This updated version is using TeamCity service messages which allows for a nice integration. You w...
TeamCity
21,185,246
17
I use Teamcity to build different packages and want to save those Packages as Artifacts. My Artifact Path in TeamCity is the following: %system.teamcity.build.workingDir%\**\Release**/*.wsp => Solution Now TeamCity collects all WSP-Files in any Release-Directory after building correctly. But it is saved including all...
From TeamCity docs: wildcard — to publish files matching Ant-like wildcard pattern ("" and "*" wildcards are only supported). The wildcard should represent a path relative to the build checkout directory. The files will be published preserving the structure of the directories matched by the wildcard (directori...
TeamCity
7,902,893
17
I am new to TeamCity. I have my projects in different repositories. I want to checkout my projects in Different subfolders. e.g. Lets suppose that I have following 3 .net Projects in three different projects. Framework XYZ MyProject Each project is stored in its own repository. MyProject contains a solution file, whi...
You would need to configure each VCS Root in Version Control Settings. For each root, you can specify what folders are of interest to you with the Checkout Rules. When creating the checkout rules, you have the option to leave the folder structure the same as it is in your VCS or you can remap the struture to suit your...
TeamCity
4,737,114
17
I'm trying to run a simple Watin test through TeamCity but the Internet Explorer window is never shown as is usually is via CruiseControl. I get an error that it can't find a text field so something is running. But i can't see what without the window. Is there a specific change to the setup of TeamCity server that I ne...
Found this on another forum All credits go to Matt Baker For future reference to anyone who attempts to run WatiN tests automatically using TeamCity. You must start your build agent using \bin\agent.bat start and NOT as a service. WatiN requires a full UI to execute properly and it doesn't get this environment as a s...
TeamCity
488,443
17
I'm compiling a NAnt project on linux with TeamCity Continuous Integration server. I have been able to generate a test report by running NAnt on mono thru a Command Line Runner but don't have the options of using the report like a NAnt Runner. I'm also using MBUnit for the testing framework. How can I merge in the test...
Gallio now has an extension to output TeamCity service messages. Just use the included Gallio.NAntTasks.dll and enable the TeamCity extension. (this won't be necessary in the next release)
TeamCity
3,143
17
On the builds server I have set up TeamCity (8.1.1) so that it executes the build process if there are changes in either the master, one of the feature branches or one of the pull request branches using the branch specifier: +:refs/heads/* +:refs/pull/(*/merge) I have turned on the build agent option: teamcity.git.use...
Starting from TeamCity 10.0.4, you can do that by adding a configuration parameter teamcity.git.fetchAllHeads=true See here
TeamCity
23,733,970
16
Is there a simple way to have TeamCity include a text or html change-log as one of its output artifacts? Perhaps I need to go down the route of having msbuild or some other process create the change log but as TeamCity generates one for every build, I'm wondering if there is already a simple way to access it as an arti...
Yes, the change-log is accessible as a file, path to this file is in the TeamCity build parameter: %system.teamcity.build.changedFiles.file% So you could do this: Add a command-line build step to your build. Use type Custom Script. Enter this script: copy "%system.teamcity.build.changedFiles.file%" changelog.txt F...
TeamCity
4,317,409
16
I recenlty updated my TeamCity to the newest Version. (10.0 build 42002) Since then the build agent can't build any of my projects. The agent tells me the following: Unmet requirements: DotNetFramework4.0_x86 exists To solve this problem I already did what was suggested in this stackoverflow question: TeamCity Agent...
I used the work around from Greg B found here to solve the problem. To get the agent back running you need to insert following lines to the config of the agent. (For example located here: C:\TeamCity\buildAgent\conf\buildAgent.properties) DotNetFramework4.0_x86_Path=C\:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319 Do...
TeamCity
38,695,121
16
I've recently updated to TeamCity 9.1.6 to run my new unit tests based on NUnit 3.2.1. But now I'm having trouble running the tests: I've selected the NUnit3 executor in build steps, configured it accordingly: When building, I get an error: "Could not load file or assembly 'nunit.framework' or one of its dependencies....
I had the same problem with TeamCity 10.0.1 (build 42078) and NUnit 3.4.1. And it turned out to be completely my fault. I'm posting it here as someone else can stumble into the same problem and this can save them some time. It turned out that the problem was in the "Run tests from: " setting in my build configuration...
TeamCity
36,996,564
16
I'm a bit of a n00b when it comes to nodejs npm, but since implementing it in our build environment using steps recommended on several articles its tripled our build times. We use it for the standard stuff (minify/concat/etc js/css/etc) We use TeamCity and have added a Node.js NPM step then a gulp step to run the tasks...
I don't know about Node.js, but here are a couple TeamCity-specific suggestions: Does NPM perhaps download the files into %TEMP%? If so, they won't be reusable between subsequent TeamCity builds because a TeamCity agent hijacks the %TEMP% directory (redirects it to <TeamCity Home>/buildAgent/temp/buildTmp) and always ...
TeamCity
32,834,881
16
I have a custom .targets file which I import into my C# MVC web application's project file. I've added custom targets to this like so: <Target Name="CopyFiles" BeforeTargets="Build"></Target> This works fine when building under Visual Studio, but when I use TeamCity to build it, the target never gets run, and I can't...
'Build' is a special built-in target, so doesn't really work the same way as most other targets. It definitely can't be safely overridden. The most relevant documentation is here: https://msdn.microsoft.com/en-us/library/ms366724.aspx If you want something to run before build, the standard approach (as recommend by the...
TeamCity
27,986,147
16
I've recently added some custom Portable Class Library projects to an application that is built in an build server. The build was working fine, but after that it stopped working and shows me the following messages: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(983, 5): warning MSB3644: The...
A more general and elegant solution is to install the latest Microsoft .NET Portable Library Reference Assemblies. This will install profile138 among many others. The standalone installer(s) can be found at: 4.6 (June 2014):
TeamCity
20,518,424
16
I want to have these Versions in a format like this.. {Major}.{Minor}.{Build}.{patch} how to set this in the assembly info patcher in team city? so that it will automatically increment the versions for each time it builds... i want some guidance and help in this...?!?
TeamCity can version assemblies for you with the AssemblyInfo Patcher build feature. To take advantage of this: Create a build parameter called %Major.Minor%. Set this manually to some value, e.g. 1.0. On the General Settings tab, set the Build number format to %Major.Minor%.%build.vcs.number%.%build.counter%. On th...
TeamCity
15,252,282
16
Can TeamCity push successful builds to a git repository? I cannot see a specific build step in TeamCity to do this. I use the version 7.1.1 of TeamCity Thanks, Henrik UPDATE: Ok thanks for your answer, I find it a bit complicated. I found out that I can simply push back tags on successful builds to my global repositor...
You can have TeamCity execute a shell script that subsequently calls git push (with appropriate arguments, e.g. git push <repository> to push to a different repository). Do make sure that git doesn't need interactive authentication for the push operation. A related example (deploy to Heroku using a git push) can be fou...
TeamCity
13,326,487
16
I recently set up a CI server in TeamCity and now want to take it to the next step, continuous deployment. Basically, we host a suite of restful services and about 3 web applications for each one of our customers. All customers get 3 environments QA, UAT and Prod. We want to be able to automatically deploy our build...
I agree with @Niklas Ringdahl -- I think you're thinking about it wrong. You can deploy directly from TeamCity using MS WebDeploy. See Troy Hunt's excellent blog series about this: Part 1: Config transforms Part 2: MS Build and deployable packages Part 3: Publishing with WebDeploy Part 4: Continuous builds with Team...
TeamCity
10,192,776
16
I get "cannot stop" status once in a while after trying to stop builds on TeamCity. I would expect that killing my build process on build agent would do the trick, but it doesn't work. Stopping TeamCity agent process on the build machine doesn't help either. Restarting build agent (i.e. computer) does the trick, but it...
Just restart the TeamCity WebServer windows service. You shouldn't need to restart your whole machine.
TeamCity
3,227,314
16
I have an Asp.Net MVC Web Application that I am developing. I have TeamCity installed on my development workstation, and have been running CI builds on. All has been working fine. I'd like to move TeamCity off of my machine, and onto the new dev/build server that was just delivered. I do not want to install Visual Stud...
Looks like copying the file over will definitely work. Have you tried it? Think of the .targets file as a series of definitions for how MSBuild will do its work.
TeamCity
811,417
16
I am VERY new with teamcity so please bear with me I set up an email notifier to let me know when a build has failed, but TeamCity is reporting the following error: Failed to send email notification via SMTP server mail, due to error: Unknown SMTP host: mail; nested exception is: java.net.UnknownHostException:...
Option Description ------ ---------- SMTP host Specify the SMTP host name. SMTP port Specify the SMTP port number. Send messages from Specify the email address, from which notification messages will be sent to the user. SMTP login Specify the SM...
TeamCity
749,014
16
I'd like to have 3 distinct builds within a TeamCity project (Development, QA, Production). With the dependencies linked (Production can't build without a successful QA, and QA can't build without a successful Development), I'd like to propagate the version numbers through the builds. Development Build => v 1.0.1.0 QA...
If you have snapshot dependencies for Dev->QA->Production build, you can reference build number from Dev build in QA and Production builds. Please read http://www.jetbrains.net/devnet/message/5231290 for details how to do it. Update: The recent information on how to achieve this is available in this TeamCity How-To que...
TeamCity
580,138
16
How do I setup TeamCity 4.0 so that I can access it over port 443 on the internet? e.g. https://teamcity.mydomain.com I am running IIS 7 on the same server that TeamCity is installed. I see two options: Setup TeamCity to use port 8443 and create a reverse proxy in IIS that routes requests to the TeamCity public IP a...
It requires configuring the bundled Tomcat server for https. See here: http://confluence.jetbrains.net/display/TCD65/Using+HTTPS+to+access+TeamCity+server and here: http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html I also setup Tomcat to listen on just one IP Address. All of this turned out to be a real pain, an...
TeamCity
331,755
16