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 |
|---|---|---|---|---|
We're using TeamCity, and I've set up jobs to pull from branches. But when those branches are deleted they still appear in Teamcity:
(List of outdated branches, but only refs/master is actually active)
The Teamcity documentation actually specifies what constitutes an active branch:
Active branches
In a build configur... | I suddenly had success after adding parameters to the project configuration. Before now I've been adding parameters to individual builds and never saw a difference.. Maybe that's just me misunderstanding the obvious.
teamcity.activeBuildBranch.age.hours = 0
teamcity.activeVcsBranch.age.days = 1
This works in-so-far ... | TeamCity | 29,252,305 | 33 |
I have got configured TeamCity to execute NUnit tests.
When I run manually it then it is working fine. But somehow it accumulates pending changes and doesn't run test even if I refresh overview page of TeamCity.
I am wondering which setting I have to use so pending changes will run?
Basically I would like to start firs... | It sounds like you are missing your build trigger. When you edit the project settings, you should see the Build Triggers step (#5). It's the spot where you need to add the event that tells TeamCity it should kick off a build. It is generally tied to your source control check-ins/commits.
You probably want to use the... | TeamCity | 20,519,980 | 33 |
How do we put a timeout on a TeamCity build?
We have a TeamCity build which runs some integration tests. These tests read/write data to a database and sometimes this is very slow (why it is slow is another open quesiton).
We currently have timeouts in our integration tests to check that e.g. the data has been written w... | On the first page of the build setup you will find the field highlights in my screenie - use that
| TeamCity | 8,339,668 | 33 |
What's the best way to move a single TeamCity build configuration from one server to another?
I have a local instance of TeamCity that I test builds on. Then when the build is sufficiently mature, I manually create it (eyeball-copy) on our main TeamCity server.
Is there an Export & Import feature that will do this for... | Unfortunately there is no such thing. TeamCity 8 made the situation a little bit better though by introducing a Build Id format (project name + build config name, can be overwritten) that makes it feasible to "hand copy" build configurations:
Basically under the hood all your TeamCity build configurations are really j... | TeamCity | 23,224,078 | 32 |
Using Team City to check out from a Git Repo. (Gitlabs if it matters)
Start with Empty build directory. Get this error:
fatal: could not set 'core.filemode' to 'false'
(Running on a Windows machine, if that matters)
The user that Team City is running on was changed to an Admin just in case.
The .Git directory is not a... | In my case using "sudo" worked for me. For example:
asif@asif-vm:/mnt/prog/protobuf_tut$ git clone https://github.com/protocolbuffers/protobuf.git
Cloning into 'protobuf'...
error: chmod on /mnt/prog/protobuf_tut/protobuf/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'
... | TeamCity | 50,108,363 | 31 |
I have a GitHub status check generated by TeamCity, and I'm trying to delete it (not just disable it).
I've tried (line breaks added for readability):
curl -u <myusername>:<mytoken>
-X DELETE
https://:github_instance/api/v3/repos/:user/:repo/statuses/:hash
I got the url from:
curl -u <myusername>:<mytoken>
https://:... | Like @VonC I couldn't find a deletion option. However, you can disable any existing checks so that they no longer run on your PRs.
Settings
Branches
Branch protection rules
Edit (next to your desired branch, e.g. 'master')
Rule settings
Require status checks to pass before merging
... | TeamCity | 48,106,989 | 31 |
I currently use the MSBuild runner in TeamCity for continuous integration on my local server and this works very well. However, I'm having trouble finding a full list of supported command line switches for MSDeploy in the format that TeamCity expects them.
In my 'Parameters' section at the moment I using the following ... | Firstly, the short answer is you can't find the complete list. MSBuild does not have a complete list of parameters you can chose from since you can send any parameter you like. It is a means of communication between the caller of MSBuild and the author of the MSBuild build script (a vs sln or csproj file for instance).... | TeamCity | 23,112,165 | 31 |
We recently moved from SVN to git. We work with a main "release" branch (master), and feature branches for every feature a dev is working on.
In TeamCity we have a project for every feature branch, and of course a project for the master.
When we worked with SVN, whenever someone merged from master to his feature bran... | I'm pretty sure this is the same issue that we had a few days ago, but vice-versa. We merged a dev branch into master, which caused TC to attempt to build each and every check-in that was part of the merge. Obviously not what we wanted.
To fix it, keep the Trigger build on each check-in option unchecked in the Build T... | TeamCity | 13,876,417 | 31 |
I'm looking at migrating from TFS (Team Foundation Server) to Git, but can't find anything matching TFS' support for gated check-ins (also called pre-tested or delayed commits).
Atlassian Bamboo has no support for gated check-ins. TeamCity does support it ("delayed commits" using their terminology), but not for Git. Us... | We have just started using git and have implemented pretested commits using workflows (I finished testing this just today).
basically each dev has a personal repository which they have read/write access. The build server TeamCity in our case, builds using these personal repositories, and then if successful pushes the ... | TeamCity | 12,484,424 | 31 |
How to get the unit test name from the within unit test?
I have the below method inside a BaseTestFixture Class:
public string GetCallerMethodName()
{
var stackTrace = new StackTrace();
StackFrame stackFrame = stackTrace.GetFrame(1);
MethodBase methodBase = stackFrame.GetMethod();
return methodBase.Name... | If you are using NUnit 2.5.7 / 2.6 you can use the TestContext class:
[Test]
public void ShouldRegisterThenVerifyEmailThenSignInSuccessfully()
{
string testMethodName = TestContext.CurrentContext.Test.Name;
}
| TeamCity | 9,666,562 | 31 |
We have 3 environments:
Development: Team City deploys here for Subversion commits on trunk.
Staging: User acceptance is done here, on builds that are release candidates.
Production: When UAT passed, the passing code set is deployed here.
We're using Team City and only have Continuous Integration setup with our devel... | I think you're actually asking two different questions here; one is about controlling access rights to TeamCity builds and another is about the logistics of artifact management.
Regarding permissions, I assume what you mean by "only people with certain role/permission can run a deploy script to production" and your re... | TeamCity | 7,772,311 | 31 |
When using TeamCity to compile my MSBuild XML task script, it fails with this:
[10:43:03]: myWebProject1\ myWebProject 1 .csproj (3s)
[10:43:07]: [ myWebProject1\ myWebProject1 .csproj] _CopyWebApplicationLegacy
[10:43:07]: [_CopyWebApplicationLegacy] Copy
[10:43:07]: [Copy] C:\Program Files\MSBuild\Microsoft\VisualStu... | Alright, I figured it out. It's a "Configuration" mismatch. You have one project building with Configuration=MSBuildRelease and two other projects building with Configuration=Release. MSBuild then looks in the wrong place for the "intermediate" assemblies.
Change your code to this:
<?xml version="1.0" encoding="utf-8"?... | TeamCity | 5,158,313 | 31 |
I am trying to do "continuous integration" with TeamCity. I would like to label my builds in a incremental way and the GUID provided by the VCS is not as usefull as a simple increasing number. I would like the number to actually match the revision in number in Mercurial.
My state of affairs:
Mercurial info:
I would l... | As Lasse V. Karlsen mentioned those numerical revision numbers are local-clone specific and can be different for each clone. They're really not suitable for versioning -- you could reclone the same repo and get different revision numbers.
At the very least include the node id also creating something like 0.0.12-6ec760... | TeamCity | 4,363,522 | 31 |
I have a few tests that need to be fed with external data from excel files. The files are included in the test project, and in Visual Studio, I have edited the test settings file (Local.testsettings) to deploy the data files. This makes it work fine i VS.
We are, however, also running continous integration with TeamCit... | I get round this by adding my data files (in my case usually XML) as embedded resources and I extract them from the test assembly.
[TestInitialize]
public void InitializeTests()
{
var asm = Assembly.GetExecutingAssembly();
this.doc = new XmlDocument();
this.doc.Load(asm.GetManifestResourceStream("TestAssemb... | TeamCity | 1,886,716 | 30 |
I'm looking for a way to attach some specific build parameter to a scheduled trigger.
The idea is that we are continuously building debug versions of our products. Our nightly build has to be a release build, though. The build configurations for most of our projects is absolutely the same. It even has a configuration p... | Not right now, you can follow this issue.
| TeamCity | 10,007,874 | 30 |
I want my Noda Time continuous build - hosted by a private TeamCity server in my home - to fetch the Mercurial log as an XML file. The source code is hosted on Google Code. This is so that I can use it for benchmark browsing on the public web site. It's all very much a work in progress, but it's basically starting to c... | Do you have your agent checkout settings set to "on agent"?
By default, the server does a checkout and then sends the bits to the client.
You can find the setting here:
| TeamCity | 22,722,823 | 29 |
I need to deploy a custom jar to Artifactory along with the jar generated from my Java project. Currently the only method I can find is through command line goal using:
mvn deploy:deploy-file -DgroupId=<group-id> \
-DartifactId=<artifact-id> \
-Dversion=<version> \
-Dpackaging=<type-of-packaging> \
-Dfile=<path... | Sure. Just define an execution of the maven-deploy-plugin:deploy-file goal bound to the deploy phase, configured with your values. When deploying your project, this execution will be invoked and the JAR will be deployed.
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<executi... | TeamCity | 35,158,890 | 29 |
I have a TeamCity 7 Build Configuration which is pretty much only an invocation of a .ps1 script using various TeamCity Parameters.
I was hoping that might be a simple matter of setting:
Script
File
Script File
%system.teamcity.build.workingDir%/Script.ps1
Script execution mode
Execute .ps1 script with "-File" ... | As doc'd in the friendly TeamCity manual:
Setting Error Output to Error and adding build failure condition
In case syntax errors and exceptions are present, PowerShell writes them to stderr. To make TeamCity fail the build, set Error Output option to Error and add a build failure condition that will fail the build on ... | TeamCity | 11,647,987 | 29 |
I have a warning in my build log in teamcity. I've updated Xcode on my CI-Server from 7.3.1 to 8. The step run successfully but I have this:
[Step 3/3] Starting: /Users/teamcity/local/teamcity-build-agent/temp/agentTmp/custom_scriptxxxxxxx
[Step 3/3] in directory: /Users/teamcity/local/teamcity-build-agent/work/yyyy
[... | I had the same issue. I've to run both Xcode 7 (to build old version) and Xcode 8 (to build current develop branch) in my Jenkins server and I was having the issue all the time.
Solution:
launchctl remove com.apple.CoreSimulator.CoreSimulatorService || true
This happens because, even if you quit the simulator app, the... | TeamCity | 39,972,105 | 28 |
I have a package on my TeamCity NuGet feed, built by TeamCity, but a dependent TC project cannot see it during package restore.
[14:05:02][Exec] E:\TeamCity-BuildAgent\work\62023563850993a7\Web.nuget\nuget.targets(88, 9): Unable to find version '1.0.17.0' of package 'MarkLogicManager40'.
[14:05:02][Exec] E:\TeamCity-B... | As of today, NuGet.targets has the following way to specify custom feed(s):
<ItemGroup Condition=" '$(PackageSources)' == '' ">
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
<!-- The official NuGet package source (https://nuget.... | TeamCity | 17,151,709 | 28 |
We're using TeamCity's command line build runner to call a bat-file. The bat-file builds our solution by calling the Visual Studio 2008's "devenv.exe" and then it executes the unit tests and creates the correct folder structure.
What we would like to do is to stop executing the bat-file if the call to devenv fails and... | See Build Script Interaction with TeamCity topic.
You can report messages for build log in the following way:
##teamcity[message text='<message text>' errorDetails='<error details>' status='<status value>']
where:
The status attribute may take following values: NORMAL, WARNING,
FAILURE, ERROR. The default value is ... | TeamCity | 3,674,163 | 28 |
Is it possible for TeamCity to integrate to JIRA like how Bamboo integrates to JIRA? I couldnt find any documentation on JetBrains website that talks about issue-tracker integration.
FYI: I heard that TeamCity is coming out with their own tracker called Charisma. Is that true?
| TeamCity 5 EAP has support for showing issues from Jira on the tabs of your build.
EAP Release Notes
you still don't have the integration in Jira itself which I would prefer
| TeamCity | 754,195 | 27 |
In TeamCity is there an easy way to get a variable for the current date in the format MMdd (eg 0811 for 8-Aug)?
My google-fu did not turn up an existing plugins. I looked into writing a plugin, but not having a jdk installed, that looks time consuming.
| This is quite easy to do with a PowerShell build step (no plugin required) using the following source code:
echo "##teamcity[setParameter name='env.BUILD_START_TIME' value='$([DateTime]::Now)']"
or (for UTC):
echo "##teamcity[setParameter name='env.BUILD_START_TIME' value='$([DateTime]::UtcNow)']"
This uses TeamCity'... | TeamCity | 7,019,954 | 27 |
When I run my TeamCity build with the only build step being of runner type Visual Studio (sln), I get the following error:
C:\TeamCity\buildAgent\work\4978ec6ee0ade5b4\Test\Code\Test.sln(2, 1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 2, position 1.
This is on a dedi... | I just fixed this.
Look inside the Test.sln file for Project or EndProject tags that aren't closed. For us, the EndProject was missing and it broke on teamcity, but no issues in Visual Studio.
| TeamCity | 22,986,402 | 27 |
I'm trying to set up a new build configuration in TeamCity using the Powershell runner. However, I can't seem to find a way to access the TeamCity System Properties in the build script. I've seen hints that it is possible, but cannot find documentation on how to do it.
I have tried accessing the system properties using... | TeamCity will set up environment variables, such as build.number (you can see a list of these within TeamCity).
In Powershell you can access environment variables using the env "provider", e.g.
$env:PATH
TeamCity variables are accessible by replacing the . with a _, so the build.number variable can be accessed as
$env... | TeamCity | 13,278,615 | 27 |
I'm pulling my hair out over this MSBuild issue.
We're using TeamCity to build a solution with two MVC websites in it. As part of the build we're deploying to a folder on the build server. IIS points to this folder to give us an integration build visible to management.
Here's the code from the MSBuild file that uses MS... | If you add the _PackageTempDir parameter to MSBuild it will give you the same results as doing a local publish. e.g.
msbuild C:\PathToMyProj.csproj /p:Configuration=UAT;DeployOnBuild=true;PackageAsSingleFile=False;DeployTarget=Package;_PackageTempDir=c:\PathToMyDeploy\;AutoParameterizationWebConfigConnectionStrings=fal... | TeamCity | 4,193,788 | 27 |
Continuous integration concept has just been integrated in my team.
Assume we have an integration branch named Dev.
From it derived 3 branches, one for each specific current project :
Project A
Project B
Project C
First, Teamcity is configured on a dedicated server and it goals is :
Compiles and launches unit and i... | Oh boy. You're hitting real world CD problems. Really good questions.
The answer depends a bit on highly tightly coupled the development work is on the various projects.
In my ideal situation for you would be to have a number of "effort" specific test environments. In one case, you could consider a test environment fo... | TeamCity | 9,105,459 | 26 |
I need to limit the number of Artifacts a particular build is keeping. This one build generates very large artifact output which will eat through disk space. Ideally I would like to configure just that build to keep a maximum of the last 3 successful builds but I don't want this limit applied to all projects.
| Go to:
Administration
Build History Clean-up (right menu)
At the bottom select your project / build under "Manage cleanup rules for"
Click "Edit"
In the popup, select "Custom" for "Clean artifacts"
Put "3" in "Older than the -th successful build"
Save.
This is as close to what you want. The only devation being that i... | TeamCity | 9,007,366 | 26 |
I am able to run tests via Karma in TeamCity since you can run anything that's accessible via command line. But, TeamCity only reports overall pass/fail -- does not report details of any failed tests. If it fails, I just get "Process exited with code 1".
The karma homepage says there is a teamcity integration, but th... | Use stable karma, which contains the teamcity reporter.
npm install -g karma
And then, use teamcity reporter, it will generate teamcity output on the stdout.
karma start --reporters teamcity --single-run
| TeamCity | 16,343,543 | 26 |
I am having problems with Teamcity, where it is proceeding to run build steps even if the previous ones were unsuccessful.
The final step of my Build configuration deploys my site, which I do not want it to do if any of my tests fail.
Each build step is set to only execute if all previous steps were successful.
In the ... | This is a known problem as of TeamCity 7.1 (cf. http://youtrack.jetbrains.com/issue/TW-17002) which has been fixed in TeamCity 8.x+ (see this answer).
TeamCity distinguishes between a failed build and a failed build step. While a failing unit test will fail the build as a whole, unfortunately TeamCity still considers t... | TeamCity | 15,254,581 | 26 |
We are using Teamcity 6.5.6 professional version, which gives me the option to run a backup but I do not see any option to schedule it to a particular time.
I am not sure if this version of teamcity even supports scheduled backups. If it is not possible through teamcity GUI, I wonder if there is any other option?
Could... | I wrote Powershell script for TeamCity auto backups, which you can schedule and run backup.
Here's the code:
function Execute-HTTPPostCommand() {
param(
[string] $url,
[string] $username,
[string] $password
)
$authInfo = $username + ":" + $password
$authInfo = [System.Convert]::... | TeamCity | 10,548,726 | 25 |
This is a more generic version of this question: How to run a build step on a specific branch only?
For example, I can use a PowerShell script to run MSBuild if '%teamcity.build.branch.is_default%' -eq 'true' or if '%teamcity.build.branch%' -eq 'master' but then I will miss the collapsible log that comes with the TeamC... | It is not possible to execute build step based on condition. Vote for the related request: https://youtrack.jetbrains.com/issue/TW-17939.
The recommended approach is to create separate build configuration for each branch. You can use templates to simplify the setup. In this case it will be easier to interpret the resul... | TeamCity | 33,158,624 | 25 |
We are using TeamCity 6.0 to build VS C# solutions each commit.
Once the build is complete, a different test TC project runs. So that developers can add/remove/edit VS unit test projects, how can I make TeamCity use the the sln file or search for test dll's?
I don't want to have to edit the build each time a new test p... | Fixed :) -
RTFL (Read the log!)
Run tests from: **\bin\debug\*Test*.dll
| TeamCity | 5,646,598 | 25 |
I have the latest PhpStorm (2016.2) and PHPUnit phar (5.5.4). For some reason when I run a PHPUnit test in my project in PhpStorm, it is adding on --teamcity to the run command, resulting in a failure:
Testing started at 12:52 PM ...
Unit test suite invoked with a path to a non-unit test: --teamcity
Process finished wi... | tl;dr
I only could resolve this by removing the system installed phpunit instance from my system (Linux):
sudo apt remove phpunit-*
Details
Even if the setting in PhpStorm was to use composer autoloader:
for some reason it ended up using TeamCity from /usr/share/php/PHPUnit/Util/Log/TeamCity.php:
Project's local PHP... | TeamCity | 39,599,961 | 24 |
I want to install a TeamCity Build Agent as a user. When entering my user credentials here:
I always get this error:
NOTE: My account (user) is an administrator with full permission!
How can I do this?
| The error message says it does not have "enough rights to run as a service",
this is slightly different from just being an administrator.
Go to Control Panel> Administrative Tools> Local Security Policy.
Select Local Policies> User Rights Assignment.
Scroll down through the list of policies and look for Log on as ... | TeamCity | 30,718,514 | 24 |
I want to convert a value from bigint to datetime.
For example, I'm reading the HISTORY table of teamcity server. On the field build_start_time_server, I have this value on one record 1283174502729.
How can I convert it to a datetime value?
| Does this work for you? It returns 30-8-2010 13:21:42 at the moment on SQL Server 2005:
select dateadd(s, convert(bigint, 1283174502729) / 1000, convert(datetime, '1-1-1970 00:00:00'))
I've divided by 1000 because the dateadd function won't work with a number that large. So you do lose a little precision, but it is mu... | TeamCity | 3,650,320 | 24 |
I have teamcity project that use mercurial. I did a few manually changes to the files in teamcity/buildAgent/work directory. The problem is that now I cannot update the files to the files in the repository.
How can I force re checkout for the teamcity? Is there any option to get rid of the old checkout?
| There is a "Clean Sources" button on the project or build configuration page somewhere. If you click that the next build will automatically do a full checkout.
| TeamCity | 2,785,463 | 23 |
I am using the MSBuild runner in TeamCity to build an ASP.net web api and running unit tests. Everything was working, until I upgraded to "Microsoft Build Tools 2017 15.7.2".
Suddenly msbuild was copying an older version of Newtonsoft.Json.dll (version 6.0.4.17603) from either "C:\Program Files (x86)\ISS\Microsoft Web... | Summary
When MSBuild is resolving assemblies, it will search in some pretty weird directories, including that Web Deploy folder, depending on what you have installed. Based on the MSBuild reference, I believe that this is legacy behavior. You can stop it from doing that with an MSBuild property defined in your project ... | TeamCity | 50,638,711 | 22 |
There are many sites that explain how to run signtool.exe on a .pfx certificate file, which boil down to:
signtool.exe sign /f mycert.pfx /p mypassword /t http://timestamp.server.com \
/d "My description" file1.exe file2.exe
I have a continuous integration CI process setup (using TeamCity) which like most CI proce... | I ended up doing a very similar approach to what @GiulioVlan suggested, but with a few changes.
MSBuild Task
I created a new MSBuild task that executes signtool.exe. This task serves a couple main purposes:
It hides the password from ever being displayed
It can retry against the timestamp server(s) upon failures
It ma... | TeamCity | 27,022,632 | 22 |
I am trying to update an enviroment variable in TeamCity using Powershell script. However, it does not update the value of the variable. How can I do this?
Below is my current code which gets the currentBuildNumber fine:
$currentBuildNumber = "%env.currentBuildNumber%"
$newBuildNumber = ""
Write-Output $currentBuildNu... | Try
"##teamcity[setParameter name='env.currentBuildNumber' value='$newBuildNumber']"
(note the env. prefix in the name)
Also, you can try to increase the PowerShell std out column default (80 using TeamCity's command runner). If your service message is longer than that, then TeamCity will fail to parse it.
if ($env:... | TeamCity | 24,160,533 | 22 |
Using github for windows on same machine, with same credentials works fine. Can pull/clone.
However teamcity installed as a windows service on the same machine, returns the following error
List remote refs failed: org.eclipse.jgit.errors.TransportException: https://github.com/my-private-repo.git: not authorized
| In teamcity, in the project VCS Root, if the authentication method is based on ssh public/private key, then the fetch URL should be like git@github.com:.../repository.git. Using https:// in the fetch URL causes the error message:
List remote refs failed: org.eclipse.jgit.errors.TransportException..
to occur.
| TeamCity | 22,958,859 | 22 |
I've read a handful of posts (see references below) and have yet to find a guide on best practices that is specific to my tech stack.
The goal: Create a single NuGet package targeting multiple .NET frameworks built from a single .csproj file via TeamCity using MSBuild and NuGet.
The constraints:
Pull the code from the... | Here is my preferred solution (Option #1):
The magic relies on an unfortunate workaround. If you're willing to make this compromise, this solution does work. If you are not, you can follow the issue that I opened on JetBrains' issue tracker.
The single build configuration looks like this:
Note the name of the first ... | TeamCity | 15,816,094 | 22 |
I have a CI build that is setup in TeamCity that will trigger when a pull request is made in BitBucket (git). It currently builds against the source branch of the pull request but it would be more meaningful if it could build the merged pull request.
My research has left me with the following possible solutions:
Scrip... | Add a Branch Specification refs/pull-requests/*/merge to the project's VCS Root. This will cause TeamCity to monitor merged output of pull requests for the default branch.
| TeamCity | 25,266,136 | 21 |
Working with github and teamcity, builds seem to either be refs/heads/master or master branch.
Whenever the github service hook launches a build, it is on the branch master.
Whenever TeamCity launches a build (e.g. when I start a build, or a dependency building triggers a build) the branch is refs/heads/master.
This c... | I think I found a solution to this, though it isn't ideal because I had to delete all passed builds.
I had to first copy the projects and delete the old ones to get rid of all builds that had been run.
Then I configured the default branch to be master. And I set the other branch specifications to:
+:(master)
+:refs/hea... | TeamCity | 20,460,577 | 21 |
I am trying to trigger a single teamcity build for a single merge in VCS. The way my CI is laid out is I one branch staging which we merge all of our changes into. Then when we want to deploy to production we merge staging into the master branch in git. Unfortunately this triggers a lot of builds, one for probably ever... | As counterintuitive as it is, unchecking the Trigger a build on each check-in checkbox should solve this issue as long as you have Quiet Period enabled for long enough that all of the checkins are included.
Essentially Trigger a build on each check-in actually means "only include 1 checkin in each build." Disabling ... | TeamCity | 20,380,881 | 21 |
We are setting up TeamCity to run our jasmine tests using node and karma.
The tests run fine and results are reported under the "Tests" tab in TeamCity.
However we would like to report code coverage in TeamCity (and even set Build Failure Conditions on the level).
I have installed the karma-coverage module
npm install ... | The easiest way to get TeamCity to recognize your coverage report is to output a build artifact that contains that nice html coverage report.
Edit the configuration settings for your build and under Artifact Paths add something like:
coverage/** => coverage.zip
TeamCity will recognize the coverage.zip artifact if it f... | TeamCity | 19,266,655 | 21 |
I have set up a build step on TeamCity,as described here, to do automatic release deployments to our test server. But it is not using the latest nuget packages that was build in TeamCity.
Use Case :
Teamcity will create nuget package with version 1.0.0.9, all the dlls that is in the package is the correct version, and ... | I think what you need to do is create two build configurations in TeamCity, one to build and one to deploy with Octopus. Refer to this link that has a small blurb toward the end:
Note that NuGet packages created from your build won't appear in TeamCity until after the build completes. This means you'll usually need to... | TeamCity | 17,107,988 | 21 |
We have a TeamCity (7.0.3) agent running on a 64-bit Windows Server 2008 machine. When we recently upgraded the agent to use Java 7 (1.7.0_10) the builds started failing with the following stacktrace:
Error occurred during initialization of VM
java.lang.ExceptionInInitializerError
at java.lang.Runtime.loadLibrary0(... | Try the JVM command line parameter -Dfile.separator=\/ (i.e., specify both a backward and forward slash).
| TeamCity | 13,913,196 | 21 |
I am trying to figure out how to make TeamCity run my MSTests. I have setup a build step using the following parameters:
Path to MSTest.exe: %system.MSTest.10.0%
List assembly files: Projects\Metadude..Tests\bin\Debug\Metadude..Test.dll
MSTest run configuration file: Local.testsettings
However when this step runs, i... | Firstly, Ensure the assembly you are trying to test exists at that location.
ie
your relative path:
Projects\Metadude..Tests\bin\Debug\Metadude..Test.dll
However I would expect something logged by TC if your file didnt exist. It looks like its running MSTest without any arguments somehow.
If you are sure the path is c... | TeamCity | 8,382,632 | 21 |
I want to adjust the output from my TeamCity build configuration of my class library so that the produced dll files have the following version number: 3.5.0.x, where x is the subversion revision number that TeamCity has picked up.
I've found that I can use the BUILD_NUMBER environment variable to get x, but unfortunate... | The CSPROJ file is effectively an MSBuild file.
Unload the relevant class project in VS.NET, edit it and uncomment the BeforeBuild target. Add the FileUpdate MSBuild task from the MSBuild Community Extensions.
In your MSBuild file, you can retrieve the BUILD_NUMBER from TeamCity by using the environment variable $(buil... | TeamCity | 2,027,857 | 20 |
If I have a Repository called my_project and make a large number of commits over a few different weeks, my contribution history on my GitHub/GitLab (Should be true for both), the main page profile will look like the following:
As above you can see varied commits in the contribution panel, dark colours for more and lig... | Yes, it will be removed too.
However, if you don't want it you can make that repo as private so that publically it is not accessible to anyone and your contribution still shows up in history
| GitLab | 66,104,527 | 25 |
I have multiple jobs working with a single external resource (Server). The first job deploys the app to the environment, the second execute tests at this environment, third execute integration tests at this environment.
I know there is Resource group option. But it locks only jobs. If two pipelines run concurrently I n... | This should be possible in 13.9 by using resource_group with process mode = oldest_first. Details available at: https://docs.gitlab.com/ee/ci/resource_groups/index.html#pipeline-level-concurrency-control-with-cross-projectparent-child-pipelines
| GitLab | 59,745,807 | 25 |
Using our own instance of Gitlab we get the error background worker "logical replication launcher" exited with exit code 1 when trying to use the postgres service in our runners. Haven't found anything useful over the internet. Any idea what's going on?
Versions:
Gitlab 12.4.3
gitlab-runner 12.5.0 (limit of 4 concurr... | First thing, your Database container is ready to accept the connection, as you can see from the logs
2019-11-20T10:16:25.248887712Z 2019-11-20 10:16:25.248 UTC [1] LOG: database system is ready to accept connections
This is the expected behaviour of the offical Postgres image If you look into the entrypoint of Postgr... | GitLab | 58,952,919 | 25 |
git is asking me to enter my gitlab user credentials when pushing or pulling code. I am using gitlab.com, I'm not self-hosting gitlab.
I followed the instructions to set up my ssh key. I created a key, I copied the contents from ~/.ssh/id_rsa.pub, added the key to gitlab using gitlab's user interface, and git still ask... | You are using HTTPS authentication. Switch to an SSH-based URL (in this case, probably ssh://git@gitlab.com/path/to/repo.git or git@gitlab.com:path/to/repo.git). For instance:
git remote set-url origin ssh://git@gitlab.com/<user>/<repo>
(Alternatively, if you're comfortable with using your configured editor, you can... | GitLab | 47,125,916 | 25 |
I've tried to get my setup work with gitlab-ci. I have a simple gitlab-ci.yml file
build_ubuntu:
image: ubuntu:14.04
services:
- rikorose/gcc-cmake:gcc-5
stage: build
script:
- apt-get update
- apt-get install -y python3 build-essential curl
- cmake --version
tags:
- linux
I want to get a... | You must start the gitlab-runner container with
--privileged true
but that is not enough. Any runner containers that are spun up by gitlab after registering need to be privileged too. So you need to mount the gitlab-runner
docker exec -it runner /bin/bash
nano /etc/gitlab-runner/config.toml
and change privileged flag... | GitLab | 44,257,172 | 25 |
I have not found a way to disable the automatic startup and it ends up using too much RAM when I'm not using.
The init files are not inside /etc/init or init.d.
I try update-rc.d gitlab remove and no results.
I am using GitLab 8.5.4 in Debian 8.
| Problem is solved!
I contacted the GitLab by their official page on Facebook and here is the answer.
I am using GitLab in a Desktop and it was using ~700MB.
If you too want turn off GitLab on startup, just execute in a terminal:
sudo systemctl disable gitlab-runsvdir.service
| GitLab | 35,838,438 | 25 |
I want to get a list of all the projects which are under a particular group in Gitlab. Here is the example scenario:
Group A (id: 1) has 3 Project
Group A / Project 1
Group A / Project 2
Group A / Project 3
Group B (id: 2) has 5 Projects
Group B / Project 1
Group B / Project 2
Group B / Project 3
Group B / Project 4... | You can also use the recently released Gitlab GraphQL API to query groups by name :
{
group(fullPath: "your_group_here") {
projects {
nodes {
name
description
httpUrlToRepo
nameWithNamespace
starCount
}
}
}
}
You can go to the following URL : https://[you... | GitLab | 31,498,473 | 25 |
I'm using Gitlab 5.0 to manage my git repositories and I've never used github before Gitlab.
When I create a group, I see a new directory with this group name in /home/git/repositories.
But with team, no such thing is done.
Also, with group, I can create a project for the group and the assignments (for users of this gr... | GitLab 6.0 (August 2013, 22d)
See commit 3bc4845:
Feature: Replace teams with group membership
We introduce group membership in 6.0 as a replacement for teams.
The old combination of groups and teams was confusing for a lot of people.
And when the members of a team where changed, this wasn't reflected in the proje... | GitLab | 15,894,624 | 25 |
GitLab :
.gitlab-ci.yml syntax error
docker exec -i XXX pip3 install -r ./requirements_os_specific.txt --target=./packages --platform=manylinux1_x86_64 --only-binary=:all:
this command giving a syntax error .
"Error: before_script config should be an array of strings"
This work fine if I remove "--only-binary=:a... | You have to escape a colon : in yaml. This can be done by surrounding the whole entry with quotes ".
Replace:
- docker exec -i abc pip3 install -r ./requirements_os_specific.txt --target=./packages --platform=manylinux1_x86_64 --only-binary=:all:
with:
- "docker exec -i abc pip3 install -r ./requirements_os_specific.t... | GitLab | 54,865,364 | 24 |
In my pipeline, I'd like to have a job run only if the Merge Requests target branch is a certain branch, say master or release.
Is this possible?
I've read through https://docs.gitlab.com/ee/ci/variables/ and unless I missed something, I'm not seeing anything that can help.
| Update: 2019-03-21
GitLab has variables for merge request info since version 11.6 (https://docs.gitlab.com/ce/ci/variables/ see the variables start with CI_MERGE_REQUEST_). But, these variables are only available in merge request pipelines.(https://docs.gitlab.com/ce/ci/merge_request_pipelines/index.html)
To configure ... | GitLab | 52,746,338 | 24 |
In our organisation we recently moving to git, I have created a group accidentally I would be appreciate if there is a way to delete this group.
| In the most recent version (Mar. 2019):
At top bar, click on Groups.
Type part of the name of the desired group or click on Explore Groups. Click on the desired group.
Go to Settings > General
Expand Path, transfer, remove
At the bottom of page you find Remove group. Click on the button and type the name of the group ... | GitLab | 38,094,527 | 24 |
I am in the process of migrating my svn repsitories to git with GitLab.
Now I have seen that there is a continuous integration implementation with GitLab CI and just want to try it out.
I already installed and configured a Runner but Gitlab complains that I don't have a .gitlab-ci.yml file.
I already use TeamCity for c... | Apparently there is no simple msbuild example but this should get you started:
variables:
Solution: MySolution.sln
before_script:
- "echo off"
- 'call "%VS120COMNTOOLS%\vsvars32.bat"'
# output environment variables (usefull for debugging, propably not what you want to do if your ci server is public)
- echo.
... | GitLab | 32,964,953 | 24 |
I am following this document to install gitlab docker image, and get confused with the command:
docker run --name gitlab_data genezys/gitlab:7.5.2 /bin/true
I know "/bin/true" command just returns a success status code, but how can I understand the role of /bin/true in this docker run ... command?
| Running and thus creating a new container even if it terminates still keeps the resulting container image and metadata lying around which can still be linked to.
So when you run docker run ... /bin/true you are essentially creating a new container for storage purposes and running the simplest thing you can.
In Docker 1... | GitLab | 29,762,231 | 24 |
We have a normal repository, with some code and tests.
One job has 'rules' statement:
rules:
- changes:
- foo/**/*
- foo_scenarios/**/*
- .gitlab-ci.yml
The problem is that presence of rules causes Gitlab to run 'detached pipeline', which wasn't my intention, and it's annoying. Is there any way... | rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- changes:
- foo/**/*
- foo_scenarios/**/*
- .gitlab-ci.yml
when: always
I have not tested this, but I believe this is what you are looking for. This page and this one too are both easily navigable and are ver... | GitLab | 68,955,071 | 23 |
I want to apply consistent commit message rule globally for all developers to have jira issue in commit message.
Using enterprise github.
As found, it can be achieve using, .git/hooks/commit-msg file to updated accordingly.
Issue: How to apply this updated git hooks to available for all the developers.
I don't see any ... | Any files in .git/hooks are not part of the repository and will not be transmitted by any push or fetch operation (including the fetch run by git pull). The reason is simple enough; see below. By the same token, a developer who has a Git repository has full control over his/her/their .git/hooks directory and whether ... | GitLab | 66,228,019 | 23 |
I am not able to push code to GitLab for the first time.
I have created a Gitlab project on the web interface.
I have created an ASP MVC project.
I did "git init" in that directory.
I added remote origin.
I added and committed the changes and then, when I want to push the changes to remote I get the following error:
r... | This is followed by issue 54155
It seems as though 'developer' should not be able to create projects if it does not have permission to then populate that project without asking an admin to intervene.
I don't understand, why I have enough permissions to create a project, but not to make it ready enough so I can push in... | GitLab | 60,984,084 | 23 |
I am new to GitLab and facing a problem where if I trigger two pipelines at the same time on same gitlab-runner, they both run in parallel and results in failure. What I want is to limit the run to one pipeline at a time and others in queue.
I have set the concurrent = 1 in config.toml and restarted the runner but it ... | Set resource_group in the Job, and give a unique name for all other tasks that should be blocked.
Example from the documentation:
deploy-to-production:
script: deploy
resource_group: production
| GitLab | 60,965,478 | 23 |
In Visual Studio, I'm trying to pull some changes from the repository on GitLab, but it gives me an error:
Git failed with a fatal error.
unable to access https://gitlab...git/: SSL certificate problem: certificate has expired*
How can I generate a new certificate and add it to VS? I don't have any experience with Gi... | There's a quick fix you can run in the command line:
git config --global http.sslVerify "false"
The solution was found in the following article.
Updated:
While the original solution provided a quick workaround, it's essential to emphasize the security implications and responsible usage due to the concerns raised in th... | GitLab | 60,024,912 | 23 |
i use soureTree for clone ssh project.
i've already created ssh key
i've already set up gitlab ssh key setting
i've ssh-add "mysshkey"
i've ssh-add -K 'mysshkey'
when i print ssh -T ,i can make it success in the command line.
when i git clone, pull ,push in ssh ways...It still works in the command line.(terminal)
but... | I downloaded SourceTree 2.7.6 and encountered same problem.
I think @Frankie_0927 are right, private key must be named id_rsa and must be registered in ssh agent.
for other people encountered this problem:
try generate a pair of key following the instructions in below link:
https://help.github.com/articles/connecting-... | GitLab | 51,650,052 | 23 |
I have following gitlab-ci conf. file:
before_script:
- echo %CI_BUILD_REF%
- echo %CI_PROJECT_DIR%
stages:
- createPBLs
- build
- package
create PBLs:
stage: createPBLs
script:
- xcopy /y /s "%CI_PROJECT_DIR%" "C:\Bauen\"
- cd "C:\Bauen\"
- ./run_orcascript.cmd
build:
stage: build
s... | You need to use only syntax:
only:
- tags
This would trigger for any Tag being pushed. If you want to be a bit more specific you can do:
only:
- /Ticket\/ticket\_.*/
which would build for any push with the Ticket/ticket_ tag.
| GitLab | 49,514,416 | 23 |
I am facing an issue when cached files are not used in project builds. In my case, I want to download composer dependencies in build stage and then add them into final project folder after all other stages succeeds. I thought that if you set cache attribute into .gitlab-ci.yml file, it will be shared and used in other ... | Artifacts should be used to permanently make available any files you may need at the end of a pipeline, for example generated binaries, required files for the next stage of the pipeline, coverage reports or maybe even a disk image. But cache should be used to speed up the build process, for example if you compiling a C... | GitLab | 46,281,351 | 23 |
How should I authenticate if I want to use an image from the Gitlab Registry as a base image of another CI build?
According to https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/configuration/advanced-configuration.md#using-a-private-docker-registry I first have to manually login on the runner machin... | All of the above answers including the acepted one are deprecated, This is possible in 2021:
https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#access-an-image-from-a-private-container-registry
TL;DR
Set the CI/CD variable DOCKER_AUTH_CONFIG value with appropriate authentication information in following for... | GitLab | 38,269,701 | 23 |
My GitLab instance setup will occasionally put in place an IP ban on our own IP address, resulting in all our users in the office getting 403 / Forbidden on any web page or git request.
The ban is being put in place as a result of repeated errors authenticating, which is a separate problem altogether, but I would like ... | We are running Gitlab EE and for us this issue was caused by a combination of using git lfs inside a build on a Gitlab CI runner, and having installed the rack-attack gem on the Gitlab server.
Background
In order to work around an issue with git-lfs 1.2.1 (where it insisted on requiring username and password despite cl... | GitLab | 36,298,959 | 23 |
Is there any way in markdown to combine the code (inside ```) with the spoiler (after !>) syntax in order to obtain some code inside a spoiler ?
I'm using the markdown implemented in GitLab.
| https://docs.gitlab.com/ee/user/markdown.html#details-and-summary
You can use raw HTML
<p>
<details>
<summary>Click this to collapse/fold.</summary>
These details <em>remain</em> <strong>hidden</strong> until expanded.
<pre><code>PASTE LOGS HERE</code></pre>
</details>
</p>
or now GitLab supports Markdown within <d... | GitLab | 32,181,339 | 23 |
I have a self-hosted gitlab and I would like to install a package hosted there using ssh.
I tried:
pip install git+ssh://git@<my_domain>:se7entyse7en/<project_name>.git
Here's the output:
Downloading/unpacking git+ssh://git@<my_domain>:se7entyse7en/<project_name>.git
Cloning ssh://git@<my_domain>:se7entyse7en/<project... | I don't know why, but by running the following command it worked (slash instead of : after <my_domain>):
pip install git+ssh://git@<my_domain>/se7entyse7en/<project_name>.git
# ^
# slash instead of :
| GitLab | 26,979,181 | 23 |
I am running the below code section in gitlab-ci.yml file:
script:
- pip install --upgrade pip
- cd ./TestAutomation
- pip install -r ./requirements.txt
Below are the keys and values. So I have to pass any values to the pipeline with key as a variable
ENV : dev
I have added all the above three variables in the GitLa... | When Gitlab CI CD variables are not getting injected into your pipelines as environment variables, please follow the following steps to verify.
Check whether the variable is defined. You need to have at least the Maintainer role setup for your user. Go to Settings --> CI/CD --> Variables. You can see all project varia... | GitLab | 70,067,929 | 22 |
I have a .gitlab-ci.yml file that says:
include:
- project: 'my-proj/my-gitlab-ci'
ref: master
file: '/pipeline/gitlab-ci.yml'
Because of some "Inconvenience" I would like to override some specific stage that is defined on the above mentioned gitlab-ci.yml file injected on my top level .gitlab-ci.yml file. T... | simply reuse the same job name and add the configuration you need:
plan-dummy:
before_script:
- terraform refresh
| GitLab | 67,065,616 | 22 |
1- Environment:
Gitlab-CE
GitLab 13.2.1 (b55baf593e6)
GitLab Shell 13.3.0
GitLab Workhorse v8.37.0
GitLab API v4
Ruby 2.6.6p146
Rails 6.0.3.1
PostgreSQL 11.7
Debian GNU / Linux 10 server (buster)
2- .gitlab-ci.yml file:
before_script:
- echo "--------- STARTING WORK ------------"
job_homologacao:
only:
- h... | I was erroneously editing the file .bash_logout located inside my Home /home/ati/
Gitlab when installing gitlab-runner create a Home for it in /home/gitlab-runner/
I just had to comment on the contents of the /home/gitlab-runner/.bash_logout file for the job to work.
| GitLab | 63,154,881 | 22 |
GitLab doesn't render HTML for me, but just display the source code:
Background: I used sphinx to generate the HTML and tried to show the doc at GitLab.
I looked at other projects' repositories, such as pandas, sphinx. They only have .rts files in the repository, and not HTML files. I guess they generate HTML for thei... | First of all, Git and products like GitLab and GitHub are different things. Git doesn't ever render anything; it's a version control system. It doesn't have a web interface.
Secondly, GitLab's core product isn't supposed to render anything. It's not a web host, it's a tool for hosting, sharing, and managing Git reposit... | GitLab | 55,595,323 | 22 |
I'm using kubernetes on-prem
While I build gitlab using kubernetes has some problem.
I think it's related with serviceaccount or role-binding.
but couldn't find correct way
I found these posts
Kubernetes log, User "system:serviceaccount:default:default" cannot get services in the namespace
https://github.com/kubernetes... | The issue is due to your default service account doesn't have the permission to get the nodes or pods at the cluster scope. The minimum cluster role and cluster role binding to resolve that is:
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: prom-admin
rules:
# Just an example, feel fr... | GitLab | 53,908,848 | 22 |
I'm trying to improve the project building script, described in YML-file, the improvement itself seems quite trivial, but the idea of accidentally ruining the auto-builds scares me a bit.
Right now there are several branches, version tags and other stuff in the project.
A development branch, not built by the runners wo... | All you need to do is use except in the gitlab-ci.yml file and add your branches directly below like this:
mybuild:
stage: test
image: somedockerimage
script:
- some script running
except:
- branch-name
This is working on my project without problems.
| GitLab | 51,324,550 | 22 |
I spend my day doing this:
Read an issue on a Gitlab-powered issue tracker,
Fix the issue,
Commit and push to the same Gitlab-powered Git server,
Mark the issue as closed.
To remove the 4th step, how can I close the issue automatically when committing?
| Commit and push using this syntax:
git commit -m "Sort more efficiently" -m "Closes #843"
git push
This will commit and close the issue.
Note that unlike Github a single -m will not work.
The following will appear on the issue page:
References:
https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#clos... | GitLab | 44,838,967 | 22 |
I want to use 2 accounts in Gitlab website, every account with a different ssh key
I generated the keys successfully and add them in ~/.ssh folder
I created ~/.ssh/config file and use one of them , it's works good
I can also make swapping between the two keys by editing the ~/.ssh/config file
The problem is : I want t... | You have got complete ssh configuration. First of all, check if it works:
ssh -T git@gitlab.com-username1
ssh -T git@gitlab.com-username2
should succeed in both cases. If not, the keys are not set up correctly. Verify that the keys are on gitlab for respective users.
If it works, move on to your git repository and ope... | GitLab | 37,895,592 | 22 |
I am trying to get composer to download a library from my repository on Gitlab, however, it does not have a composer.json file in it so I'm not sure if this is possible.
"require": {
"username/repository-name"
},
"repositories": [{
"type": "package",
"package": {
"version... | I found the answer and it works for me here (the last answer, not the accepted answer):
Using Composer and Private Repository on GIthub using VCS on Build Server
This is what I make it works:
"repositories": [
{
"type": "package",
"package": {
"name": "username/repository",
... | GitLab | 34,781,422 | 22 |
I'm using gitlab-ci-multi-runner with docker containers. Everything is going fine, but docker containers don't keep the composer cache so in every run composer downloads dependencies again and again, which takes a lot of time. Is there any way to configure gitlab-ci-runner docker container to keep the composer cache or... | You can change the composer cache path by exporting the COMPOSER_CACHE_DIR environment variable in your runner configuration file, and then add a volume in the [runners.docker] section to match it.
If you run gitlab-runner as root or with sudo, then your configuration file is located at /etc/gitlab-runner/config.toml. ... | GitLab | 33,479,574 | 22 |
I'm not seeing an "Accept Merge Request" button in gitlab despite having "Developer" level access. Instead there is this message:
Ready to be merged automatically
Ask someone with write access to this repository to merge this request.
According to the documentation, users with "Developer" access have the ability to "... | Developers can accept merge requests. However, it depends on how the project is configured, too.
Developers can accept merge requests when:
The merge target is not a protected branch.
The merge target is a protected branch, if an owner/maintainer has checked the 'Developers can push' checkbox on the protected branch s... | GitLab | 32,738,461 | 22 |
I am filled with chagrin having to ask this, but I can't figure out how to add users in GitLab. I get to the screen where it allows me to add new members as follows:
From my Group page -> click the 'members' icon on the toolbar along
the left edge -> click 'Add Members' expando button -> enter username
in 'Find e... | What version? These instructions are for gitlab community edition on ubuntu; the deb was named gitlab_7.4.3-omnibus.5.1.0.ci-1_amd64:
Login
Click the gears icon (top right) to enter the Admin area
Click the Groups link (top center) to enter the Groups page
Click the name of the group you wish to extend ("Mygroup")
L... | GitLab | 28,709,411 | 22 |
With version 7.4 gitlab changed the behaviour of protected branches in new projects.
In every new project the default branch e.g. master is a protected branch, meaning developers are not able to push to it. In my company a lot of developers work on the default/master branch and are now struggeling when starting a new p... | I'm not Sure if the is a default param, but per project you can change master as unprotected , in your project, go to settings -> protected branches and unprotect master
Update
The gilt team published a post related to your question!!
https://about.gitlab.com/2014/11/26/keeping-your-code-protected/
| GitLab | 26,932,503 | 22 |
I setup a new Gitlab on CentOs on /opt/gitlab-6.9.2-0/apps/gitlab/ and created a new repository under continuous-delivery group. The full path is /opt/gitlab-6.9.2-0/apps/gitlab/gitlab-satellites/continuous-delivery/cd-test
. There is only one file under this path which is README.txt.
What I try to achieve is to creat... | That would be because those satellite repos aren't the one you would push to, so their hook aren't trigger when you would think (ie, not when someone is pushing to the GitLab server).
PR 6185 introduced the archicture overview documentation
/home/git/gitlab-satellites - checked out repositories for merge requests and ... | GitLab | 24,154,384 | 22 |
Currently we are working with github and we are actually quiet happy with it. But the costs will grow more and more in near future. Now we've started evaluating other git solutions and stumbled over gitlab, and i've to say, it looks very interesting for us. I've seen that there is as well a wiki feature similar to gith... | Github wikis and GitLab wikis are both just Git repositories containing text files, so you can just pull from one and push to the other.
Go to any page on your Github wiki and click the Clone URL button. You'll get a URL like https://github.com/Homebrew/homebrew.wiki.git. Clone it to your computer:
git clone https://gi... | GitLab | 21,992,151 | 22 |
How I can set default reviewers in GitLab Premium?
In Settings → General I have only Merge request (MR) approvals, not reviewers.
| You can use "Default description template for merge requests" either via Settings->Merge Requests or via file in .gitlab/merge_request_templates to do it via a workaround. (Doc)
In the template you can use the chat code
/assign_reviewer @user1 @user2 @user3
to automatically assign user1, user2 and user3 as reviewers w... | GitLab | 68,195,758 | 21 |
I use Gitlab for doing Continuous Integration and Development and all of a sudden I get this error message "There has been a runner system failure, please try again"
There's no real error message or error code.
I've tried restarting the gitlab runner, using gitlab-runner restart, I've done a reboot of the server its r... | After a couple of hours, I realized the issue is that the server that Gitlab Runner is running on has no space left.
I logged into the server in question. Looked at the Gitlab log file using the following command:
journalctl -u gitlab-runner
And it showed me the following logs:
May 21 08:20:41 gitlab-runner[18936]: Ch... | GitLab | 61,939,202 | 21 |
I'm currently trying to get traefik to use multiple routers and services on a single container, which isn't working and i don't know if this is intended at all.
Why?
Specificly i'm using an gitlab omnibus container and wanted to use / access multiple services inside the omnibus container since gitlab is providing not o... | I found the solution to my Question.
There's indeed a little bit i missed:
traefik.http.routers.myRouter.service=myService
With this Label i can point a Router to a specific Service and should be able to add multiple services to one container:
labels:
- "traefik.http.routers.gitlab.rule=Host(`gitlab.example.com`)"
... | GitLab | 59,856,722 | 21 |
I have a merge request and a source branch is already bound to it. Now I pushed another branch and want to change the merge request to be point to the new branch. Is that possible with gitlab-ce? If yes, how?
In essence, I want to use "Fast-forward merge" as merge method without being forced to force-push to the source... | No, regarding https://gitlab.com/gitlab-org/gitlab-foss/-/issues/47020 this is unfortunately not possible. The statement is from last year, but it seems that there were no changes in supporting this for now.
To not lose the discussion completely, you can link the old MR in the new MR. With that you at least have some i... | GitLab | 56,491,774 | 21 |
Our previous GitLab based CI/CD utilized an Authenticated curl request to a specific REST API endpoint to trigger the redeployment of an updated container to our service, if you use something similar for your Kubernetes based deployment this Question is for you.
More Background
We run a production site / app (Ghost b... | Creating the integration
I had the same problem of how to integrate the GitLab CI/CD with my Azure AKS Kubernetes cluster. I created this question because I was having some error when I tried to add my Kubernetes cluester info into GitLab.
How to integrate them:
Inside GitLab, go to "Operations" > "Kubernetes" menu.
C... | GitLab | 50,749,095 | 21 |
I forked a project to a group. But there is no option to delete that forked project. I saw danger zone in Github. Is there any option available to delete forked project from Gitlab?
| login with master role in the repository.
go to forked project. then from left panel, go to Settings => General.
like this:
click the Expand from Advance settings panel.
go to bottom page and click Remove project.
then type your projectName and click Confirm.
I hope is useful.
| GitLab | 50,737,564 | 21 |
I am currently having my project in GitLab and Heroku. What I wanna do is as soon as I ask for merge request with my feature branch (let's call it crud-on-spaghetti), I want to automatically run the tests on this branch (npm test basically, using Mocha/Chai), and after they succeed, merge this crud-on-spaghetti with ma... | As of 2023 the keywords only and except have been deprecated in favor of rules (see docs).
In newer versions
Using rules: to restrict the execution of a job to a merge request to the target branch:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
For... | GitLab | 44,162,500 | 21 |
I'm using Gitlab and Sonarqube and the Sonarqube Plugin SVG Badges.
To represent the Sonarqube state on gitlab I have something like this in my README.md file:
[](https://sonar.domain.com/component_measures/metric/coverag... | The variables in https://gitlab.com/help/ci/variables/README.md are present only in a CI environment (i.e. a job), so you can't use them in the Markdown viewer when displaying the file. - That's a great idea for a feature proposal, though. I opened one - https://gitlab.com/gitlab-org/gitlab-ce/issues/32255. Feel free t... | GitLab | 43,743,141 | 21 |
I'm using GitLab CI for a project and the first step of the process is npm install. I cache node_modules for quicker runs of the same job later on, and also define them as build artifacts in order to use them in later stages. However, even though I cache node_modules and it's up-to-date, calling npm install each time t... | Just use the only:changes flag doc
The job will be:
install_packages:
stage: install
script:
- npm prune
- npm install
cache:
key: ${CI_COMMIT_REF_NAME}
paths:
- node_modules/
artifacts:
paths:
- node_modules/
only:
refs:
- master
- develop
changes:
- ... | GitLab | 40,615,533 | 21 |
I can't find out how to access variables in a build-script provided by the gitlab-ci.yml-file.
I have tried to declare variables in two ways:
Private Variables in the Web-Interface of GitLab CI
Variable overrides/apennding in config.toml
I try to access them in my gitlab-ci.yml-files commands like that:
msbuild ci.ms... | I presume you are using Windows for your runner? I was having the same issue myself and couldn't even get the following to work:
script:
- echo $MySecret
However, reading the Gitlab documentation it has an entry for the syntax of environment variables in job scripts:
To access environment variables, use the synta... | GitLab | 31,561,355 | 21 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.