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
TeamCity allows me to report back from my MsBuild script using the ##teamcity interaction. I can use this to tell TeamCity that the build has FAILED, or indeed SUCCEEDED, however I would like to tell it to CANCEL the build instead. Does anyone know of a way to do this? I can use this to inform TeamCity of failure... <...
According to JetBrains issue tracker and release page, since TeamCity 2019.1 EAP 1 builds can be stopped with service message as in: ##teamcity[buildStop comment='canceling comment' readdToQueue='true']
TeamCity
4,125,624
15
TeamCity is throwing errors when I added new the output variable syntax in our latest code update: if (Enum.TryParse(input, out MyProject.ClassificationType classification)) { result.Classification = classification; } TeamCity threw this error: [Csc] MyProject\MyCode.cs(125, 111): error CS1003: Syntax error, ',' e...
MSBuild on the TeamCity Agent's machine was outdated to using Microsoft Build Tools 2015. I was able to fix this by downloading and installing the new Build Tools for Visual Studio 2017 found here: https://www.visualstudio.com/downloads/ -> Other Tools and Frameworks -> Build Tools for Visual Studio 2017 -> Download ...
TeamCity
43,880,813
15
We are using TeamCity to produce *.nupkg artifacts which we don't want to be cleaned up. TeamCity provides a field where you can specify an ANT-style pattern for indicating which files you do or don't want to be cleaned up. Let's assume for a second that we have the following files which we do not want to be cleaned up...
To match all files, in all directories (from the base directory and deeper) **/*.nupkg Will match sample.nupkg sample-2.nupkg tmp/sample.nupkg tmp/other.nupkg other/new/sample.nupkg ** will match any directory (multiple directories deep). *.nupkg will match any file with the nupkg extension. Or just * will match any ...
TeamCity
33,417,655
15
I am currently trying to get some tests run in gradle for a shared build server. I get the following error: Error occurred during initialization of VM java.lang.InternalError: Could not create SecurityManager: worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager at sun.misc.Launcher.<init>...
This occurs when ~/.gradle/daemon folder is corrupted in MacOS/Unix. Forcefully removing the daemon folder resolved the issue for me. rm -rf ~/.gradle/daemon
TeamCity
53,217,315
15
I need to execute git commands in a TeamCity build step. These git commands need to use a SSH-based url for the git repo in order to authenticate as a priviliged user to the git server (because these git commands will actually modify the git repo, not just read it). I am aware of this question. I have already VCS che...
Teamcity 9.1 introduced a new Features called SSH Agent that allows you to establish Agent side SSH Connections using Server Stored SSH Keys: See What´s New in TeamCity 9.1
TeamCity
33,918,088
15
For my automated tests I have a project added to TeamCity server and 2 Agent Pool, one is a Windows Server and the other one is a MAC. The default agent pool is WIN but I wanted to run my tests on the MAC server. To change the agent pool to MAC, I tried to add Agent Requirement by setting teamcity.agent.name to the...
You'll have to add the MAC agent to the agent pool for this project - that's configured in the Agent section available at /agents.html?tab=agentPools for your TeamCity build server. Alternatively you can create a new agent pool with the MAC agent, and add the project to that pool.
TeamCity
29,924,888
15
I'd like to set up a nightly build for my release branch. Since I'm using git-flow I don't always have a relase branch so I would like it to build it if it can find a branch with a pattern of: refs/heads/release-* Any idea of how to get teamcity to perform this action for me?
Use Branch Filter in the Trigger and set the only filter as +:release-* Also in Version Control under Branch Specification use +:(release-*) I also had similar issue and solved it as given above. I think this would solve your problem too.
TeamCity
27,122,891
15
I have a number of client side packages managed by bower. When we deploy our application (through teamcity) we do a bower install to get the latest version of each package and then copy this to our server. When I run this from my local machine bower install takes 10-20s. When I run it as a build step in teamcity (note...
We discovered that Git for windows installs an old version of SSH, if you upgrade to the latest version of SSH it will fix the slowness http://darrell.mozingo.net/2011/09/29/painfully-slow-clone-speeds-with-msysgit-gitextensions/
TeamCity
14,362,554
15
I have the following steps for my project: build unit tests test coverage duplicates finder fx cop Is there any way to make TeamCity execute 2-5 steps in parallel? Can I use several build agents for that?
Yes. Assuming you have at least four build agents, you can do the following: Under MyProject, define 5 build configurations (Build, Unit Tests, etc). Edit build configurations 2-5, and define a new Trigger in Build Triggering (Choose Finish Build Trigger, and set it to run after a successful run of Build. Edit bui...
TeamCity
8,970,603
15
We use TeamCity at work. It would be nice to be able to keep an eye on checkin, build, and test run status without having to have a browser window open. I have seen references to a TeamCity Visual Studio plugin here and here. The second page is their Professional vs. Enterprise Edition feature comparison page. Both ...
On your TeamCity web UI, goto My Settings and Tools On the TeamCity tools right sidebar, you will see a link to download the Visual Studio Addin. Direct link: http://your.teamcity.server/update/vsAddinInstallerv4.msi
TeamCity
7,591,289
15
Right now our assemblies have a version number like 2.0.831.0. As I understand it, that's major version, minor version, date and build number. If I make a change and build again on the same day it's 2.0.831.1, 2.0.831.2 etc. My TeamCity build number format is simply 2.{0} where {0} is an auto incremented number tha...
I would recommend you to adopt the semantic versioning scheme {major}.{minor}.{patch} and append a 4th element for the build number {major}.{minor}.{patch}.{build}. This is way more useful as to include the build date into the versioning scheme. TeamCity 6.5 (you haven't specified a version) has a build feature which c...
TeamCity
7,258,718
15
It is building the builds at a time that is five hours ahead of the actual time. I have remoted to the Server box and the time on it is correct. How can I get TeamCity to build in the correct timezone?
Usually, TeamCity shows the time in the Server's local time. On the My Settings & Tools page, there is a setting, which enables showing times at current user local time. So if you've enabled this setting and your machine is 5 hours ahead from Server's time, you'll see time which is 5 hours ahead.
TeamCity
5,258,505
15
I'm having a small drama with the wildcard syntax in my TeamCity artifact configuration. I want to grab every file matching the pattern myproject.*.dll from any folder and place each DLL in the root of the artifacts path. Here's what I've got at present: **/obj/Debug/myproject.*.dll => / This is grabbing all the DLLs ...
I'm afraid you cannot do this in an easy way. You should collect your *.dll locally to a single place, and than use TeamCity's artifacts rule to copy all of them to root directory. Or, you can enter all paths manually (without ** part) This is how it works in TC.
TeamCity
5,200,317
15
We're moving from a combination of CC/CC.NET to TeamCity. The core of our product is Windows but we have a Mac agent. We have our VCS checkout mode set to "Automatically on server". Meaning the source will be checked out on the (Windows) server and then copied to the agents (including the Mac agent) as needed. Our prod...
I filed this issue as TW-14499 in hopes of an official response/fix. It was just marked as a duplicate of TW-5953 Symlinks are not supported for SVN server-side checkout, so this is a known issue that's been open about 2 years. If anybody else runs into it please vote for/comment on the issue in hopes that it will get ...
TeamCity
4,249,440
15
I'm just getting to grips with TeamCity and MSDeploy and have deployment to a dev environment triggered by SVN commit working nicely. The question I have is in terms of releasing to a test environment; I want to do this on demand and based on a specific revision number. What's the best way to configure a TeamCity build...
You can use Run Custom Build Dialog in the TeamCity, and customize there Changes to include parameter, where you need to specify actually SVN revision to build.
TeamCity
4,092,480
15
I'm using TeamCity for my CI builds, and I'd like to set up a second build for running automated UI tests on Windows XP and Windows 7 virtual machines. I imagine the build working as follows: Compile, run unit tests, etc. Prepare MSI using WiX Copy MSI to target test machines Remotely execute MSI's Copy test harness...
takes a deep breath We were looking into something to help us out with our automated UI tests. We use ranorex to test the UI and TeamCity/Msbuild to execute the tests. We never found any tools to help us out (I’m constantly keeping an eye out for some so will monitor this thread) but here is what we did instead. The ...
TeamCity
3,573,666
15
I've set up TeamCity on a Linux (Ubuntu) box and would like to use it for some of Python/Django projects. The problem is that I don't really see what to do next - I tried searching for a Python specific build agent for TeamCity but without much of the success. How can I manage that?
Ok, so there's how to get it working with proper TeamCity integration: Presuming you have TeamCity installed with at least 1 build agent available 1) Configure your build agent to execute manage.py test 2) Download and install this plugin for TC http://pypi.python.org/pypi/teamcity-messages 3) You'll have to provide ...
TeamCity
1,091,465
15
I'm currently trying out VS2017 at work, due to an interest in migrating our server systems to .Net core. I have switched a couple of minor tools projects to target .NetStandard 1.2 (recreate and move files), and everything builds locally. However, when I request a build on our TeamCity 10.0.5 server, the build fails w...
try installing the .NET Core SDK from here: .NET Core Downloads and, if necessary: set MSBuildSDKsPath=C:\Program Files\dotnet\sdk\1.0.1\Sdks
TeamCity
42,837,264
14
Folks, I am trying to use Team City. I completed the six steps out of 7. Now for the last step, under the tab "Agent Requirements", it is showing me the following message Agents compatibility In this section you can see which agents are compatible with requirements and which are not. There are no agents registered...
Your agents tab title says - Agents (0) - that means you have no registered agents. Go to the Agents tab and see if the agent(s) that you want are authorized and connected. ( the first time an agent connects to the server, it has to be authorized from the Agents page - checkout http://server/agents.html?tab=unauthorize...
TeamCity
8,054,777
14
I am trying to run my Jest unit tests in Team City but I always end up getting the prompt as shown below. No tests found related to files changed since last commit. Press `a` to run all tests, or run Jest with `--watchAll`. Watch Usage › Press a to run all tests. › Press f to run only failed tests. › Press p to fil...
--ci When this option is provided, Jest will assume it is running in a CI environment. This changes the behavior when a new snapshot is encountered. Instead of the regular behavior of storing a new snapshot automatically, it will fail the test and require Jest to be run with --updateSnapshot. link Also, you can chang...
TeamCity
51,608,998
14
I'm trying to setup a CI server for a website that I'm developing, but I can't find any info regarding how to do it with the new ASP.NET 5.
I got you brother. This took me a few days to figure out. This configuration is on TeamCity v10 for a ASP.NET Core 1.0 RC2/preview2 project. As a bonus, I am including the step where it pushes to Octopus Deploy. You will need to install the dotnet teamcity plugin and the newest Octopus Deploy plugin with Push functiona...
TeamCity
30,401,915
14
Is there a way to archive or temporarily hide a build configuration in Teamcity? The documentation only mentions pausing here: https://confluence.jetbrains.com/display/TCD8/Build+Configuration
You can archive a project, but build configurations can only be paused. However, you might be able to achieve something almost as good: Create a project called 'Archive'. Archive the project (Actions -> Archive project...) Move the build configuration to the 'Archive' project (Actions -> Move configuration...) The bu...
TeamCity
29,951,444
14
In TeamCity I created a Build Configuration with two msbuild Build Steps which should build a Solution .sln file. I defined the target as "Build", when I run the build, both steps obviously execute the standard configuration and both build either Debug or Release configuration twice. Now I went to the build step setti...
There is no way to do this (that I know of, bear with me) but there are enough alternatives: If you're willing to drop seperate build steps and instead use seperate builds instead - which normally shouldn't be any problem, use templates: create a build template in which you add all parameters which have to be configura...
TeamCity
28,863,143
14
How can i check the Team City version details? and which version support for project moving (move project and build configurations from one server to another server)? Thanks,
TeamCity version is displayed on every page (at the bottom part of it). Like this: TeamCity Professional 8.X.X (build XXXXXX)
TeamCity
21,845,859
14
I am using TeamCity and I am new to it. I have added a Build Configuration to the TeamCity and I created one VCS root to attach to it. However, my project have a special requirement to detect a particular file that was changed in the VCS root location and use that file in build step. I am sure this could be done in Te...
To get the names of the files changed this is what I did. Thanks to Sam Jones. I used System.TeamCity.build.changedFiles.file variable as follows. Add a command line build step Select Run as Custom Script Add the script copy "%system.teamcity.build.changedFiles.file%" changelog.txt in script box. You will get the cha...
TeamCity
20,332,397
14
On the TeamCity server we have installed VS 2012. I have created a build configuration in TeamCity that builds and deploys the solution. I have added a MSTest 2012 Configuration as well, but don't know how to tell it what project is the VS 2012 test project so that it can run those tests. Thanks
You need to specify assembly file (dll) of your tests, not the project file (csproj). Here's an example: http://shrani.si/f/p/PH/2tO4Zo5s/tmpa4cc.jpg So let's say your Testing assembly is called Company.Tests.dll and it is located in Company.Tests/bin/Debug/Company.Tests.dll Basically, in "List assembly files:" you mu...
TeamCity
16,408,166
14
I have a build step in my build configuration thats runner type "Command Line", running a custom script. The script is executing Robocopy: robocopy "%teamcity.build.workingDir%\Code" "\\target\d$\Web\Target Sites" /E /NP /LOG:robocopy.log if ERRORLEVEL GEQ 4 ( "D:\blat.exe" "robocopy.log" -to me@me.com -f me@me.com -s...
Neil, you might try escaping the percent sign. Try IF %%ERRORLEVEL%% GEQ ...
TeamCity
14,755,561
14
I'm using TeamCity 5.1.5 I'd like to customize the email notification template on a per project basis. Project A : use custom email notification email template to include additional info about the build and test results Project B,C,D : use the default email notification template I've perused through the TeamCity docume...
As far as I know, the template files can not be configured on a per-project basis. However, using the FreeMarker expression syntax and properties provided by TeamCity, you can update the e-mail template to conditionally provide certain information for a given project. For example: <#if project.name = "Project A"> B...
TeamCity
11,726,940
14
Is it possible to get the raw build log from a TeamCity build? I've written a custom test runner that gets run as a commandline build step and reports test results back by printing ##teamcity... lines to stdout. The build log from TeamCity seems to be stripping these out when it recognises them. I'd like to see the ...
You can see the raw output from the build agent by looking in the agents /logs directory. This shows the unparsed data that is being hidden on the build output shown in the TeamCity console. For example c:\TeamCity-Agent\logs\teamcity-build.log.
TeamCity
11,354,203
14
Attempting to build a C# project which has numerous references to assemblies in NuGet packages fails in TeamCity but works fine in Visual Studio. Found in the log; For SearchPath "{HintPathFromItem}". [13:48:15][ResolveAssemblyReference] Considered "..\packages\AspNetMvc.4.0.20126.16343\lib\net40\System.Web.M...
I know this has been answered, but maybe someone else has had the same problem I did. My hint paths in my project file were incorrectly pointing to packages and changing it to ..packages fixed it for me. So changing it from this: <Reference Include="Newtonsoft.Json"> <HintPath>packages\Newtonsoft.Json.5.0.5\lib\net...
TeamCity
9,734,532
14
I am using the TeamCity Visual Studio runner. I want to add a setting that is not accessible from Visual Studio. /Property:FileAlignment=4096 I typed that directly into the build step "Command line parameters." The build log shows the error: MSBuild command line parameters contains "/property:" or "/p:" parameters....
You should use "System properties". Don't worry about the name, that's just how TeamCity calls it. They are regular properties. You can add them in "Edit Configuration Settings > 7. Build Parameters". For example, you can add the system property as follows: Name: system.FileAlignment Type: System property (system.) Va...
TeamCity
8,810,860
14
I'm trying to do a password reset. I'm following the instructions here. I've tried shutting down the two services (TeamCity Build Agent Service and TeamCity Web Server) or some combination of the two, but I keep getting "User with specified username does not exist". Is there something else I need to stop or shutdown?
Shut down TeamCity via the command in its bin directory: D:\TeamCity\bin\shutdown.bat
TeamCity
6,731,600
14
Well we are facing a strange problem with JetBrains TeamCity induced unit tests on our main project where tests from few library projects are failing regularly. Apparently, it's not reading the config file (coming from app.config and nicely stored in project -> bin -> debug -> projectName.dll.config). Hints or tips on ...
I've got the same problem and wasted a couple of hours to figure out what the problem is. In our case, the NUnit plugin was configured to run the tests from: **\*Tests.dll Though this sounds to be OK, it has turned out that this pattern will not only match to the MyTests.dll in the bin\Debug folder but also to the obj...
TeamCity
5,725,749
14
We got a TeamCity server which produces nightly deployable builds. We want our beta tester to have access these nightly builds. What are the best practices to do this? TeamCity Server is not public, it is in our office, so I assume best approach would be pushing artifacts via FTP or something like that. Also I have no ...
I don't know of a way to trigger a script, but I wouldn't worry about that. You can retrieve artifacts via a URL. Depending on what makes sense for your project, you could have a script set up on a scheduler (cron or Windows Scheduling) that pulls the artifact and sends it to the FTP site for the Beta testers. You can ...
TeamCity
1,106,815
14
I'm trying to get the latest successful build. This request returns all of the successful builds for a specified buildType (as BUILDTYPE below). /httpAuth/app/rest/builds/?locator=buildType:BUILDTYPE,status:SUCCESS Is there a way to further filter out to get the single latest successful build of the corresponding buil...
Adding a count of 1 should work: /httpAuth/app/rest/builds/?locator=buildType:BUILDTYPE,status:success,count:1
TeamCity
36,270,266
13
I am getting following error while building project in Team city. Same project is getting build on Local machine. Local machine has VS 2015 and F# 4.0. My Project Configuration is as below. <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project...
I had a similar problem a while back, because I was running the local machine with Administrator privileges, but the Visual Studio installer had set environment variables at the user level and not the system level which Administrator uses. So when compiling as Administrator, the FSharpTargetsPath was not being correctl...
TeamCity
38,343,130
13
I am trying to create a nuget package for a .csproj file but want the package name to be different from the csroj file (which it is by default) and I don't want to specify a .nuspec file. Is there a way of doing this? I can only see a version name override option on the command line options and not a package name overr...
Nuget command line doesn't provide any option for direct name change. http://docs.nuget.org/docs/reference/command-line-reference#Pack_Command If you want to differ project and nuget package name you will have to prepare and edit custom nuspec file. You may also do it manually after creating package by using e.g. NuGet...
TeamCity
26,252,422
13
I am currently setting up a TeamCity build server that will pull source code from our git repositories, which are hosting on Bitbucket. I am doing this for a repositories that are setup as part of a team on Bitbucket (not my personal account). What I am running into is that the URL paths seem to be custom for each u...
You should use a deployment key. It gives read-only access to both private and public repositories. Check the documentation at https://confluence.atlassian.com/display/BITBUCKET/Use+deployment+keys
TeamCity
19,730,454
13
I am getting the following error on my TeamCity project: Error collecting changes for VCS repository 'MySvnRepository' Unable to get SVN log entries for: https://myserver/svn/trunk; range: RR[99_2013/08/27 13:35:20 +0100 => 6_2013/08/27 14:40:13 +0100]@d2fecd1e-4276-d847-874c-cb6b9eafeb43; revisions: 99..6 I have te...
We had faced similar issue with team city. Seems problem was some how it was trying to fetch the SVN logs from two configurations. Because we had used the same VCS root for 2 different branches at different times. To solve this, delete and recreate the build configuration as well as the VCS root and it should work.
TeamCity
18,467,378
13
I recently re-configured our TeamCity build configuration to take advantage of the Branch features to apply the same build configuration to multiple branches in the same repository. Now, I'm trying to setup an automated build script that can pull the latest artifact from TeamCity, but only for a specific branch. I was...
I just came across this article. I plan on giving this a try over the next couple days, and if it works, I will give a brief summary of the result for anyone else who has trouble with this. EDIT: Sorry for the delay, just realized that I never came back to report how we resolved this issue. We ended up upgrading TeamC...
TeamCity
17,625,547
13
I try to run dotCover with my NUnit tests, in the TeamCity 8 as a build step. But no metter what I try I always get the same error in the log file: Step 4/4: Coverage (NUnit) (1s) [Step 4/4] Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit [Step 4/...
Check out: http://confluence.jetbrains.com/pages/viewpage.action?pageId=49448495 In the case of internal TeamCity DotCover, you have to add the "ALL APPLICATION PACKAGES" read access rights to the TeamCity installation folder. If using an external DotCover, add the rights there. This corrected the issue for me, for now...
TeamCity
16,320,321
13
I have a TeamCity Build Configuration that includes the following to publish artifacts: Source\Builder\bin\Release\*.dll=>release This works fine, however I am wanting to exclude one dll (there are quite a few) and have read that you can use + & - operators to do this. Something along the lines of: +: Source\Builder\b...
I don't believe you can. However, if you are using the artifacts in another build configuration as an artifact dependency, you can exclude a particular file there. When you set up the dependencies, you can specify a negative operator like this: +:release/**=>Dependencies/SomeProject -:release/SomeBinary.dll It is a ho...
TeamCity
12,780,516
13
I've been looking at TFS, TeamCity, Jenkins and Bamboo and to be honest, none of them were convincing. I want Good reporting Good Git support Gated/delayed check-in/commit Integration with Visual Studio and/or Atlassian products The solution shouldn't require regular developers to use command line or terminal (Git Ext...
@arex1337 All the answers here provided have their merits. Experience tells us no project/organization is ever happy with a single vendor for all their needs. What you may probably end up having is a base CI tool with a mix of plugins/additions from other vendors who their own USPs. As an example : Jenkins as a base ...
TeamCity
12,155,401
13
Here's my configuration: On the build log, I only see the output of the first two lines, and then "Process exited with code 0" as the last output of this build step. I tried opening a terminal in the build server in the SYSTEM account (using PsTools), since Team City is configured to run under said account. Then, I cr...
The stdin command option of Powershell has some weirdness around multiline commands like that. You script in the following form would work: write-host "test" write-host "test2" if("1" -eq "1"){write-host "test3 in if"} else {write-host "test4 in else"} The ideal way would be to use the Script : File option in TeamCit...
TeamCity
9,165,658
13
I have, out of curiosity I guess, clicked the little grey 'x' to the right of a project on my TeamCity Project Dashboard. It turns out that it hides the project from the dashboard. And now I cannot find a way to 'unhide' it. When I try to use Configure Visible Projects menu, it says it's visible. Also if I hover over t...
For those (like me) who struggled to find the configuration alluded to above: Go to the main page (with the list of projects). To the right of the project with the hidden build config there is a drop down that says "1 hidden". Use that to unhide it.
TeamCity
7,951,168
13
I am attempting to setup automated tests for our applications using a virtual machine environment. What I would like to have is something like the following scenario: Build server is automatically triggered to start an automated test for the application A "build" script is then run which consist of: Copy application ...
I have a similar setup running and I chose to use Vagrant as its the same thing our developers where using for normalizing the development environment. The initial state of the virtualmachine was scripted using puppet, but we didn't run the deployment scripts from scratch on each test, only once a day. You could use p...
TeamCity
6,359,142
13
I suspect there's probably an easy answer to this I'm just not seeing, but whenever I run a TeamCity build with either MSBuild or the Visual Studio solution runner against a .csproj and target "Package", the build artifacts always include the "csproj.teamcity.patch" string after the project name: Running the same proc...
You may set 'teamcity.msbuild.generateWrappingScript' configuration parameter with value 'false' to make TeamCity avoid generating wrapping script. TeamCity MSBuild/Solution build runners used to generate wrapping scripts to add TeamCity-provided tasks.
TeamCity
4,211,683
13
I get this error when running my Moq tests through Teamcity 5 Test(s) failed. System.IO.FileNotFoundException : Could not load file or assembly 'Moq, Version=3.1.416.3, Culture=neutral, PublicKeyToken=69f491c39445e920' or one of its dependencies. The system cannot find the file specified. at MyCode.Te...
So the issue was to do with the Test DLL search path under the nunit settings It was: ..\Tests\**\*Test*.dll But is now: ..\Tests\*\bin\Debug\*Test*.dll And things work nicely UPDATE http://confluence.jetbrains.com/display/TCD8/NUnit You can use this pattern **\*.dll as long as you add this pattern in the "Do no...
TeamCity
3,665,674
13
I have just installed GitLab on a fresh Ubuntu 14.04 64 bit server. I did so using the Omnibus package as indicated in the download page. There were no error messages during the install and all the remarks from the script were displayed in green. When I access the server through port 80 I get the following: Following ...
There is a lag of some 5 minutes from the moment gitlab is started/restarted to the point when it is actually able to process requests. Here is an example from the log: 2015-01-08_09:00:57.37719 [13326] 08 Jan 10:00:57.377 * The server is now ready to accept connections on port 0 2015-01-08_09:00:57.37722 [13326] 08 Ja...
GitLab
27,816,046
18
We have a GitLab CI pipeline which builds a new Docker image based on an external ETCD snapshot of a Hashicorp Vault secrets back-end. The image is for disaster recovery so we don't have any interest in keeping old versions in the registry. Is there any way of purging GitLab registry container images which are older t...
run this command: sudo gitlab-ctl registry-garbage-collect -m
GitLab
55,361,101
18
I am trying to clone a private git repository(gitLab) into a kubernetes pod, using SSH keys for authentication. I have stored my keys in a secret. Here is the yaml file for the job that does the desired task. Heres the same question, but doesnt give the exact solution : Clone a secure git repo in Kubernetes pod Logs o...
You can use git-sync apiVersion: apps/v1 kind: StatefulSet metadata: name: git-sync-test spec: selector: matchLabels: app: git-sync-test serviceName: "git-sync-test" replicas: 1 template: metadata: labels: app: git-sync-test spec: containers: - name: git-sync-test ...
GitLab
53,683,594
18
I had a problem with go-modbus in an issue in Github. Author suggested me to use: $ go get github.com/goburrow/modbus instead of $ git clone https://github.com/goburrow/modbus.git What is the difference between that two commands?
The git clone command will clone a repo into a newly created directory, while go get downloads and installs the packages named by the import paths, along with their dependencies.
GitLab
51,121,797
18
I keep getting a "Host Key Verification Failed" error when trying to push changes to a git controlled folder/project to Gitlab. For whatever reason, it works fine using Visual Studio for Mac, and I can login to my Gitlab account just fine via web browser.
Resolved by deleting any/all Known_hosts files in ~/.ssh/ and then executing ssh git@gitlab.com in Terminal and answering "yes" (which re-adds git@gitlab.com to known_hosts after re-creating a new known_hosts file). I did some messing around in known_hosts which probably caused the problem.
GitLab
45,538,408
18
I was committing my git process and thought that it would be okay if I ignore comments so I used this code git commit filename Bash was strange and thus i closed the console now when I use proper command git commit -m"THIRD COMMIT" filename It give the following response: Another git process seems to be running in t...
I met this problem recently too. rm -f ./.git/index.lock try this commend in your git bash, then you can solve your problem.
GitLab
40,449,342
18
I've read the differences between Gitlab Community and Enterprise in this page: https://about.gitlab.com/features/ Based on that page I understand the integration with Jenkins is only available in the enterprise version. However, I've seen that using web hooks I can trigger builds in Jenkins when a push happens in Gitl...
On the merge request page, there is a state widget that shows the status of tests for that particular merge request, and on your project home page, there is test status badging. These two UI elements only show up if you enable a 'ci service' on the project. In community you can turn it on with Gitlab CI. In enterprise ...
GitLab
28,327,766
18
Using the following CI pipeline running on GitLab: stages: - build - website default: retry: 1 timeout: 15 minutes build:website: stage: build ... ... ... ... website:dev: stage: website ... ... ... What does the first colon in job name in build:website: and in website:dev: exactly mean? I...
Naming of jobs does not really change the behavior of the pipeline in this case. It's just the job name. However, if you use the same prefix before the : for multiple jobs, it will cause jobs to be grouped in the UI. It still doesn't affect the material function of the pipeline, but it will change how they show up in t...
GitLab
70,322,505
17
I'm writing GitLab CI/CD pipeline script in .gitlab-ci.yml I want to check if a specific file changed in another repo and if so I would like to copy the file, commit and push to the current repo. everything works until I get to the 'git push' part I tried several ways to fixed it: stages: - build build: stage: b...
Job-tokens only have read-permission to your repository. A unique job token is generated for each job and provides the user read access all projects that would be normally accessible to the user creating that job. The unique job token does not have any write permissions, but there is a proposal to add support. You ca...
GitLab
65,234,416
17
I'm trying to push an image to gitlab registry. I've done it many times, so I wonder why I get this error. I build the image with latest tag: Successfully tagged registry.gitlab.com/mycompany/rgpd_api:latest Then I login and I push: docker login registry.gitlab.com -u gitlab+deploy-token-91931 docker push registry.g...
I've stumbled upon this question as well and it turns out that Group level Deploy tokens can be used to push images to group level container registry similarly to a PAT token with API access or other applicable scopes. The image must to be tagged with the tag that matches an existing project within the group. Any imag...
GitLab
57,654,620
17
Can you use the same ssh key for different version control hosting services? And if you can, what are the pros and cons? Scenario: I have ssh keys that I am using on my computer, can I and should I use the same ssh keys with gitlab/gitbucket on the same computer?
No, it is not advisable: a private key should remain used for only one service, that way you can revoke/change it just for that service. What you can do is set up a ~/.ssh/config file in which you can associate the right private key with the right host, as explained here.
GitLab
56,285,972
17
I want to publish a private npm package with Gitlab CI. I've created an auth token for my npm user and set it as a variable NPM_TOKEN in my Gitlab CI settings. The job then creates an .npmrc file with the registry and the auth token. - npm run build && npm run build:es6 - echo '//registry.npmjs.org/:_authToken=${NPM_TO...
As @Amityo said, rather than manually editing the npmrc file, npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} is the way to go, because otherwise you may be editing the wrong npmrc file. If you are still getting an authentication error, and are certain that the token is correct, check your registry URL. Y...
GitLab
54,665,511
17
Could you tell me if I do it in correct way: I have create Docker image with all stuff which is need for running my tests in gitlab CI I push it to gitlab registry I can see on gitlab page in section Registry my image - gitlablogin/projectname I want to use this image for CI, so in .gitlab-ci.yml I add image: gitlabl...
Right now it is possible to use images from your gitlab registry without any special steps. Just build and push an image to your gitlab project container registry docker build -t registry.gitlab.com/gitlabProject/projectName:build . docker push registry.gitlab.com/gitlabProject/projectName:build and then just specify...
GitLab
53,088,837
17
I try to update my single gitlab runner from 11.0 to 11.3.1 and followed the instruction on the gitlab doc. sudo apt-get install gitlab-runner will confirm that I have the new version installed: gitlab-runner is already the newest version (11.3.1). The last updates like 10.* to 11.0 worked absolutely fine but this ti...
Ok the problem was solved by using the manual update described at: https://docs.gitlab.com/runner/install/linux-manually.html Stop the service (you need elevated command prompt as before): sudo gitlab-runner stop Download the binary to replace Runner's executable: sudo wget -O /usr/local/bin/gitlab-runner https://gitl...
GitLab
52,716,757
17
How to setup Gradle publish task user credentials with GitLab CI secret variables? I am using gradle maven publish plugin, and here is snippet from build.gradle repositories { maven { credentials { username artifactUser password artifactPass } url "..." } } I've tried to use...
You don't need env. prefinx in your .gitlab-ci.yml. You don't need to re-export the variables as well. If you have defined a variables named MAVEN_REPO_USER and MAVEN_REPO_PASS in Gitlab CI/CD settings for the project, you can just use them in Gradle script: repositories { maven { credentials { ...
GitLab
51,137,958
17
I'm very new to gitlab and gitlab CI and I have put a pipeline in place that is successfully completing. My master and development branches are protected so a merge request is required so that another dev in the group can review the code and comment before merging. I was wondering if it is possible to generate this mer...
In order to achieve my simple needs, I simply added a final stage to my pipeline which essentially executes a bash script adapted from this post. EDIT: As requested by @Yuva # Create a pull request on pipeline success create_merge_request: stage: createMR tags: - autoMR script: - 'echo Merge request opene...
GitLab
51,104,622
17
i try to get Gitlab with SSH working, but it won't. I have done following steps: 1 ) generate ssh-key ssh-keygen -t rsa -C "myemail@myhoster.com" -b 4096 2 ) named the key "id_rsa" in folder /Users/myUserName/.ssh/ 3) copied the key via pbcopy < ~/.ssh/id_rsa.pub 4) insert the key into gitlab When i now try to clone ...
I found myself with the same problem. As Adrian Dymorz describe you can check if you have access to Gitlab through SSH with the following command: ssh git@gitlab.com You should receive a response like this: ... Welcome to GitLab, <Gitlab ID Account>! Shared connection to altssh.gitlab.com closed. If not, then betarra...
GitLab
51,079,198
17
I want to host static page generated with Sphinx on GitLab Pages. Built index.html file is in: project/docs/build/html How .gitlab-ci.yml should look like to deploy the page? I have something like that and it isn't working: pages: stage: deploy script: - echo 'Nothing to do...' artifacts: paths: - docs/build...
According to the documentation for .gitlab-ci.yml, the pages job has special rules it must follow: Any static content must be placed under a public/ directory artifacts with a path to the public/ directory must be defined So the example .gitlab-ci.yml you gave would look something like this: pages: stage: deploy ...
GitLab
48,223,039
17
I know that this can be done with dockerhub. I want to know if there is something similar available for gitlab registry. The use case is that, I have written a fabric script to revert a deployment to a particular tag provided by the user. Before actually pulling in the images, I want to know whether an image with the ...
Hint: Also have a look at @filiprafaj's answer using crane. Ok, here is a solution I came up with using the docker:stable image by enabling the experimental client features. mkdir -p ~/.docker "echo '{\"experimental\": \"enabled\"}' > ~/.docker/config.json" docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY...
GitLab
47,660,841
17
I get this error on a fresh install of gitlab. The message looks like: fatal: unable to access 'https://gitlab-ci- token:xxxxxxxxxxxxxxxxxxxx@gitlab.example.com/something.git/': Peer's Certificate issuer is not recognized.ERROR: Job failed: exit status 1 Any suggestions on how to fix it?
Had faced the same problem after enabling verbose mode by following command export GIT_CURL_VERBOSE=1 and found the following issue: NSS error -8179 (SEC_ERROR_UNKNOWN_ISSUER) Found this following site helpful,But its good when you have entire control for the proxy server as well to enter the certificates. http://dro...
GitLab
45,608,595
17
If one needs to install private repositories with npm the environment variable NPM_TOKEN needs to be set. NPM_TOKEN=00000000-0000-0000-0000-000000000000 My build stage in gitlab pipelines needs to install a private repository. Thus I put this NPM_TOKEN secret variable in my gitlab pipeline settings. My current gitlab-...
I changed gitlab-ci to this: image: dasnoo/node build_job: script: - printenv NPM_TOKEN - npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} - npm i @dasnoo/testpriv and it works. not sre why I had to do that though
GitLab
45,037,913
17
I'm currently using GitLab in combination with CI runners to run unit tests of my project, to speed up the process of bootstrapping the tests I'm using the built-in cache functionality, however this doesn't seem to work. Each time someone commits to master, my runner does a git fetch and proceeds to remove all cached f...
Turns out that I was doing some things wrong: Your script can't cache files outside of your project scope, creating a virtual environment instead and caching that allows you to cache your pip modules. Most important of all: Your test must succeed in order for it to cache the files. After using the following config I...
GitLab
44,798,794
17
As claimed at their website Gitlab can be used to auto deploy projects after some code is pushed into the repository but I am not able to figure out how. There are plenty of ruby tutorials out there but none for meteor or node. Basically I just need to rebuild an Docker container on my server, after code is pushed into...
Brief: I am running a Meteor 1.3.2 app, hosted on Digital Ocean (Ubuntu 14.04) since 4 months. I am using Gitlab v. 8.3.4 running on the same Digital Ocean droplet as the Meteor app. It is a 2 GB / 2 CPUs droplet ($ 20 a month). Using the built in Gitlab CI for CI/CD. This setup has been running successfully till now. ...
GitLab
36,312,494
17
I'd like to use GitLab CI system for my Android application gradle project. The project repository is hosted on GitLab.com, so I'd like to use one of the Shared Runners provided by Gitlab Inc. While the official tutorial provides an example for NodeJS project runner configuration and there are also shared runners for R...
I'm using this docker image to run android build on gitlab-ci Update: Moved to Gitlab registry image: registry.gitlab.com/showcheap/android-ci:latest before_script: - export GRADLE_USER_HOME=`pwd`/.gradle - chmod +x ./gradlew cache: paths: - .gradle/wrapper - .gradle/caches build: stage: build...
GitLab
35,916,233
17
I'm currently on OS X Yosemite 10.10.3, and trying to git clone an existing repo which works fine on Windows. I've tried a combo of installing git through homebrew with curl/openssl with no luck. When i run the git clone, i get the following ssl read error: GIT_CURL_VERBOSE=1 git clone http://myURL/gitlab/project/pro...
Javabrett's link got me to the answer, it revolves around Yosemite using an incorrect SSL dependency, which Git ends up using. Installing Git via homebrew with these flags works: brew install git --with-brewed-curl --with-brewed-openssl Or: brew reinstall git --with-brewed-curl --with-brewed-openssl
GitLab
30,385,939
17
I have installed GitLab 7.2.1 with the .deb package from GitLab.org for Debian 7 on a virtual server where I have root access. On this virtual server I have already installed Apache, version 2.2.22 and I don't want to use Ngnix for GitLab. Now I have no idea where the public folders of GitLab are or what I have to do o...
With two things in mind: Unicorn is listening on 8080 (you can check this with sudo netstat -pant | grep unicorn) Your document root is /opt/gitlab/embedded/service/gitlab-rails/public You can create a new vhost for gitlab in apache with the following configuration: <VirtualHost *:80> ServerName gitlab.example.com ...
GitLab
25,785,903
17
I am asking the question here, because documentation didn't help me. During runner's setup, 2 things are being asked: url of gitlab CI coordinator and registration token. I don't get what any of them should be. As for url, it could be either url of gitlab CI web interface (ex: http://localhost:80/) ot url related to bu...
the Url is your Gitci Url. the token you mention its in your gitlabci under "runners" next to the line: "To register new runner you should the following registration token. With this token the runner will request a unique runner token and use that for future communication"
GitLab
25,752,466
17
I have built the following post-receive hook: #!/bin/sh cd /var/node/heartbeat/ || exit unset GIT_DIR echo $USER git pull --no-edit When I'm pushing to the repository the following error is returned: remote: remote: From server.net:chris/heartbeat remote: c0df678..5378ade master -> origin/master remote: remote...
To make sure this work, a git config --local -l needs to return the user name and email. If it doesn't, go to that repo on the server, and type;: git config user.name server git config user.email server@server.com
GitLab
24,850,247
17
I have set up my own server (at home) and i am reaching it via putty on my main PC. Gitlab is installed and configured, i can reach gitlab and log in. But when i try to push files (through HTTP) to my own project i get this message: POST git-receive-pack (381 bytes) remote: GitLab: You are not allowed to access master!...
I had this problem because I had master as a protected branch Once I unprotected the branch I was able to push fine
GitLab
23,973,185
17
Gitlab 6.0 was released yesterday. I am curious to know why they switched to Unicorn from Puma. Versions prior to 5 were using Unicorn. I thought switch to Puma was for the better. Is there a technical reason for this switch?
Update April 2020, GitLab 12.10: Puma will become the default application server GitLab will be switching default application servers from Unicorn to Puma in 13.0. And with GitLab 13.0 (May 2020): Reduced memory consumption of GitLab with Puma Read the last sections below. Original answer 2013 The commit 3bc4845...
GitLab
18,398,626
17
I am trying to install GITLAB. I get this error executing "sudo gem install charlock_holmes --version '0.6.9'" (section Install Gems) GEOGIT:/geogit/Administrative_Tools # sudo gem install charlock_holmes --version '0.6.9' Building native extensions. This could take a while... ERROR: Error installing charlock_holmes...
This looks like issue 1952 It was actually weirdness with the way my ubuntu VPS is commissioned. Mine did not come with a C compiler or libdev obviously. The problem fix I found was to install libdev first, then the GCC Then apt-get install libicu-dev. Update 2015: additional comments include: yum install libicu-dev...
GitLab
15,553,792
17
I'm setting up a SSH key for the first time on Gitlab.com. I'm stuck at verifying that you can connect: ssh -T git@gitlab.example.com. The gitlab.example.com you are supposed to replace with your Gitlab instance url but I keep getting "ssh: Could not resolve hostname : Name or service not known". I'm using the Gitlab S...
Correct format is ssh -T git@gitlab.com. my-workspace-name is not part of the instance url.
GitLab
72,227,848
16
I want to run jobs in the same stage sequentially instead of parallel in GitLab CI. Currently this is what I have: I want unit-test to run before integration-test and not in parallel. I have looked into the docs and have encountered DAG but it needs the job to be in a prior stage and cannot be on the same stage. Is th...
Yes its already described in the documentation for stages, jobs are started in parallel in one stage. It says: To make a job start earlier and ignore the stage order, use the needs keyword. As you said, this is not possible in GitLab < 14.2 within a stage (needs): needs: is similar to dependencies: in that it must u...
GitLab
66,434,596
16
This question asked by coderss but restarting the computer seems to noneffective. 422 The change you requested was rejected. Make sure you have access to the thing you tried to change. Please contact your GitLab administrator if you think this is a mistake. I have above error in Firefox under Linux but I have access in...
The issue should be fixed not only with cookies as discribed, but also with a correction of time system. I faced exactly the same problem: unable to connect with Firefox, even with a reset of cookies, but I was able to connect with Chrome. (That sounds strange because my clock system was false even on Chrome.) The solu...
GitLab
65,821,162
16
I went to about.gitlab.com. from there I clicked on sign in. The browser keeps showing: "Checking your browser before accessing gitlab.com.". This has been going on for 10 hours. I have Already tried clearing my cookies and restarting my pc. This did not yield any result. My firewall is turned off so it isn't a firewal...
This is so extremely frustrating and makes me want to move everything back from GitLab to GitHub. In my case, the addon that GitLab (actually cloudflare) didn't like was the Chameleon (Random Agent Spoofer) plugin, which I use to prevent tracking/fingerprinting across websites. https://addons.mozilla.org/en-US/firefox...
GitLab
65,086,187
16
I know that you can reuse blocks of code in a before script using yaml anchors: .something_before: &something_before - echo 'something before' before_script: - *something_before - echo "Another script step" but this doesn't seem to work when the .something_before is declared in a shared .yml file via the incl...
You can use the !reference tag. .something: before_script: - echo 'something before' before_script: - !reference [".something", "before_script"] - echo "Another script step"
GitLab
61,875,759
16
I want to set up a CI/CD pipelines in Gitlab that can read the latest tag and get that last tag to increment my next version application. I came with this configuration: stages: - version calculate_version: image: name: alpine/git:latest entrypoint: [""] stage: version script: - VERSION=$(git tag);...
You can obtain tags using Gitlab API By default, results are ordered by the last updated tags, so if you want to get the last one, you can modify your script block like this: script: - VERSION=$(curl -Ss --request GET --header "PRIVATE-TOKEN: <REPLACE_BY_A_VARIABLE>" "https://gitlab.com/api/v4/projects/${CI_PROJECT_I...
GitLab
59,948,031
16
Local Setup I created a public and private SSH key via the ssh-keygen command. I decided to setup the private key locally first, before setting it up on my repo's gitlab CI. I setup the public key on the server (in this case, another gitlab repo, but this may change in the future and shouldn't affect the question). I s...
You may need to try setting the mode to 644 rather than 700. 644 is what is suggested in the Verifying the SSH host keys documentation, and is also what SSH uses for this file by default. Some parts of SSH are very particular about this - I'm not sure if known_hosts is particular. The docs also mention you should set...
GitLab
57,290,734
16
We have a continuously growing collection of Gitlab CI variables (around 40-50) in our current project. All these variables are used during our CI/CD pipeline and are crucial for our production environment. I want to generate backups in regular intervals in case someone messes with these variables. Unfortunately, I do ...
You can use the API in order to query all variables. For example: curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/variables/TEST_VARIABLE_1" See: https://docs.gitlab.com/ce/api/project_level_variables.html#show-variable-details
GitLab
56,780,817
16
This morning when I logged into GitLab I noticed this "Next" flag on the top bar: It appears whether I am logged in or not. What does "Next" indicate? A Google search turns up nothing. It doesn't appear in any GitLab screen shots I am able to find either.
This is the canary version of Gitlab you are being served, you can find out more here: https://about.gitlab.com/handbook/engineering/#canary-testing You can swap the version of Gitlab you see here: https://next.gitlab.com/?nav_source=navbar The reasoning behind providing the Canary versions to users either at random or...
GitLab
56,024,793
16
I would like to setup continuous deployment from a GitLab repository to an Azure App using a PowerShell script. I'm aware that you can do this manually as per: https://christianliebel.com/2016/05/auto-deploying-to-azure-app-services-from-gitlab/ However, I'm trying to automate this with Powershell. I've looked at this ...
It sounds like you are looking for a direct deploy from GitLab to Azure Apps, however I'd suggest using a deployment pipeline tool to give you far more options. Azure DevOps Services Pipelines would likely be a safe option and has a free tier and here's a very brief getting started guide for Web Apps deploys. However i...
GitLab
52,664,359
16
I recently got into CI/CD, and a good starting point for me was GitLab, since they provide an easy interface for that and i got started about what pipelines and stages are, but i have run into some kind of contradictory thought about GitLab CI running on Docker. My app runs on Docker Compose. It contains (blah blah) th...
However the .gitlab-ci.yml provides support for only one image This is not true. From the official documentation: Your image will be named after the following scheme: <registry URL>/<namespace>/<project>/<image> GitLab supports up to three levels of image repository names. Following examples of image tags are valid...
GitLab
50,637,641
16
I have a GitLab project that utilises GitLab CI. The project also uses submodules, both the project and it's submodules are under the same GitLab account. Here is my .gitmodules file [submodule "proto_contracts"] path = proto_contracts url = https://gitlab.com/areller/proto_contracts.git I also have this piece...
You must use relative URLs for submodules. Update your .gitmodules as follow: [submodule "proto_contracts"] path = proto_contracts url = ../../areller/proto_contracts.git Further reading: Using Git submodules with GitLab CI | GitLab Docs
GitLab
48,845,464
16
I am using a GitLab pipeline to run some tests and produce a coverage report. What I would like to do is be able to publish the produced coverage folder (that includes an html page and an src folder) to some internal GitLab static page, viewable by some team members. I am aware of the gitlab pages concept, but the step...
Can I use GitLab Pages on self-hosted instance? Yes, GitLab Pages works on self-hosted instances. You may need to register a wildcard domain name for *.pages.<your-gitlab-domain-name>, and generate SSL certs if you are running gitlab over https only. Once you have a domain, edit /etc/gitlab/gitlab.rb and add the extra...
GitLab
48,743,076
16
I have a GitLab repository with documentation in the attached wiki (i.e. NOT in the repo itself) and an image file inside the repository itself that I want to embed in wiki pages. How can this be done? From a wiki page, I can successfully link to the image using [[../tree/master/pathto/myimage.jpg]] or [[../raw/master/...
Embedding using the absolute path to the repo and image worked: ![](https://url.of.my.repo/raw/master/pathto/myimage.jpg)
GitLab
47,830,691
16
I want to know, if it's possible to set custom Gitlab CI variable from if-else condition statement. In my .gitlab-ci.yml file I have the following: variables: PROJECT_VERSION: (if [ "${CI_COMMIT_TAG}" == "" ]; then "${CI_COMMIT_REF_NAME}-${CI_PIPELINE_ID}"; else ${CI_COMMIT_TAG}; fi); Trying to set project version...
This is expected behavior. CI_COMMIT_TAG is only set to a value in a GitLab job. From https://docs.gitlab.com/ee/ci/variables/README.html CI_COMMIT_TAG - The commit tag name. Present only when building tags. Therefore in the variables section CI_COMMIT_TAG is not defined, hence equals to "". So if you want to use CI_...
GitLab
47,204,720
16
So I'm trying to set up a gitlab-ce instance on docker swarm using traefik as reverse proxy. This is my proxy stack; version: '3' services: traefik: image: traefik:alpine command: --entryPoints="Name:http Address::80 Redirect.EntryPoint:https" --entryPoints="Name:https Address::443 TLS" --defaultentrypoints=...
Turns out all I had to do was set the traefik label, traefik.docker.network to traefik-net, see https://github.com/containous/traefik/issues/1254
GitLab
46,698,425
16
I use gitlab-ci to test, compile and deploy a small golang application but the problem is that the stages take longer than necessary because they have to fetch all of the dependencies every time. How can I keep the golang dependencies between two stages (test and build)? This is part of my current gitlab-ci config: tes...
As mentioned by Yan Foto, you can only use paths that are within the project workspace. But you can move the $GOPATH to be inside your project, as suggested by extrawurst blog. test: image: golang:1.11 cache: paths: - .cache script: - mkdir -p .cache - export GOPATH="$CI_PROJECT_DIR/.cache" ...
GitLab
45,537,023
16
Is there a way to configure multiple specifically-named environments (specifically, test, stage, and prod)? In their documentation (https://docs.gitlab.com/ce/ci/environments.html) they talk about dynamically-created environments, but they are all commit based. My build steps are the same for all of them, save for swap...
Yes, you can use anchors. If I follow the documentation properly, you would rewrite it using a hidden key .XX and then apply it with <<: *X. For example this to define the key: .job_template: &deploy_definition environment: url: ${CI_ENVIRONMENT_SLUG}.mydomain.com scripts: - deploy ${CI_ENVIRO...
GitLab
44,287,955
16
I'd like to create a Docker based Gitlab CI runner which pulls the docker images for the build from a private Docker Registry (v2). I cannot make the Gitlab Runner to pull the image from a local Registry, it tries to GET something from a /v1 API. I get the following error message: ERROR: Build failed: Error while pull...
Current Gitlab and Gitlab Runners support this, see: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#use-a-private-container-registry On older Gitlab I've solved this with copying an auth key into ~/.docker/config.json { "auths": { "my.docker.registry.url": { ...
GitLab
38,511,864
16
i have one repository. In this repository multiple folders are available. i have required only one folder in this repository. i am already try to following command but it's not working. git clone
If only the content of that folder is of interest (not its history), you can, since GitLab 1.11 (May 2019) download only a folder. Download archives of directories within a repository Depending on the type of project and its size, downloading an archive of the entire project may be slow or unhelpful – particularly ...
GitLab
38,047,757
16
It's easy enough to create them, but I can't find out how to clone them and edit offline. Is it possible?
May 2020, for GitLab 13.0: yes! Versioned Snippets Snippets are useful for sharing small bits of code and text that may not belong in the main project’s codebase. These items are important to groups and users who rely on them for other tasks, like scripts to help generate diagnostic output or setup supporting services...
GitLab
33,906,431
16