Tag: gitlab ci

Gitlab runner:可以运行一个依赖于另一个的docker镜像

情况如下: 我需要运行grunt serve ,在使用docker容器的持续集成过程中,在localhost:9000中为我的应用程序grunt serve服务,然后运行另一个容器,使用localhost:9000中提供的应用程序执行集成testing: 我的gitlab.yml文件 unit-testing: image: karma-testing script: – npm install && bower install && karma start && grunt serve cache: paths: – node_modules/ – bower_components/ behavior-testing: image: protractor-ci script: – npm install protractor-cucumber-framework cucumber && xvfb-run –server-args='-screen 0 1280x1024x24' protractor protractor.conf.js cache: paths: – node_modules/ – bower_components/ 第一个图像运行在本地主机:9000服务我的应用程序的grunt serve任务,我希望第二个图像使用这个正在运行的应用程序来运行另一个脚本。

在构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 […]

GitlabCI免费共享运行程序来configurationUbuntu而不是CoreOS?

我看到GitlabCI现在甚至可以在gitlab.com上为私人存储库提供免费的运行程序,这非常棒(由DigitalOcean驱动)。 然而,默认的runner似乎安装在一个CoreOS发行版中,默认情况下会生成一个docker“ruby:2.1”。 有没有一种方法来configuration这些跑步者产生一个Ubuntu 16.04 LTS泊坞窗图像呢?

新的反应,并试图编译一个APK,但失败

我试图设置一个构build过程,当我们的开发人员提交到GitLab存储库时,可以运行这个过程。 我试图让这个东西来build立APK和我用这个方法是由这个线程build议我得到的错误是在这意味着该文件aapt不存在。 虽然调查这条道路肯定存在,所以我不知道我在这里做错了什么。 我使用的docker容器是/ runmymind / docker-android-sdk /:latest然后我在/ chamunks / ReactNativeAndroid / 我不完全确定我是如何失败,因为我从来没有编译过一个Android应用程序,但这个过程是如此疯狂,使我想知道如何有人build立一个Android应用程序。

Gitlab CI:保持阶段之间的MySQL数据

如何在不同的构build阶段持续保存MySQL数据? 我把MySQL设置为服务,但是从构build阶段到部署阶段MySQL数据库是空的,我无法find任何信息。 示例gitlab-ci.yml : image: php:latest services: – mysql:5.6 stages: – build – deploy build: stage: build script: – [INSERT MYSQL DATA] allow_failure: false artifacts: when: on_success paths: – /var/lib/mysql/ deploy: stage: deploy script: – [MYSQL DUMP] dependencies: – build allow_failure: false when: on_success 即使在构build阶段成功插入数据,MySQL转储也将是空的。

使用gitlab-ci在docker中构build.NET Core项目

我想用gitlab-ci自动化我的部署过程。 我现在通过ssh手动完成。 步骤是: build立: dotnet恢复 dotnet发布 这使我的目录充满了.dll。 我想将这些部署到一个docker容器,所以我运行: dockerbuild设 docker停止 docker工人 docker运行 但是,我很难find正确的方式来做在相同的.gitlab.ci.yml文件。 我需要来自microsoft/dotnet:latest的dotnet工具microsoft/dotnet:latest的docker cli工具。 我尝试了基于这些图像的两个阶段,但输出不共享。 为了解决这个问题,我尝试使用artifact ,但是无法上传。 我在网上找不到任何这样的例子,所以我想知道我是否正在做一些不该做的事情。

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

Spread如何知道在Kubernetes中更新图像?

我想为Kubernetes设置一个Gitlab CD,并阅读这篇文章 不过,我想知道,我的K8集群是如何更新最新的Docker镜像的? 例如,在我的.gitlab-ci.yaml文件中,我将有一个build , test和release阶段,最终更新我的云.gitlab-ci.yaml镜像。 按照文章中的说明设置deploy阶段: deploy: stage: deploy image: redspreadapps/gitlabci script: – null-script 那么Spread就会知道,只要我按照 Spread 指定的K8资源的目录结构,“神奇地”更新我的K8集群(也许通过重新渲染所有映像,执行rolling-update )。

Docker构build“没有这样的文件或目录”,但与docker-compose一起工作

我尝试用gitlab注册一个图像: docker build -t registry.gitlab.com/xxx/xxx compose/base 但是我得到: 步骤4/7:COPY ./requirements / requirements lstat要求:没有这样的文件或目录 然而,构build工作: docker-compose -f dev.yml build python services: python: build: context: . dockerfile: ./compose/base/Dockerfile 文件结构: – 项目/需求 – 项目/撰写/基地 我如何复制构成什么?

数字海洋杀死docker上的构build过程

数字海洋杀鱼docker过程,为什么? cache: untracked: true key: "$CI_BUILD_REF_NAME" paths: – .yarn – node_modules/ – client/semantic/ before_script: – yarn config set cache-folder .yarn – yarn install stages: – build Compile: stage: build script: – npm run build:prod artifacts: paths: – dist/ cache: untracked: true key: "$CI_BUILD_REF_NAME" paths: – dist/ 2 minutes 34 seconds [4/4] Building fresh packages… Killed […]