Tag: gitlab ci

使用GitLab CI来使用ftp部署应用程序

我目前正在做一个有点Angular Web项目。 我发现这个名为Gitlab CI的伟大工具。 我阅读文档并设置节点泊坞窗来构buildWeb应用程序。 然后,我想用ftp上传应用程序到我的服务器上。 这是我的麻烦开始的地方。 首先这里是我的gitlab-ci.yml image: node:7.5.0 cache: key: "$CI_BUILD_REF_NAME" untracked: true paths: – node_modules/ – dist/ stages: – build # – test – deploy – cleanup # – deployProd runBuild: before_script: – npm install -g angular-cli – npm install stage: build script: – ng build –target=production –environment=test except: – tags runProdBuild: […]

在基于Alpine Docker的Image下运行gitlab-ci.yml脚本时出错

所以,我需要使用Gitlab CI运行部署作业时运行ssh。 我使用https://hub.docker.com/r/nmfzone/ssh-client-light/ docker映像。 但是,我不能。 因为这个错误被抛出。 Checking out 32af65e1 as development… Skipping Git submodules setup Unknown cipher type 'if [ -x /usr/local/bin/bash ]; then exec /usr/local/bin/bash elif [ -x /usr/bin/bash ]; then exec /usr/bin/bash elif [ -x /bin/bash ]; then exec /bin/bash elif [ -x /usr/local/bin/sh ]; then exec /usr/local/bin/sh elif [ -x /usr/bin/sh ]; […]

容器名称已被容器使用 – gitlab ci

在“test_image”步骤中,当我在gitlab CIpipe道中对泊坞窗图像运行testing时,出现以下错误。 我不能在本地重现它,它只发生在gitlab亚军框。 有任何想法吗? 容器名称“/ common_run_1”已被容器使用 image: docker:latest stages: – build – test – release before_script: – docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN myregistry.gitlab build_image: stage: build script: – docker build –pull -t $CONTAINER_TEST_IMAGE . – docker-compose up -d –build – docker push $CONTAINER_TEST_IMAGE pylint: stage: test script: – docker pull $CONTAINER_TEST_IMAGE – docker-compose run […]

为什么我无法将dockerized gitlab runner连接到dockerized gitlab ci?

