Tag: gitlab

Gitlab泊坞窗registry不响应远程泊坞窗拉失败

我有一个让我疯狂的问题。 Gitlab和registryconfiguration: gitlab的本地实例,使用本地不安全的registry和通过ldap进行身份validation 推送到registry – 工作正常 拉从registry(本地子网)工作正常 从registry(远程子网)拉不起来 本地拉 – 正常工作 2017-12-16_00:29:09.17848 time="2017-12-16T01:29:09.178357847+01:00" level=warning msg="error authorizing context: authorization token required" environment=production go.version=go1.8.1 http.request.host="registry:5005" http.request.id=b2247e9f-42b5-4c20-b04c-9b125d705eda http.request.method=GET http.request.remoteaddr="10.10.10.11:33634" http.request.uri="/v2/" http.request.useragent="docker/17.05.0-ce go/go1.7.5 git-commit/89658be kernel/4.4.0-79-generic os/linux arch/amd64 UpstreamClient(Go-http-client/1.1)" instance.id=1d0afa35-7874-451e-b452-8567ae67fe39 service=registry version=v2.6.1-1-gdd544a8 2017-12-16_00:29:09.17854 10.10.10.11 – – [16/Dec/2017:01:29:09 +0100] "GET /v2/ HTTP/1.1" 401 87 "" "docker/17.05.0-ce go/go1.7.5 git-commit/89658be kernel/4.4.0-79-generic os/linux arch/amd64 […]

如何在Docker执行器中运行gitlab runner中的mongodb服务

我正在尝试在gitlab中build立pipe道 ,用mongodb作为数据库来testing在laravel中写的api 。 以下是我的.gitlab-ci.yml文件。 image: registry.gitlab.com/sadhu/web:latest services: – name: mongo:3.4.10 variables: MONGO_URI: 'mongodb://mongo/demo' stages: – test unit_test: stage: test script: – npm install – composer install – cp .env.testing .env – php artisan key:generate – php artisan config:cache – php vendor/bin/phpunit –coverage-text –colors=never 但是unit testing的结果是负面的。 以下是我的unit testing的结果: 1) TestBedApiTest::testDuplicateId Expected status code 409, got 500. […]

Gitlab:遗失页面工件

我的gitlab页面无法继续进行部署事件,即使构build通过说,工件缺失。 我目前正在从https://about.gitlab.com/features/pages/和使用模板https://gitlab.com/pages/plain-html 请看截图: 撰写文件 作业 截图的截图 你可以在这里检查我的回购: https : //gitlab.com/jairus.jsx/portfolio任何帮助将不胜感激谢谢!

GitLab CI:我的testing作业不拾取MySQL容器

我有一个连接到mysql数据库的springboot应用程序。 我想使用.gitlab-ci.yml来处理pipe道。 我创build了以下configuration文件。 before_script: – echo "Execute scripts which are required to bootstrap the application. !" after_script: – echo "Clean up activity can be done here !." services: – mysql stages: – build – connect – test – package – deploy variables: MAVEN_CLI_OPTS: "–batch-mode" MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository" MYSQL_DATABASE_NAME: gyyconsortiumdb MYSQL_DATABASE_SCHEMA: "$CI_PROJECT_DIR/src/main/resources/static/sql/gyyconsortiumdb.sql" MYSQL_ROOT_PASSWORD: mysql cache: paths: – […]

为什么这个nginx反向代理configuration为gitlab不起作用

我在Docker上运行Gitlab。 当我试图把Gitlab放在一个Nginx反向代理的后面时,我总是得到404错误,因为在redirect期间URL变得不正确。 当我尝试访问http:// localhost / gitlab时 ,它redirect到http:// localhost / users / sign_in而不是http:// localhost / gitlab / users / sign_in ,最终导致404。 这是我的configuration: proxy.conf server { listen 0.0.0.0:80; access_log /var/log/nginx/gitlab_access.log; error_log /var/log/nginx/gitlab_error.log; location /gitlab/ { proxy_pass http://gitlab-ce/; proxy_read_timeout 300; proxy_connect_timeout 300; proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Frame-Options […]

在构build之间传递文件夹 – GitLab CI与Docker

我想有一个单独的docker容器,构build我的应用程序,当它完成时,它将“dist”目录传递给部署的第二个容器。 我尝试使用工件和“音量”指令,但它似乎不工作。 任何人都没有任何解决办法或解决办法? .gitlab-ci.yml stages: – build – push – deploy build_app: stage: build script: – ./deployment/build.sh tags: – shell artifacts: paths: – /dist push_app: stage: push script: – ./deployment/push.sh tags: – shell dependencies: – build_app deploy_app: stage: deploy script: – ./deployment/deploy.sh tags: – shell build.sh #!/bin/bash set -e echo "Building application" docker build -t […]

Docker化的gitlab使用主机docker到CI

我目前正在学习gitlab-ci,并进行部署。 我的gitlab实例在Docker容器中运行,我想使用主机的docker来构build和部署映像。 有这样的方法来做到这一点?

GitLab CI:如何拉动特定的docker集装箱进行部署

我正在手动在gitlab中进行生产部署。 我正在使用docker集装箱。 点击pipe道列表中的“播放”button应该进行部署。 但是,如何获取所选容器的版本? 做这个脚本总是试图拉latest版本,这不应该。 我想拉“选定”的容器。 deploy_prod: stage: deploy script: – docker pull $CI_REGISTRY_IMAGE # here selected version is missing # … when: manual environment: name: productive url: https://example.com only: – master

docker工人:gitlab + traefik&port 22

我需要在Traefik后面build立Gitlb。 一切工作,除了通过命令行的应用程序的身份validation – 我不知道如何通过traefik暴露端口22。 任何想法如何设置? 如何显示docker容器的端口22(通过traefik)? 我将默认端口从22改为10022。 我正在通过netstat -tulpn Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1132/sshd tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN 1126/systemd-resolv tcp6 0 0 :::22 :::* LISTEN 1132/sshd tcp6 0 0 :::443 :::* LISTEN 1590/docker-proxy tcp6 0 0 […]

在gitlabpipe道中安装private npm包

如果需要使用npm安装私有存储库, NPM_TOKEN需要设置环境variablesNPM_TOKEN 。 NPM_TOKEN=00000000-0000-0000-0000-000000000000 我在gitlabpipe道中的构build阶段需要安装一个私有存储库。 因此,我把这个NPM_TOKEN秘密variables放在我的gitlab pipeline设置中。 我目前的gitlab-ciconfiguration: image: x/node build_job: script: – printenv NPM_TOKEN – npm i @x/test docker图像是我只是设置一个.npmrc文件: FROM node:latest COPY .npmrc . 我在同一个目录中有.npmrc : //registry.npmjs.org/:_authToken=${NPM_TOKEN} 我已经尝试了docker形象: run -it myimage bash export NPM_TOKEN=… npm i @x/test 这工作,私人包安装。 但是,在gitlabpipe道上,它找不到包(404)。 当作业运行时,我可以清楚地看到正在打印的NPM_TOKEN envvariables。 所以我不知道发生了什么事