gitlab-ci-runner

GitLab runner on Windows and dealing with & %ERRORLEVEL%

浪子不回头ぞ 提交于 2019-12-06 04:50:40
In my .gitlab-ci.yml, i am trying to use the findstr command. findstr /c:"%SOLUTION_DIR%" gitlab.dif > founded.ref This command set the %ERRORLEVEL% to 1 if it has no match of "%SOLUTION_DIR%" in gitlab.dif. It seems like GitLab runner is interpreting this as a job failure. ERROR: Job failed: exit status 1 Is there any workaround? EDIT : my .gitlab-ci.yml file stages: - check - build check_diff: stage: check script: - git diff --name-only origin/develop...HEAD > _gitlab_diff.txt - git diff --name-only HEAD~1 >> _gitlab_diff.txt artifacts: paths: - _gitlab_diff.txt only: refs: - merge_requests

GitLab Pages deployment step fails after successfull build

こ雲淡風輕ζ 提交于 2019-12-06 01:51:29
问题 I am trying to host a reveal.js presentation via gitlab pages. The repository can be found here: https://gitlab.com/JanGregor/demo-slides My .gitlab-ci.yml is fairly simple: image: node:4.2.2 pages: cache: paths: - node_modules/ script: - npm install - node_modules/.bin/gulp artifacts: paths: - build only: - master After a commit to master though, something goes wrong. The pages task itself is executed and runs just fine. It even shows in the logs that my build directory has been scanned and

How to start a service using GitLab runner and prevent it from stopping?

别等时光非礼了梦想. 提交于 2019-12-06 01:39:04
问题 I'm going to deploy simple Spring Boot application using GitLab CI server. My .gitlab-ci.yml is as follows: stages: - build_and_test - deploy web_server_build_and_test: stage: build_and_test script: - mvn clean package web_server_deploy: stage: deploy script: - mvn clean package -Pprod - service gitlab-runner-test stop - cp target/*.war /var/gitlab-runner-test/gitlab-runner-test.war - chmod +x /var/gitlab-runner-test/gitlab-runner-test.war - service gitlab-runner-test start And the deploy

GitlabCI build failed, docker.sock: write: broken pipe

倖福魔咒の 提交于 2019-12-05 21:32:43
I was trying to implement a new CI workflow using GitlabCI but now I can't understand the issue. I followed this doc and I choose the Docker socket binding method. Everything is running on the same machine, a RancherOS : $ uname -a Linux xxx 4.2.8-ckt4-rancher #1 SMP Tue Apr 5 16:12:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 57801c725226 gitlab/gitlab-runner:latest "/usr/bin/dumb-init /" 14 hours ago Up 14 hours gitlab-runner 50e3a9dabe77 gitlab/gitlab-ce "/assets/wrapper" 17 hours ago Up 17 hours 80/tcp, 443/tcp, 0.0.0.0:1022-

Gitlab-runner + Docker + Windows - Invalid volume specification

半腔热情 提交于 2019-12-05 20:40:19
问题 I'm trying to run my Gitlab CI locally using Gitlab-runner and docker before committing to make sure they work okay. But I'm having some strange issues! Unfortunately I have no choice but to use windows (I've had success in the past on Linux). Every time I run a job in powershell: C:/Gitlab-runner/gitlab-runner exec docker npm I get an error: Job failed (system failure): Error response from daemon: invalid volume specification: '/host_mnt/c/builds/project-0/Users/Lewsmith/api:C:/Users

GitLab pull submodules inside CI

别来无恙 提交于 2019-12-05 17:42:45
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 in the .gitlab-ci.yml file variables: GIT_SUBMODULE_STRATEGY: recursive However, when i run the CI I get this error fatal: could not read Username for 'https://gitlab.com': No such device or address Both the project and the submodules are in a private repository so you would expect to be

How are Gitlab CI service ports exposed?

半世苍凉 提交于 2019-12-05 16:16:14
问题 I have a .gitlab-ci.yml file: integration_test: services: - name: registry.gitlab.com/group/project/testmailserver:1.1 alias: "mail.email" stage: test script: - ./gradlew -g /cache/.gradle --stacktrace --info integrationTest The service is a full stack email server based on this: tvial/docker-mailserver:latest . Locally with my docker-compose config I'm able to run it and connect to it. version: '2' services: mail: image: registry.gitlab.com/group/project/testmailserver:1.1 hostname: mail

Windows GitLab CI Runner using Bash

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 15:44:28
问题 I'm trying to use bash as the shell on Windows for a GitLab CI Runner. concurrent = 1 check_interval = 0 [[runners]] name = "DESKTOP-RQTQ13S" url = "https://example.org/ci" token = "fooooooooooooooooooobaaaaaaaar" executor = "shell" shell = "bash" [runners.cache] Unfortunately I can not find an option to specify the actual shell program that the CI Runner should use. By default, it just tries to run bash which it can not find. I don't know why, because when I open up a Windows command line

Docker caching of .m2 doesn't work locally

只谈情不闲聊 提交于 2019-12-04 17:01:37
Consider this of .gitlab-ci.yml : variables: MAVEN_OPTS: "-Dmaven.repo.local=/root/.m2/repository" cache: key: "M2" paths: - /root/.m2/repository This works correctly when running directly in gitlab, but it doesn't work locally when running as: gitlab-runner exec docker test If I run it locally like this, I can see messages like Successfully extracted cache , but then it re-downloads all the maven dependencies, which in my case meaning downloading hundreds of megabytes. I cannot see the difference between running it locally and remotely, both of them should work the same I guess? Where is this

GitLab CI builds remains pending

为君一笑 提交于 2019-12-04 16:24:13
问题 We recently started to use GitLab-CI on the gitlab.com free service. At first everything went fine, but now, seems like we can't build our project anymore. The builds are shown as pending and doesn't do anything. Here's what we have in our builds list: And if we check the details of a build: As you might notice, in the list, each build is assigned to a runner id, but in the details page, the runner section is blank. At first, we thought it was just latency caused by gitlab.com ingrastructure,