I'm trying to restore accidentally deleted build configuration on TeamCity 9.X following this article "https://confluence.jetbrains.com/display/TCD9/How+To...#HowTo...-RestoreJustDeletedProject"
However, I cannot find _trash folder under /config
I'm running TC on Windows and using internal DB.
What am I doing wrong?
Related
We use TeamCity 10.0.4 (build 42538) and want to migrate to the latest version (2022.04) with all our build configurations but without the build history. We saw here https://www.jetbrains.com/help/teamcity/how-to.html#Copy+Manually that:
If you want to do a quick check and do not need to preserve the build
history on the new server, you can skip Step 6 (cloning database) and
all the optional items of Step 4.
Unfortunately by doing this manual copy we were not able to run the new instance without cloning the database, as we got the error on the image below.
We then did a "Restore from backup" (from the image below) by doing a "TeamCity Backup" (Administration > Backup > Run Backup) of the server settings, projects and builds configurations, with no more success.
Do you know a way to migrate to a newer TeamCity version by keeping all the build configurations and removing the entire build history ?
You could try to export/import current projects:
Export to zip archive via Actions button or manually backup teamcity_data_dir/config/projects folder
Install fresh new TeamCity server
Copy your backup to teamcity_data_dir/config/projects
I have downloaded eclipse and with it I have checked out a project available via SVN, the project is named "Simulation" and is available at an address, with eclipse I can do everything but my main job is to build that project via Jenkins so I have created a maven project that gets the code from SVN: some_address/svn/Simulation and I configured it to build every 2 minutes but 30 minutes passed and here is the log from build #1:
Started by user %USERNAME%
Started by timer
[EnvInject] - Loading node environment variables.
Building in workspace C:\Program Files (x86)\Jenkins\workspace\simulation
Checking out a fresh workspace because there's no workspace at C:\Program Files (x86)\Jenkins\workspace\simulation
Cleaning local Directory .
Checking out http://some_address/svn/Simulation at revision '2019-02-26T09:30:18.376 +0100' --quiet
Using sole credentials devops/****** in realm ‘<http://some_address> VisualSVN Server’
now, I am able to ping successfully to that address and like I said before, I checked out the project with eclipse
what am I doing wrong?
I am doing the following steps:
dotnet restore
dotnet publish
octopusDeploy: Push packages
The second step creates a 'published-app' folder and the third step is meant to take that and create a .zip file and send it to the Octopus server.
The third step is connecting to the Octopus server but gives the error:
Running command: octo.exe push --server http://server.com/ --apikey SECRET
Pushing packages to Octopus server
Please specify a package to push
I am following this https://stackoverflow.com/a/38927027 so my third step has:
%teamcity.build.workingDir%/published-app/**/* => App.zip
Any ideas why the zip file is not being created?
Not sure if you ever got this working for yourself, however just in case it helps anyone we recently came across the same issue deploying an AspNetCore 2.0 web application running on net471 being built by TeamCity 2017.1.4 (build 47070).
After some tinkering I noticed that the "OctopusDeploy: Create and Push Packages" build step ran at our git checkout root directory, so I ending up having to use the following values for the "Package path patterns"
%ProjectDirectory%/published-app/**/* => %ProjectName%.%GitVersion.NuGetVersion%.zip
NB: %ProjectDirectory%, %ProjectName% and %GitVersion.NuGetVersion% are build parameters we have manually defined elsewhere in the build process that TeamCity can replace. %ProjectDirectory% is simply the application's source directory relative to the root of the git checkout i.e. WebApplication1 so the full path would be <full checkout path>/WebApplication1
Another gotcha that we experienced was that at the time of writing the combination of TeamCity and octo.exe (from Octopus.TeamCity v4.15.10) didn't like creating nupkg files, so make sure you try to produce a ".zip" file. In the error instances we would receive the following error:
Error from Octo.exe: Cannot run program "C:\BuildAgent\temp\buildTmp\octo-temp\3.0\octo.exe" (in directory "C:\BuildAgent\work\4e62985fa616fa1f"): CreateProcess error=206, The filename or extension is too long
I'm trying to do code analysis of Java unit test using maven sonar plugin. But the plugin doesn't seem to take into account my sonar properties "sonar.*". I've tried to modify simple examples and it did work either. According to MSONAR-70, the issue has been fixed and I'm using the version 2.4.
For the test, I've tried it on a simple case:
Clone sonar-examples.git
use the project sonar-examples/projects/languages/java/maven/java-maven-simple as example
Renamed src/main to src/test
In the pom.xml, add to the properties section :
<sonar.sources>src/test/java</sonar.sources>
<sonar.binaries>target/test-classes</sonar.binaries>
Run mvn sonar:sonar.
--> the code analysis didn't took into account my settings. The project is created on SonarQube but code as not been analyzed.
If I use the sonar-runner command line, it's analyzing the code:
sonar-runner [...] -Dsonar.sources=src/test/java
-Dsonar.binaries=target/test-classes
-Dsonar.language=java
-Dsonar.sourceEncoding=UTF-8
-Dsonar.projectKey=org.codehaus.sonar:example-java-maven
-Dsonar.projectName="Simple Java Maven Project"
-Dsonar.projectVersion=1.0-SNAPSHOT
According to a previous revision of the question, the OP solved their problem like this:
We were using SonarQube 4.0 version. Updating the version to 4.4, made the properties be taken into account.
That was in 2014; the current version now is 5.5.
The steps to upgrade can be found here:
Stop the old SonarQube server
Download and unzip the new SonarQube distribution in a fresh directory, let's say NEW_SONARQUBE_HOME.
Start it using the default H2 database and use the update center to install the plugins you need.
Manually install any custom plugins.
Stop the new server.
Update the content of the sonar.properties and wrapper.conf files located in the NEW_SONARQUBE_HOME/conf directory with the content of the related files in the OLD_SONARQUBE_HOME/conf directory (web server URL, database settings, etc.). Do not copy-paste the old files.
If a custom JDBC driver is used, copy it into NEW_SONARQUBE_HOME/extensions/jdbc-driver/.
Back up your database.
Remove the data/es directory.
Start the new web server
Browse to http://localhost:9000/setup (replace "localhost:9000" with your own URL) and follow the setup instructions.
I have a .Net 4.5 project that I am deploying with teamcity and Octopus Deploy which includes a PreDeploy.ps1, a Deploy.ps1 and a PostDeploy.ps1.
The build action on all three is Content. I have tried Copy To Output Directory set to do not copy and copy always.
I can see that when TeamCity creates the nuget packages, that all three powershell scripts are included in the artifacts view. However, following the deployment, only the Deploy and PostDeploy scripts are in the octopus directory on the tentacle machine.
Am I missing something here?
Octopus caches the downloaded packages, so perhaps you didn't bump the version number to force a fresh download? Alternatively you could check the "Re-download packages from the NuGet server" when deploying a release.
If PreDeploy.ps1 was added later than the other scripts then the above could be the reason.