Tag: docker gitlab

什么是特殊的gitlab-ci-token用户?

gitlab的容器registry文档( https://gitlab.com/help/container_registry/README.md )提供了这个指令的configuration示例: – docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.example.com 这个解释是: You have to use the credentials of the special gitlab-ci-token user with its password stored in $CI_BUILD_TOKEN in order to push to the Registry connected to your project. This allows you to automated building and deployment of your Docker images. 我找不到有关这个特殊的gitlab-ci-token用户的任何文档,也没有关于$CI_BUILD_TOKEN var的$CI_BUILD_TOKEN 。 […]

在Docker上使用caching的Gitlab CI runnerconfiguration

我似乎无法得到caching或工件之间的工作之间的gitlab CI。 我怀疑这是与我的configuration有关,但我不知道是什么。 我正在使用以下docker-composeconfiguration在docker中运行gitlab和gitlab-ci-multirunner。 为了简洁,我省略了数据库configuration和一些环境variables: version: '2' services: gitlab: image: sameersbn/gitlab:8.5.1 links: – redis:redisio – postgresql:postgresql ports: – "10080:80" – "10022:22" environment: … volumes: – gitlab_data:/home/git/data gitlab-ci-runner: restart: always image: gitlab/gitlab-runner volumes: – gitlab_runner_config_data:/etc/gitlab-runner – /var/run/docker.sock:/var/run/docker.sock – /etc/nginx/ssl/gitlab.crt:/etc/gitlab-runner/certs/ca.crt – /etc/ssh:/ssh links: – gitlab:gitlab redis: … postgresql: … volumes: postgresql_data: redis_data: gitlab_data: gitlab_runner_config_data: 运行器configuration( config.toml )是: […]

在Synology NAS上使用Docker在GitLab上启用SSL

我通过Docker容器中的Synology NAS(DSM 5.2)上的官方GitLab软件包安装了GitLab。 我现在想通过https访问Web接口,而不仅仅是http。 我曾在几个post中看到有可能用一些docker魔法,但没有find任何详细的说明。 任何人都可以请解释如何做到这一点? 可惜这不是默认的。

sshd将git用户的login信息转发到(GitLab)Docker容器

我想在我的主机上configurationsshd,将某个用户的公钥login转发到一个运行自己的sshd服务的Docker容器。 为了给出一些上下文,我让GitLab在一个Docker容器中运行,并且我不喜欢在主机上打开另一个用于SSH GitLab通信的端口,而是在主机上使用sshdredirect用户,直接键入GitLab在本地公开的端口机。 我的想法是做这样的事情: Match User git ForceCommand ssh -p <GitLab port> <some arguments that forward to> git@localhost … 非常感谢帮助!

Gitlab docker执行程序 – 在before_script之后caching图像

在gitlab-ci中, .gitlab-ci.yml文件中有一个选项可以在任何实际脚本运行之前执行命令,称为before_script 。 .gitlab-ci.yml示例说明在这里安装辅助程序。 不过,我注意到,在使用Docker执行程序时,这些更改不会caching在Docker中。 我曾经天真地认为运行这些命令后,docker会caching图像,所以对于下一次运行或testing,docker只会加载before_script之后生成的caching图像。 这将大大加快构build。 作为一个例子,我的.gitlab-ci.yml看起来有点像: image: ubuntu before_script: – apt-get update -qq && apt-get install -yqq make … build: script: – cd project && make 一个可能的解决scheme是去亚军机器和创build一个docker的形象,可以build立我的软件没有任何其他的安装,然后在yaml文件的image部分引用它。 不利的一面是,无论何时我想添加一个依赖项,我都需要login到亚军机器,并在构build成功之前更新镜像。 如果我只需要将依赖关系添加到apt-get install的末尾,并使用docker / gitlab-ci来处理相应的caching,那将会更好。 在.gitlab-ci.yml还有一个cache命令,我尝试设置为.gitlab-ci.yml untracked: true ,我认为这会caching一切不是我的项目的副产品,但它似乎没有任何效果。 有没有什么办法可以得到我想要的行为?

GitLab-CI多跑步者启动docker集装箱

我还是不太了解gitlab-ci multi runner启动docker的过程,并与代码进行交互。 是否有可能让一个gitlab-ci多运行器启动一个docker容器,该docker容器包含在这个docker容器中的当前代码,然后对这个代码运行testing? (例如:代码linting) 我基本上想要一个有各种棉绒的docker集装箱。 GitLab-CI多运行程序应运行在主机系统上并按需启动Docker容器。 在Docker容器中,代码应该以phpcs为例进行检查。 如何将回购码存入docker集装箱? 谢谢您的帮助

gitlab-ci-runnerselect执行者“请input执行者:”

我已经通过gitlab-ci-multi-runner在容器中运行gitlab-ci-multi-runner 。 当我在容器中执行gitlab-ci-multi-runner register时,它会询问 请input执行者:docker …? 如果我selectdocker ,是否意味着docker工人集装箱将在当前的集装箱上运行? 对不起我英文不好:)