在dockerized gitlab-runner bash上: Please enter the gitlab-ci coordinator URL (eg https://gitlab.com/): http://localhost:4311 Please enter the gitlab-ci token for this runner: xxxxxxxxxxxx Please enter the gitlab-ci description for this runner: [runner]: dockerizedrunner Please enter the gitlab-ci tags for this runner (comma separated): powershell Whether to run untagged builds [true/false]: [false]: true Whether to lock Runner to […]

无法使用Windows Server上的docker运行gitlab-ci的构build

我正在尝试为dotnet 4.6项目设置CI。 我正在使用GitLab v8.5.1共享运行程序v1.0.4。 我已经安装了支持docker的Windows Server 2016 CTP 4,并为基于microsoft windowsservercore映像的gitlab ci runner创build了一个映像。 有我的.toml concurrent = 1 [[runners]] name = "docker runner 1" url = "http://my_server/ci" token = "my_token" tls-ca-file = "" executor = "docker" builds_dir="c:\builds" [runners.docker] image = "windowsservercoregitlab:latest" host = "tcp://127.0.0.1:2375" privileged = false 和.yaml文件 阶段: – build立 job: stage: build script: – echo […]

在Gitlab CI泊坞窗环境下无法恢复mono项目的nuget包

该项目在Mono下开发,取决于一些nuget软件包。 我使用Gitlab CI来运行构build。 构build环境是docker ubuntu。 所有其他的apt-get安装都能正常工作,但不pipe怎样修改参数和NuGet.config nuget都不会恢复软件包。 我在v2和v3之间切换,并尝试了所有可以在互联网上find的讨论内容: http://blog.davidebbo.com/2014/01/the-right-way-to-restore-nuget-packages.html http://docs.myget.org/docs/how-to/package-not-found-during-package-restore 但仍然有以下错误: gitlab-ci-multi-runner 1.1.4 (9e2fd1a) Using Docker executor with image ruby:2.1 … Pulling docker image ruby:2.1 … … $ apt-get update -qq && apt-get install -y -qq $ apt-get install -y -qq mono-complete … $ wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe … $ mono nuget.exe restore monotest.sln -Source http://nuget.org/api/v2 MSBuild […]

在Gitlab CI构build中使用Docker拨号tcp I / O超时

自从几天以来我有一个问题,我不能理解,让我们放下修复。 我正在设置一个私人的Gitlab + Gitlab CI + Gitlab Dockerregistry环境来托pipe和testing我的代码,并在一个跑步者中build立它的泊坞窗图像。 我正在使用docker:dind图像在Gitlab runner中构build一个Docker镜像。 我有以下错误: gitlab-ci-multi-runner 1.3.2 (0323456) Using Docker executor with image docker:latest … Pulling docker image docker:dind … Starting service docker:dind … Waiting for services to be up and running… Pulling docker image docker:latest … Running on runner-c682f650-project-23-concurrent-0 via 4b1582b2cffb… Fetching changes… HEAD is now at 7f10ed4 […]

Gitlab CI:将Apache服务Docker DocumentRoot目录挂载到主要的Docker中

在每一个推动下,gitlab-ci启动我的主要docker my-deploy ,并将代码克隆到/builds directoy中。 现在我已经添加了一个服务docker my-apache到上面的那个。 my-apache docker设置为启动apache,使用/shared/httpd/localhost作为Apache的DocumentRoot。 基于项目的.gitlab-ci.yml如下所示: # # This starts `my-deploy` docker and links an apache service docker… # testing: stage: deploy services: – my-apache:latest script: – curl $MY_APACHE_PORT_80_TCP_ADDR 现在我想要将我的签出代码(位于目录/builds my-deploy docker中)挂载/链接到apache docker my-apache导入到dir /shared/httpd/localhost 。 挂载/链接应该是: my-deploy:/builds – > my-apache:/shared/httpd/localhost 任何想法,如果这是可能的,如何configuration呢? 我的gitlab-runner config( /etc/gitlab-runner/config.toml )将my-deploy为runner,如下所示: # Main Linter [[runners]] url = […]

挂载的docker.socklogin不存储

我正在使用gitlab CI亚军来build立一个docker形象,我想把它推到我的私人registry。 CI跑步者正在使用docker:latest并将/var/run/docker.sock挂载到容器中。 docker login -u myuser -p mypass registry.mydomain.com:5000作品,它说login成功,但是当我尝试在下一个命令我推动构build的图像我得到unauthorized: authentication required 。 docker在哪里存储login到registry? 是否有可能推到一个自定义registry有一个docker集装箱,它挂载到主机docker.sock 。 重现步骤: docker run -ti -v /var/run/docker.sock:/var/run/docker.sock docker sh docker login -u username -p password registry.myhost.com:5000 docker build -t registry.myhost.com:5000/namespace/user:latest . docker push registry.myhost.com:5000/namespace/user:latest

GitLab CI构build卡在挂起

我分叉了一个gitlab项目来帮助它,但是我的跑步者似乎被卡住了。 在gitlab的详细信息页面上,runner部分是空白的。 我在同一台家用电脑上注册了一名跑步者,我正在debugging该项目。 我的主要问题是我能做些什么来看看是什么造成的。 我不熟悉泊坞窗,所以我只做了一个docker pull python:3.5 ,希望它能工作。 我不知道如何手动testing这些命令。 我可以尝试docker run python:3.5 ,然后input安装和设置命令,但我不想污染docker的形象。 gitlab-ci.yml image: python:3.5 before_script: – pip install -r requirements.txt build: script: – python setup.py build when: on_success /etc/gitlab-runner/config.toml concurrent = 4 check_interval = 0 [[runners]] name = "Folatt's runner for ArkOS" url = "https://git.coderouge.co/ci" token = "<secret>" executor = "docker" [runners.docker] tls_verify […]