gitlab-ci-runner

Gitlab Ci unable to push on a branch from runner

自闭症网瘾萝莉.ら 提交于 2019-12-22 18:33:27
问题 I'm trying to settup a CI/CD pipelines with Gitlab Here is what I would like to do : NOTE: It's a typescript project unit tests && integration tests promote branch dev to branch integration Build docker image from branch integration deploy to integration env Here is the .gitlab-ci.yml I am using (i: stages: - test - promote - build - deploy cache: paths: - node_modules/ test: image: node stage: test before_script: - yarn script: - yarn test promote: image: node stage: promote only: - dev

Check docker run in Gitlab CICD pipeline

南楼画角 提交于 2019-12-22 14:59:25
问题 I'm using Gitlab CI/CD to build Docker images of our Node server. I am wondering if there is a way to test that docker run of the image was ok. We've had few occasions where the Docker builds but it is missing some files/env variables and it fails to start the server. Is there any way to run the docker image and test if it is starting up correctly in the CI/CD pipeline? Cheers. 回答1: With Gitlab you are able to use a docker-runner. When you use the docker-runner, and not a shell runner, a

GitlabCi deploy on multiple servers

喜夏-厌秋 提交于 2019-12-21 18:35:13
问题 I use Gitlab runner and works fine for a single server. The gitlab-ci.yml is simple: stages: - test - deploy test: stage: test image: php tags: - docker script: - echo "Run tests..." deploy: stage: deploy tags: - shell script: - sh deploy.sh As i said this is fine for a single server but to deploy same app on another server? I tried with same gitlab-runner config (same conf.toml) but then it was only updating one of them randomly. Is there somehow gitlab Ci to be triggered by more than 1

Build Error. Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages

感情迁移 提交于 2019-12-21 14:58:53
问题 Build Errors unable to find jq. Err http://deb.debian.org jessie/main amd64 Packages 404 Not Found Err http://deb.debian.org jessie-updates/main amd64 Packages 404 Not Found Fetched 723 kB in 2s (357 kB/s) W: Failed to fetch http://deb.debian.org/debian/dists/jessie/main/binary-amd64/Packages 404 Not Found W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones

GitLab CI docker in docker can't create volume

自古美人都是妖i 提交于 2019-12-21 14:26:03
问题 I'm using docker in docker to host my containers as they work through the pipeline. The container I create from my code is setup to have a volume to pass in a gcloud key to the container. This works perfectly on my local machine, but on the gitlab-runner it doesn't link correctly. From reading this appears to be because it links the host to my container, rather than the dind host to my container. How do I link the directory that is inside dind to my container? (Also ignore any minor issues

test after build would run in new environment on gitlab-ci

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 07:32:19
问题 I have the following configuration as .gitlab-ci.yml but I found out after successfully pass build stage (which would create a virtualenv called venv), it seems that in test stage you would get a brand new environment(there's no venv directory at all). So I wonder should I put setup script in before_script therefor it would run in each phase(build/test/deploy). Is it a right way to do it ? before_script: - uname -r types: - build - test - deploy job_install: type: build script: - apt-get

GitLab CI invalid argument on job for Docker build

心已入冬 提交于 2019-12-21 05:27:13
问题 So I'm trying to setup my Gitlab CI to trigger a job on git push to build and deploy my Docker. This is the .gitlab-ci.yml file I'm using based on an example from Gitlab docs (Elixir yml). stages: - build build: before_script: - docker build -f Dockerfile.build -t ci-project-build-$CI_PROJECT_ID:$CI_BUILD_REF . - docker create -v /build/deps -v /build/_build -v /build/rel -v /root/.cache/aceapp/ --name build_data_$CI_PROJECT_ID_$CI_BUILD_REF busybox /bin/true tags: - docker stage: build

How to use the new Visual Studio 2017 cmake features with gitlab CI runners

孤者浪人 提交于 2019-12-21 05:26:26
问题 I have a gitlab-ci-runner setup for linux in a straight forward way (cmake, make, make test). Here is how it roughly looks: variables: GIT_SUBMODULE_STRATEGY: recursive stages: - build - test build: stage: build script: - cd build - sh createBuildScripts.sh - cd release - make - cd ../.. artifacts: untracked: true only: - master # run tests using the binary built before test: stage: test script: - cd build - cd release - make test only: - master With Visual Studio 2017 having cmake support

GitLab-CI: Cannot link to a non running container

瘦欲@ 提交于 2019-12-20 14:06:06
问题 I've tried to get my setup work with gitlab-ci. I have a simple gitlab-ci.yml file build_ubuntu: image: ubuntu:14.04 services: - rikorose/gcc-cmake:gcc-5 stage: build script: - apt-get update - apt-get install -y python3 build-essential curl - cmake --version tags: - linux I want to get a ubuntu 14.04 LTS with gcc and cmake (apt-get version is to old) installed. If i use it locally (via docker --link command) everything works, but when the gitlab-ci-runner will process it i get the following

Gitlab-CI runner: ignore self-signed certificate

跟風遠走 提交于 2019-12-20 10:32:29
问题 gitlab-ci-multi-runner register gave me couldn't execute POST against https://xxxx/ci/api/v1/runners/register.json: Post https://xxxx/ci/api/v1/runners/register.json: x509: cannot validate certificate for xxxx because it doesn't contain any IP SANs Is there a way to disable certification validation ? I'm using Gitlab 8.13.1 and gitlab-ci-multi-runner 1.11.2. 回答1: Based on Wassim's answer, and gitlab documentation about tls-self-signed and custom CA-signed certificates, here's to save some