在GitLab CI中添加SSH密钥时出现语法错误

参考: https : //gitlab.ida.liu.se/help/ci/ssh_keys/README.md 以下脚本有问题。 即使我把最后一个符号从“改为”, 问题是如何修复错误,如下所示 : $ ssh-add <(echo“$ SSH_PRIVATE_KEY”)/ bin / sh:eval:line 24:syntax error:unexpected“(” before_script: # Install ssh-agent if not already installed, it is required by Docker. # (change apt-get to yum if you use a CentOS-based image) – 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' […]

为什么我的Arquillian无人机functiontesting不适用于GitLab CI?

在本地运行良好的testing在gitlab.com的GitLab CI共享运行程序上失败(MCVE在https://gitlab.com/krichter/gitlab-ci-file-creation ,日志在https://gitlab.com/krichter / gitlab-ci-file-creation / – / jobs / 40064276 ),因为在Arquillian webdriver的提取过程中,一个目录不能被创build,或者被Java认为是不存在的(见下面的细节): Nov 13, 2017 7:31:32 AM org.glassfish.deployment.admin.DeployCommand execute INFO: 664320b4-384a-414a-b0b4-546937428842 was successfully deployed in 7,496 milliseconds. Nov 13, 2017 7:31:33 AM org.arquillian.spacelift.Spacelift$SpaceliftInstance <init> INFO: Initialized Spacelift from defaults, workspace: /builds/krichter/gitlab-ci-file-creation, cache: /root/.spacelift/cache Drone: downloading phantomjs-2.1.1-linux-x86_64.tar.bz2 from https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 to /root/.arquillian/drone/phantomjs/2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2 ……………. Nov 13, 2017 […]

使用eirslett:frontend-maven-plugin在gitlab.com上运行maven

我有一个前端项目模块的maven项目,我用eirslett:frontend-maven-plugin包装。 它在当地工作正常,但在gitlab.com生成失败。 我用这个.gitlab-ci.yml启动构build: image: maven:3.3.9-jdk-8-onbuild build: script: "mvn clean install -B -X" 而这个pom.xml: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>fr.nev.oms</groupId> <artifactId>oms-frontend</artifactId> <packaging>jar</packaging> <parent> <groupId>fr.nev.oms</groupId> <artifactId>myproject</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> <build> <plugins> <plugin> <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> <version>1.3</version> <configuration> <!–<configuration>–> <nodeVersion>v4.4.7</nodeVersion> <npmVersion>3.10.5</npmVersion> <!–</configuration>–> <environmentVariables> <NODE_ENV>production</NODE_ENV> <API_URL></API_URL> <APP_VERSION></APP_VERSION> </environmentVariables> </configuration> <executions> <execution> <id>install node and npm</id> <goals> <goal>install-node-and-npm</goal> […]