AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[continuous-integration](server)

Martin Hope
patrickdamery
Asked: 2021-06-10 02:21:30 +0800 CST

Google Cloud Platform 如何使用 --async 标志处理数据库备份?

  • 0

我目前正在为我们公司的 CI/CD 管道添加一个额外的步骤,以便我们在进行可能在我们的数据库上运行迁移的部署之前备份数据库。

为了进行备份,我使用以下命令向 Google Cloud Platform 进行身份验证: gcloud auth activate-service-account --key-file /path/to/keyfile.json

验证后我使用命令: gcloud sql backups create --async --instance instance_name

我的问题是关于添加异步标志的含义是什么。我知道这样做意味着我的管道不会等待备份完成再继续下一步,但是,如果下一步涉及运行可能会破坏某些东西的迁移,这是否意味着我在上一步可能最终处于迁移已部分运行的中间状态?

谷歌实际上是如何处理备份创建的?他们是否在那个时间点对数据库进行快照,然后从中进行备份?删除 --async 标志以确保在运行任何潜在迁移之前完成备份会更安全吗?

我试过查看文档,但并没有真正详细说明这一点。

backup sql google-cloud-platform postgresql continuous-integration
  • 2 个回答
  • 166 Views
Martin Hope
Kokos Bot
Asked: 2021-02-11 18:47:20 +0800 CST

Kaniko(GitLab CI,K8s)无法推送到 Nexus Repository Manager:UNAUTHORIZED:未授权访问请求的资源

  • 1

我的 GitLab CI 作业使用 Kaniko 在 K8s 上使用 GitLab 运行器构建示例容器映像。所有服务都在我的 LAN 中,位于静态 IP 后面。构建过程从安全域 A 下的第一个 Nexus 注册表服务中提取 ArchLinux 映像。然后我尝试将其推送到同一个 Nexus 注册表到第二个域 B 下的第二个快照存储库中。因此我使用相同的 Nexus 用户。如果作业尝试推送,则会导致以下错误:

$ /kaniko/executor  --context $CI_PROJECT_DIR  --dockerfile $CI_PROJECT_DIR/Dockerfile  --destination ${SNAPSHOT_CONTAINER_REGISTRY}/${IMAGE_NAME}

error checking push permissions -- make sure you entered the correct tag name, 
and that you are authenticated correctly, and try again: 
checking push permission for "B/example-app:dev-proto-kokosbot": 
POST https://B/v2/example-app/blobs/uploads/: 
UNAUTHORIZED: access to the requested resource is not authorized

即使我授予 cicd 用户管理员权限,我也无法超越 kaniko。使用 docker CLI 推送没有问题,我可以在浏览器中访问错误的 URL,它可以工作......

我的 CI 配置:

stages:
  - build

variables:
  COMMIT_SHORT_SHA: ${CI_COMMIT_SHA} at ${CI_COMMIT_BRANCH}
  IMAGE_NAME: example-app:${CI_COMMIT_BRANCH}
  
build-job:
  stage: build
  image:
    name: gcr.io/kaniko-project/executor:debug
    entrypoint: [""]
  script:
    - echo [INFO] Start building container ${IMAGE_NAME}
    - echo [INFO] Target container registry ${SNAPSHOT_CONTAINER_REGISTRY}
    - mkdir -p /kaniko/.docker
    - |
      echo "{\"auths\":{
        \"${CONTAINER_REGISTRY}\":{
          \"auth\":\"${AUTH_REGISTRY}\"
          }
        },
        \"${SNAPSHOT_CONTAINER_REGISTRY}\":{
          \"auth\":\"${AUTH_REGISTRY}\"
          }
        }        
      }" > /kaniko/.docker/config.json
    - less /kaniko/.docker/config.json
    - >
      /kaniko/executor 
      --context $CI_PROJECT_DIR 
      --dockerfile $CI_PROJECT_DIR/Dockerfile 
      --destination ${SNAPSHOT_CONTAINER_REGISTRY}/${IMAGE_NAME}
      --no-push
    - >
      /kaniko/executor 
      --context $CI_PROJECT_DIR 
      --dockerfile $CI_PROJECT_DIR/Dockerfile 
      --destination ${SNAPSHOT_CONTAINER_REGISTRY}/${IMAGE_NAME} 

