gitlab-ci

gitlab-ci.yml: 'script: -pytest cannot find any tests to check'

自作多情 提交于 2021-02-08 08:55:21
问题 I'm having trouble implementing a toy example that runs pytest within .gitlab-ci.yml gitlab_ci is a repo containing a single file test_hello.py gitlab_ci/ test_hello.py test_hello.py # test_hello.py import pytest def hello(): print("hello") def hello_test(): assert hello() == 'hello' .gitlab-ci.yml # .gitlab-ci.yml pytest: image: python:3.6 script: - apt-get update -q -y - pip install pytest - pytest # if this is removed, the job outputs 'Success' CI/CD terminal output $ pytest === test

Gitlab shared runner set concurrence for each project

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-08 05:30:45
问题 A shared runner is used by dozens of our project. I set concurrent = 5 in config.toml, so my runner can do 5 job concurrently for all project. For example, the following scenario:3 job for A project, 2 job for B project, 0 job for C project which causes C project should wait for at least 1 job of A or B project being finished until it starts first job. I want to set like "all project concurrent = 5 " and "each project concurrent = 2 ". Is there any way to deal with it? 回答1: There is an open

Failed authentication in Apple Developer Portal when execute expo build:ios

[亡魂溺海] 提交于 2021-02-07 21:27:32
问题 I'm trying to config automatically build iOS apps using Expo through Gitlab-CI . This are the commands that I am using: expo login -u expo_user -p expo_pass expo build:ios --non-interactive --apple-id my_id@domain.com --clear-dist-cert --clear-provisioning-profile --dist-p12-path "path_to_file.p12" --provisioning-profile-path "path_to_file.mobileprovision" I am already passing the respective values of this env vars: EXPO_APPLE_PASSWORD EXPO_IOS_DIST_P12_PASSWORD During the 2nd command

gitlab runner: mysqld: Can't read dir of '/etc/mysql/conf.d/'

£可爱£侵袭症+ 提交于 2021-02-07 20:48:01
问题 I use gitlab runners in docker. It uses our own php image and mysql:5.7 image. It worked before, but now we can see this error when CI job is started: Running with gitlab-runner 10.4.0 (857480b6) on gitlab-runner-2 (00929f5e) Using Docker executor with image registry.blahblah.work/infra/docker-base/php ... Starting service mysql:5.7 ... Pulling docker image mysql:5.7 ... Using docker image mysql:5.7 ID=sha256:f008d8ff927dc527c5a57251b45cead7c9259c16a6a93c144f397eaafc103d36 for mysql service..

gitlab runner: mysqld: Can't read dir of '/etc/mysql/conf.d/'

萝らか妹 提交于 2021-02-07 20:45:56
问题 I use gitlab runners in docker. It uses our own php image and mysql:5.7 image. It worked before, but now we can see this error when CI job is started: Running with gitlab-runner 10.4.0 (857480b6) on gitlab-runner-2 (00929f5e) Using Docker executor with image registry.blahblah.work/infra/docker-base/php ... Starting service mysql:5.7 ... Pulling docker image mysql:5.7 ... Using docker image mysql:5.7 ID=sha256:f008d8ff927dc527c5a57251b45cead7c9259c16a6a93c144f397eaafc103d36 for mysql service..

Gitlab-CI: conditional allow_failure

a 夏天 提交于 2021-02-07 10:20:41
问题 I recently started implementing automatic tests for my code, and I noticed that the CI does not catch the warnings of the compiler - the tests are shown as successful even when there are warnings. I have initially added a flag for the compiler to turn the warnings into errors and allow_failure=True , but the problem is that the compiler stops in the first warning->error and does not go through the entire compilation. I then used the trick explained here to write the warnings into a file, and

Gitlab-CI: conditional allow_failure

那年仲夏 提交于 2021-02-07 10:20:01
问题 I recently started implementing automatic tests for my code, and I noticed that the CI does not catch the warnings of the compiler - the tests are shown as successful even when there are warnings. I have initially added a flag for the compiler to turn the warnings into errors and allow_failure=True , but the problem is that the compiler stops in the first warning->error and does not go through the entire compilation. I then used the trick explained here to write the warnings into a file, and

Building Go apps with private modules in Docker

笑着哭i 提交于 2021-02-07 09:30:37
问题 I'm trying to build a go project in a docker container that relies on private submodules. I was hoping that --mount=type=ssh would pass my ssh credentials to the container and it'd work. Currently I can build locally with just make the GOPRIVATE variable set and the git config update. Here is my relevant Dockerfile currently # syntax = docker/dockerfile:experimental FROM golang:1.14.3-alpine AS build RUN apk add --no-cache git \ openssh-client \ ca-certificates WORKDIR /src ENV GIT_TERMINAL

How to enable AUFS on Debian?

冷暖自知 提交于 2021-02-07 01:22:30
问题 When I try to install docker via: curl -sSL https://get.docker.com/ | sh I get the message: Warning: current kernel is not supported by the linux-image-extra-virtual package. We have no AUFS support. Consider installing the packages linux-image-virtual kernel and linux-image-extra-virtual for AUFS support. However, neither package seems to exist on Debian Jessie: # apt-get install linux-image-virtual linux-image-extra-virtual Reading package lists... Done Building dependency tree Reading

Connecting to docker-in-docker from a GitLab CI runner

瘦欲@ 提交于 2021-02-04 10:46:16
问题 I have a GitLab pipeline that I want to: Build a Java app Test using docker-compose Push to my Docker repository The primary issue I'm having is that this works : services: - docker:dind docker_test: stage: docker_test image: docker:latest script: - docker version The output is printed as expected: > gitlab-ci-multi-runner exec docker --docker-privileged docker_test ... $ docker version Client: Version: 17.06.0-ce ... Server: Version: 17.06.0-ce ... Build succeeded While this does not