gitlab-ci-runner

Cannot push from gitlab-ci.yml

一世执手 提交于 2020-01-22 05:19:05
问题 With my colleagues, we work on a C++ library that becomes more and more important each day. We already built continuous integration utilities through the gitlab-ci.yml file that let us: Build & Test in Debug mode Build & Test in Release mode Perform safety checks like memory leaks using Valgrind and checking if there is any clear symbol in our library we don't want inside it Generate documentation All kind of stuff that made us choose GitLab ! We would like to profile our whole library and

How to avoid password when using sudo in gitlab-ci.yml?

谁说我不能喝 提交于 2020-01-16 10:03:23
问题 I have a private docker repository where i store my build images. I did copy my registry certificates and updated my /etc/hosts file to authenticate registry from my local machine. I could login to registry with 'sudo docker login -u xxx -p xxx registry-name:port' But when i try same docker login command from gitlab-ci stage, it is failing with this error: sudo: no tty present and no askpass program specified. This is how i'm trying to achieve this. ssh manohara@${DEPLOY_SERVER_IP} "sudo

How to avoid password when using sudo in gitlab-ci.yml?

谁说胖子不能爱 提交于 2020-01-16 10:03:11
问题 I have a private docker repository where i store my build images. I did copy my registry certificates and updated my /etc/hosts file to authenticate registry from my local machine. I could login to registry with 'sudo docker login -u xxx -p xxx registry-name:port' But when i try same docker login command from gitlab-ci stage, it is failing with this error: sudo: no tty present and no askpass program specified. This is how i'm trying to achieve this. ssh manohara@${DEPLOY_SERVER_IP} "sudo

'dotnet test' is not finding nunit tests in gitlab-runner pipeline

余生颓废 提交于 2020-01-15 09:26:08
问题 I have a solution with a NUnit testproject ( Foo.Test ). +-- src | +-- Foo.Gui | +-- Foo.Test <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netcoreapp3.0</TargetFramework> <IsPackable>false</IsPackable> </PropertyGroup> <ItemGroup> <Compile Remove="TestResults\**" /> <EmbeddedResource Remove="TestResults\**" /> <None Remove="TestResults\**" /> </ItemGroup> <ItemGroup> <PackageReference Include="GitVersionTask" Version="5.1.2"> <PrivateAssets>all</PrivateAssets>

How to stop the job in gitlab-ci.yml when we have failure on previous stage

自古美人都是妖i 提交于 2020-01-15 09:11:38
问题 I have a sonar report, if quality gate passed then it will run for next stage and do deployment, if quality gates failed then stop the gitlab job. but in the job stages we have a rollback it will run when we have failure so in this case if sonar failed that rollback is executed. I want to stop the rollback execution. It should run only when we have deployment failure job stage which is basically next stage of sonar. image: maven-jdk-8 cache: paths: - ./.devops_test/ stages: - codescan -

What is the special gitlab-ci-token user?

☆樱花仙子☆ 提交于 2020-01-12 04:07:30
问题 The docs for gitlab's container registry (https://gitlab.com/help/container_registry/README.md) provide a config example with this instruction: - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.example.com and this explanation: You have to use the credentials of the special gitlab-ci-token user with its password stored in $CI_BUILD_TOKEN in order to push to the Registry connected to your project. This allows you to automated building and deployment of your Docker images. I cannot

What is the special gitlab-ci-token user?

安稳与你 提交于 2020-01-12 04:07:07
问题 The docs for gitlab's container registry (https://gitlab.com/help/container_registry/README.md) provide a config example with this instruction: - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.example.com and this explanation: You have to use the credentials of the special gitlab-ci-token user with its password stored in $CI_BUILD_TOKEN in order to push to the Registry connected to your project. This allows you to automated building and deployment of your Docker images. I cannot

How do I enable cloning over SSH for a Gitlab runner?

佐手、 提交于 2020-01-10 20:51:55
问题 I am having some trouble cloning large repositories over HTTP on my Windows Gitlab runner. I've tried several methods to do shallow clones or disable clone compression. Still no luck. Cloning the same repository over SSH works great as a temporary solution and I would like to get this working on our Gitlab CI process. The issue now stands where I have no idea how to use SSH as a clone method for the gitlab-multi-runner. It just seems to use HTTP as a default, and my only options regarding

How do I enable cloning over SSH for a Gitlab runner?

梦想与她 提交于 2020-01-10 20:51:07
问题 I am having some trouble cloning large repositories over HTTP on my Windows Gitlab runner. I've tried several methods to do shallow clones or disable clone compression. Still no luck. Cloning the same repository over SSH works great as a temporary solution and I would like to get this working on our Gitlab CI process. The issue now stands where I have no idea how to use SSH as a clone method for the gitlab-multi-runner. It just seems to use HTTP as a default, and my only options regarding

How do you push to a gitlab repo using a gitlab-ci job?

江枫思渺然 提交于 2020-01-10 14:30:38
问题 I am new to GitLab CI/CD jobs, but I'm trying to set up a Python script that when pushed to GitLab, triggers the CI/CD job to run it, and call an internal function that pushes to GitLab again provided that certain criteria are met. So, for example, suppose I have the following: def hasFileInDirectory(): # checks if the current directory has at least 1 other file in it if (1 or more files exist): print 'Great! You have enough files!'; else: print 'Oh no! You need more files! Let me create one!