我不知道从哪里开始理解这个问题,有没有人有线索?

问候, Kokos Bot。

  • GitLab CE
  • Nexus Repository Manager:免费版

编辑:我是否正确理解只是无法识别用户?用户被称为 CICD 而不是 *UNKOWN。

连结日志:

nexus_1  | 2021-02-11 06:48:20,719+0000 INFO  [qtp874955081-232] *UNKNOWN org.apache.shiro.session.mgt.AbstractValidatingSessionManager - Enabling session validation scheduler...
nexus_1  | 2021-02-11 06:48:20,739+0000 INFO  [qtp874955081-232] *UNKNOWN org.sonatype.nexus.internal.security.anonymous.AnonymousManagerImpl - Loaded configuration: OrientAnonymousConfiguration{enabled=false, userId='anonymous', realmName='NexusAuthorizingRealm'}
nexus_1  | 2021-02-11 06:48:20,741+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Servicing: GET /repository/dio-container-snapshot/v2/ (https://snapshot.container.ABC.ABC/repository/dio-container-snapshot/v2/)
nexus_1  | 2021-02-11 06:48:20,742+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Parsed path: RepositoryPath{repositoryName='dio-container-snapshot', remainingPath='/v2/'}
nexus_1  | 2021-02-11 06:48:20,742+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Looking for repository: dio-container-snapshot
nexus_1  | 2021-02-11 06:48:20,743+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Repository: RepositoryImpl$$EnhancerByGuice$$765e645e{type=hosted, format=docker, name='dio-container-snapshot'}
nexus_1  | 2021-02-11 06:48:20,743+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Dispatching to view facet: org.sonatype.nexus.repository.view.ConfigurableViewFacet$$EnhancerByGuice$$d744b4fe@6a0c93a4
nexus_1  | 2021-02-11 06:48:20,745+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.HttpResponseSenderSelector - Looking for HTTP response sender: docker
nexus_1  | 2021-02-11 06:48:20,747+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Router - Request: Request{action='GET', path='/v2/', parameters={}, payload=HttpRequestPayloadAdapter{contentType='null', size=-1}, multipart=false}
nexus_1  | 2021-02-11 06:48:20,748+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.matchers.logic.AndMatcher - Matching: org.sonatype.nexus.repository.view.matchers.ActionMatcher@2503258 AND LiteralMatcher{literal='/v2/', ignoreCase=true}
nexus_1  | 2021-02-11 06:48:20,748+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.matchers.LiteralMatcher - Matching: /v2/=/v2/ ignore-case: true
nexus_1  | 2021-02-11 06:48:20,749+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Context - Starting: Route{matcher=AndMatcher{matchers=[org.sonatype.nexus.repository.view.matchers.ActionMatcher@2503258, LiteralMatcher{literal='/v2/', ignoreCase=true}]}, handlers=[org.sonatype.nexus.repository.view.handlers.TimingHandler@38a76c9d, org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure1@64b09cb9, org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure18@60e34347, org.sonatype.nexus.repository.security.SecurityHandler@63226ff1, org.sonatype.nexus.repository.view.handlers.HandlerContributor@60e2348c, org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure2@57297d]}
nexus_1  | 2021-02-11 06:48:20,749+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Context - Proceeding: org.sonatype.nexus.repository.view.handlers.TimingHandler@38a76c9d
nexus_1  | 2021-02-11 06:48:20,749+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Context - Proceeding: org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure1@64b09cb9
nexus_1  | 2021-02-11 06:48:20,752+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Context - Proceeding: org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure18@60e34347
nexus_1  | 2021-02-11 06:48:20,752+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Context - Proceeding: org.sonatype.nexus.repository.security.SecurityHandler@63226ff1
nexus_1  | 2021-02-11 06:48:20,800+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Router - Response: Response{status=Status{successful=false, code=401, message='null'}, payload=StringPayload{size=113, charset=UTF-8, contentType='application/json'}}
nexus_1  | 2021-02-11 06:48:20,801+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Request: Request{action='GET', path='/v2/', parameters={}, payload=HttpRequestPayloadAdapter{contentType='null', size=-1}, multipart=false}
nexus_1  | 2021-02-11 06:48:20,801+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.DefaultHttpResponseSender - Sending response: Response{status=Status{successful=false, code=401, message='null'}, payload=StringPayload{size=113, charset=UTF-8, contentType='application/json'}}
nexus_1  | 2021-02-11 06:48:20,806+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Service completed
nexus_1  | 2021-02-11 06:48:20,820+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Servicing: POST /repository/dio-container-snapshot/v2/example-app/blobs/uploads/ (https://snapshot.container.ABC.ABC/repository/dio-container-snapshot/v2/example-app/blobs/uploads/)
nexus_1  | 2021-02-11 06:48:20,821+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Parsed path: RepositoryPath{repositoryName='dio-container-snapshot', remainingPath='/v2/example-app/blobs/uploads/'}
nexus_1  | 2021-02-11 06:48:20,821+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Looking for repository: dio-container-snapshot
nexus_1  | 2021-02-11 06:48:20,821+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Repository: RepositoryImpl$$EnhancerByGuice$$765e645e{type=hosted, format=docker, name='dio-container-snapshot'}
nexus_1  | 2021-02-11 06:48:20,821+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Dispatching to view facet: org.sonatype.nexus.repository.view.ConfigurableViewFacet$$EnhancerByGuice$$d744b4fe@6a0c93a4
nexus_1  | 2021-02-11 06:48:20,822+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.HttpResponseSenderSelector - Looking for HTTP response sender: docker
nexus_1  | 2021-02-11 06:48:20,822+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Router - Request: Request{action='POST', path='/v2/example-app/blobs/uploads/', parameters={}, payload=HttpRequestPayloadAdapter{contentType='application/json', size=0}, multipart=false}
nexus_1  | 2021-02-11 06:48:20,822+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.matchers.logic.AndMatcher - Matching: org.sonatype.nexus.repository.view.matchers.ActionMatcher@2503258 AND LiteralMatcher{literal='/v2/', ignoreCase=true}
nexus_1  | 2021-02-11 06:48:20,823+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.matchers.logic.AndMatcher - Matching: org.sonatype.nexus.repository.view.matchers.ActionMatcher@2fb965f0 AND OrMatcher{matchers=[org.sonatype.nexus.repository.view.matchers.token.TokenMatcher@6264781a, org.sonatype.nexus.repository.view.matchers.token.TokenMatcher@3679c546]}
nexus_1  | 2021-02-11 06:48:20,823+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.matchers.logic.AndMatcher - Matching: org.sonatype.nexus.repository.view.matchers.ActionMatcher@291c9924 AND OrMatcher{matchers=[org.sonatype.nexus.repository.view.matchers.token.TokenMatcher@4deeef12, org.sonatype.nexus.repository.view.matchers.token.TokenMatcher@c0bea1d]}
nexus_1  | 2021-02-11 06:48:20,823+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.matchers.logic.AndMatcher - Matching: org.sonatype.nexus.repository.view.matchers.ActionMatcher@74a04d2f AND org.sonatype.nexus.repository.view.matchers.token.TokenMatcher@39b83f26
nexus_1  | 2021-02-11 06:48:20,823+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.matchers.logic.AndMatcher - Matching: org.sonatype.nexus.repository.view.matchers.ActionMatcher@314d17c AND org.sonatype.nexus.repository.view.matchers.token.TokenMatcher@501c8801
nexus_1  | 2021-02-11 06:48:20,824+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.matchers.token.TokenMatcher - Matching: /v2/example-app/blobs/uploads/~=TokenParser{pattern=\Q/v2/\E(?<name>.+)\Q/blobs/uploads/\E, variables=[var(name,.+)]}
nexus_1  | 2021-02-11 06:48:20,825+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Context - Starting: Route{matcher=AndMatcher{matchers=[org.sonatype.nexus.repository.view.matchers.ActionMatcher@314d17c, org.sonatype.nexus.repository.view.matchers.token.TokenMatcher@501c8801]}, handlers=[org.sonatype.nexus.repository.view.handlers.TimingHandler@38a76c9d, org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure1@64b09cb9, org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure18@60e34347, org.sonatype.nexus.repository.security.SecurityHandler@63226ff1, org.sonatype.nexus.repository.view.handlers.HandlerContributor@60e2348c, org.sonatype.nexus.repository.storage.UnitOfWorkHandler@7ba0816b, org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure3@4f48429e]}
nexus_1  | 2021-02-11 06:48:20,825+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Context - Proceeding: org.sonatype.nexus.repository.view.handlers.TimingHandler@38a76c9d
nexus_1  | 2021-02-11 06:48:20,825+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Context - Proceeding: org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure1@64b09cb9
nexus_1  | 2021-02-11 06:48:20,825+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Context - Proceeding: org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure18@60e34347
nexus_1  | 2021-02-11 06:48:20,826+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Context - Proceeding: org.sonatype.nexus.repository.security.SecurityHandler@63226ff1
nexus_1  | 2021-02-11 06:48:20,827+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.view.Router - Response: Response{status=Status{successful=false, code=401, message='null'}, payload=StringPayload{size=113, charset=UTF-8, contentType='application/json'}}
nexus_1  | 2021-02-11 06:48:20,827+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Request: Request{action='POST', path='/v2/example-app/blobs/uploads/', parameters={}, payload=HttpRequestPayloadAdapter{contentType='application/json', size=0}, multipart=false}
nexus_1  | 2021-02-11 06:48:20,828+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.DefaultHttpResponseSender - Sending response: Response{status=Status{successful=false, code=401, message='null'}, payload=StringPayload{size=113, charset=UTF-8, contentType='application/json'}}
nexus_1  | 2021-02-11 06:48:20,828+0000 DEBUG [qtp874955081-232] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Service completed
kubernetes gitlab containers nexus continuous-integration
  • 1 个回答
  • 1598 Views
Martin Hope
jrd1989
Asked: 2020-11-19 11:14:05 +0800 CST

构建管道 ARM 模板 - TFS 2018

  • 0

我的客户使用TFS 2018 作为他们的 CI/CD 工具。我知道您可以使用 TFS 将ARM 模板部署到Azure,但我以前从未这样做过。我通常只使用门户或 powershell。我知道我需要创建一个管道来执行部署,但我还有一些其他问题让我感到困惑:

  1. 如果基础设施没有改变(或几乎没有改变), ARM 模板是否需要构建和发布 管道(两者)?我的印象是大多数人使用构建管道来验证模板或他们的代码,然后发布是部署到天蓝色或任何地方。
  2. 我可以使用一个包含我所有资源的单个 ARM 模板进行部署,还是必须部署单个模板(ASP,然后是 Web 应用程序,然后是存储帐户,然后是 Redis)?
  3. 在我部署任何东西之前需要一个资源组。我是否可以在 ARM 模板中包含其他所有内容(RG + 一个模板中的所有资源)中的资源组创建步骤,或者我需要一个 RG 模板,然后是其他模板?
  4. 如果它们是多个环境(开发、测试、产品),我是否需要为每个环境提供多个构建/发布管道,或者是否可以配置指向每个环境的管道?每个环境中的资源都会有不同的命名约定,所以除了必须更新 ARM 模板中的值之外,我不确定这会如何影响其他事情。

对于上述问题,我将不胜感激任何建议/建议,谢谢!

team-foundation-server deployment azure azure-arm-template continuous-integration
  • 2 个回答
  • 91 Views
Martin Hope
drum
Asked: 2020-05-01 14:36:40 +0800 CST

Cloud Build:如何根据目录是否被修改来限制何时构建?

  • 3

我在 GCP 中有一个 Cloud Build,它从 github 中提取并在 PR 合并到 master 时构建图像。但是,我想限制构建仅在特定文件夹被修改时发生。通过指定触发规则,TeamCity 中有类似的功能。

google-cloud-platform continuous-integration
  • 1 个回答
  • 1664 Views
Martin Hope
natke
Asked: 2016-12-17 14:51:55 +0800 CST

Docker FROM 版本可以包含变量吗?

  • 1

我怀疑这个问题的答案是否定的,因为 FROM 命令首先出现在文件中(在任何 ENV 语句之前),但是您可以参数化创建 docker 容器的基本映像的版本吗?

例如

FROM image-name:4.6.${patchVersion}

我看这个的原因是为了支持 CI/CD。我已经将构建容器和部署容器分开了,部署容器的patchVersion由构建生成。我也想这样生成构建容器的补丁号,然后从部署容器中引用这个

docker continuous-integration
  • 1 个回答
  • 67 Views
Martin Hope
Stefan
Asked: 2016-07-12 11:39:46 +0800 CST

TravisCI 不上传使用 grunt 创建的文件

  • 1

下面是我的 .travis.yml,我正在使用 grunt 编译我的 sass,并最小化似乎可以正常工作的 js 和图像,但是这些文件都没有部署到 Elastic Beanstalk。我skip_cleanup: true根据文档添加了应该解决此问题的内容,但无济于事。

language: php

before_install:
  - nvm install 0.10.38
  - npm set progress=false
  - npm install -g grunt-cli grunt grunt-bower -loglevel=error
  - gem install dpl

script:
  - echo "success"

before_deploy:
  - cd ${TRAVIS_BUILD_DIR}/wp-content/themes/myapp && npm install --loglevel=error
  - cd ${TRAVIS_BUILD_DIR}/wp-content/themes/myapp && grunt build
  - cd ${TRAVIS_BUILD_DIR}
  - ls ${TRAVIS_BUILD_DIR}/wp-content/themes/myapp

env:
  - ELASTIC_BEANSTALK_LABEL=$TRAVIS_COMMIT

deploy:
  skip_cleanup: true
  provider: elasticbeanstalk
  region: us-east-1
  app: App
  env: app-staging
  bucket-name: elasticbeanstalk-us-east-1-AAAAAAAA123
  access_key_id: ${STAGING_AWS_ACCESS_KEY_ID}
  secret_access_key: ${STAGING_AWS_SECRET_KEY}  
  on:
    branch: staging
amazon-web-services elastic-beanstalk continuous-integration
  • 2 个回答
  • 174 Views
Martin Hope
Rich
Asked: 2016-06-01 03:09:29 +0800 CST

Jenkins 为新分支构建监视并构建命名分支

  • 3

我想配置一个单一的 Jenkins 构建(“工作”),它会:

  1. 注意新的分支并在它们出现时构建它们
  2. 根据请求构建命名分支或提交

我可以通过将“要构建的分支”设置为“**”来实现(1)

我可以通过使构建参数化并将“要构建的分支”设置为“$branch”来实现(2)(如本教程)

有没有办法同时做到这两点?

动机

我对 (1) 的用例是我希望在合并到 master 之前测试“功能分支”,因此我们可以在代码审查/拉取请求时查看更改是否通过了所有测试。

我对 (2) 的用例是,有时构建会由于虚假原因(如不稳定的测试)而失败,我想重新运行它,或者旧分支可能已经从历史的底部掉了下来,我想重新-运行它的测试。

configuration jenkins continuous-integration
  • 2 个回答
  • 2827 Views
Martin Hope
Mr_LinDowsMac
Asked: 2012-06-30 13:49:21 +0800 CST

在 TeamCity 中构建时捆绑安装

  • 4

我正在尝试在 TeamCity 中运行构建。我试图为单元测试构建的应用程序是用 Ruby on Rails 编码的。

克隆构建失败后,我将 VCS 根目录配置为从我的存储库中获取。这里是:

Bundler::GemNotFound: Could not find gem 'devise (= 2.1.0) ruby' in the gems available on this machine.

Stacktrace:
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:287:in `resolve'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:346:in `block in resolve_requirement'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:344:in `catch'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:344:in `resolve_requirement'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:295:in `block in resolve'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:294:in `reverse_each'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:294:in `resolve'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:161:in `start'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:128:in `block in resolve'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `catch'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `resolve'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/definition.rb:192:in `resolve'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/definition.rb:127:in `specs'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/definition.rb:172:in `specs_for'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/definition.rb:161:in `requested_specs'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/environment.rb:23:in `requested_specs'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:11:in `setup'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler.rb:107:in `setup'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/setup.rb:17:in `<top (required)>'
/usr/local/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
/usr/local/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
/usr/local/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
/root/TeamCity/buildAgent/work/a85b8d8560bb396b/config/boot.rb:10:in `<top (required)>'
/usr/local/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/local/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/root/TeamCity/buildAgent/work/a85b8d8560bb396b/config/application.rb:1:in `<top (required)>'
/usr/local/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/local/rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/root/TeamCity/buildAgent/work/a85b8d8560bb396b/Rakefile:5:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
/root/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rake_ext.rb:314:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
/root/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rake_ext.rb:314:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.2-p320@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/root/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rake_ext.rb:179:in `run'
/root/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rakerunner.rb:40:in `<main>'

Source: /root/TeamCity/buildAgent/work/a85b8d8560bb396b/Rakefile:5:in `<top (required)>'

似乎它需要先运行 bundle install,但是在配置中如何在 TeamCity 上执行此操作?

ruby-on-rails teamcity continuous-integration
  • 1 个回答
  • 2929 Views
Martin Hope
jackweirdy
Asked: 2012-06-11 07:54:04 +0800 CST

Jenkins CI 初始化失败

  • 0

我刚刚按照此处找到的说明在 Ubuntu 11.10 上安装了Jenkins-CI,但是该服务无法启动。错误日志显示如下:

从运行:/usr/share/jenkins/jenkins.war
2012 年 6 月 10 日 16:24:06 winstone.Logger 日志内部
信息:开始从 war 文件中提取
2012 年 6 月 10 日 16:24:10 hudson.WebAppMain contextInitialized
严重:无法初始化 Jenkins
java.lang.ExceptionInInitializerError 异常

可以在这个 pastebin上找到整个错误日志

我试过寻找类似的错误,但我找不到任何东西。任何想法,将不胜感激。

jenkins continuous-integration
  • 1 个回答
  • 1125 Views
Martin Hope
Dandikas
Asked: 2010-04-01 04:51:51 +0800 CST

跨网络拆分构建?

  • 3

是否有已知的解决方案可以跨网络机器拆分构建过程?

用例:

我们是一家普通的软件开发公司。我们拥有大约 50 个开发工作站(四核 2.66Ghz,4 GB 内存,200 GB RAID)。无需说明,在任何时候并不是每台机器都加载到最大。

任何时候都有 5 到 15 个项目同时运行。显然,它们都是在服务器上不断构建的,而不是部署到适当的环境中。单个项目构建需要 3 到 15 分钟。

问题:每当我们连续构建 5 个项目时,最后一个项目将在大约 25 - 50 分钟后准备好。并行构建并不能解决问题(构建只是游戏的一部分,而不是您需要部署、运行测试等)

是的,正确的解决方案是添加另一个构建服务器,但是“这涉及购买新的昂贵的硬件,我们已经花了很多钱!”。是的,对(该死的)!

反正。在开发人员工作站之间拆分构建怎么样?假设每当我们需要构建项目“A”时,我们检查 5 个工作站并开始构建所有未超载的工作站。如果开发人员确实需要机器的所有功能,只要至少有一台仍在构建的机器,就可以取消构建。构建完成后,可以在适当的环境中执行部署(托管在某些服务器上,而不是工作站上:))。公司越大,这对我来说就越有意义。

有人尝试过这样的事情吗?有什么好的做法吗?有什么好用的软件吗?

(90% 的项目是.net C#,平台 - Windows)

networking automation continuous-integration
  • 1 个回答
  • 1124 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve