gitlab-ci-runner

How to use Dockerfile in Gitlab CI

老子叫甜甜 提交于 2020-01-01 17:13:06
问题 Using gitlab-ci for my node/react app, I'm trying to use phusion/passenger-nodejs as the base docker image I can specify this easily in .gitlab-ci.yml: image: phusion/passenger-nodejs:latest variables: HOME: /root cache: paths: - node_modules/ stages: - build - test - deploy set_environment: stage: build script: - npm install tags: - docker test_node: stage: test script: - npm install - npm test tags: - docker However, Phusion Passenger expects you to make configuration changes, e.g. python

How do I mount a volume in a docker container in .gitlab-ci.yml?

╄→гoц情女王★ 提交于 2020-01-01 05:34:07
问题 I'm using .gitlab-ci.yml and docker as a GitLab CI runner on an Android project. At the end of the test run, gradlew saves test results in xml and html under the build directory: Finished generating test XML results (0.001 secs) into: /builds/org/project/sdk/build/test-results/release Generating HTML test report... Finished generating test html results (0.002 secs) into: /builds/org/project/sdk/build/reports/tests/release I'd like to have access to these files, but the documentation doesn't

RSA fingerprint change every time a new build is started

谁说我不能喝 提交于 2019-12-31 07:05:08
问题 I have a CI pipeline to build my android app and run instrumented test using gitlab pipelines. My gitlab runner is a ubuntu 16.04 machine running each build in a docker container. I have a physical android device connected via USB to my gitlab runner. Recently, every time a new build is triggered, I am prompted to allow the RSA fingerprint for the USB device on my android target. The problem is that the fingerprint changes with every build. I suspect that this is because a new container is

How to integrate Sonar Quality Gates with Gitlab-CI

不羁岁月 提交于 2019-12-30 03:42:07
问题 I have a gitlab-ci integration that require a sonar analysis and if the quality gates pass, to build a docker image. Is this possible using gitlab-ci ? 回答1: To break the CI build for a failed Quality Gate, 1.Search in /report-task.txt the values of the CE Task URL (ceTaskUrl) and CE Task Id (ceTaskId) 2.Call /api/ce/task?id=XXX where XXX is the CE Task Id retrieved from step 1 Ex:- https:///api/ce/task?id=Your ceTaskId 3.Wait for sometime until the status is SUCCESS, CANCELED or FAILED from

Gitlab CI job succeeds before mocha tests are run

天大地大妈咪最大 提交于 2019-12-24 08:18:15
问题 I found that my Gitlab jobs are succeeding and ending before the actual test is run. First, I installing the required dependencies for my app, then I call the mocha commands, but the job succeeds before there is any output from them. My .gitlab-ci.yml: image: node:lts-alpine stages: - test test: stage: test services: - mongo:latest script: - cd server/ - apk add --update git - apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python - npm install --quiet node-gyp -g - npm install

Gitlab runner Container hostname

大兔子大兔子 提交于 2019-12-24 07:08:33
问题 When i start a build in gitlab ci (docker executer) its creating container with name "runner-0fa22293-project-174-concurrent-0-postgres" In this what does "0fa22293-project-174-concurrent-0" represent ? What is the naming convention used here? 回答1: I believe the format is as follows: runner-<token>-project-<project ID>-concurrent-<concurrent job #> <token> is the first 8 characters of the Runner Token for the CI runner that is running the build. <project ID> is the ID of the project. The is

trigger a build on a project when a commit pushes to another project

不打扰是莪最后的温柔 提交于 2019-12-24 00:47:01
问题 I have three projects A,B,C on gitlab with a gitlab-runner machine. Project A contains gitlab-ci.yml file which calls a script to build the program when there is a commit on A: build: stage: build script: - ./build-platform.sh A depends on B and C projects. How can I trigger a build on A when there is a commit on B or C. I cannot put B,C in A and I cannot convert build-platform.sh to a gitlab-ci.yml file syntax easily. 回答1: There's a couple ways of doing what you want, but they all rely on

How to pull all alternative tags of a docker image?

让人想犯罪 __ 提交于 2019-12-24 00:24:16
问题 I administer a gitlab with build pipeline. All components are encapsulated in docker images from the official gitlab maintainer. Whenever I update - usually once a week - I need to check whether the gitlab/gitlab-runner-helper still works for the current latest version of gitlab. This can only be checked by executing a pipeline. If it does not work, the log tells me exactly what image it needs an I proceed to pull it. The image in question is also tagged with a latest tag, which I cannot use,

Gitlab CI runner not building or showing any output

北慕城南 提交于 2019-12-23 15:51:24
问题 Yesterday I upgraded from Gitlab 7.x to 8.0.4 and almost everything went smoothly. I was using the CI before without issue and after the upgrade had to migrate or start fresh. I chose to start fresh since I only had one project. I have added a new shell runner (tried both gitlab-ci-multi-runner and gitlab-runner) multiple times and registration is successful and the runner shows it's active in the web console. But when I try to build my code the only output in the browser is the black

Gitlab CI Different executor per stage

大城市里の小女人 提交于 2019-12-23 02:29:09
问题 Is it possible to have 2 stages in gitlab-ci.yml and one to be run with docker runner but the other to be run with shell? Imagine I want to run tests in a docker container but I want to run deploy stage in shell locally in the container. 回答1: Not exactly stages but you can have different jobs to be run by different runners using tags configuration option which should give you exactly what you want. Add (either during runner creation or later in Project settings -> Runners) tag docker to the