标签: codeship

根据环境禁用Jasmine的fdescribe()和fit()

fdescribe()fit()当您处理一部分测试时,它们非常适合降低噪音.我有时会忘记将它们更改为describe()/ it()在将我的分支合并到主服务器之前/ 之前.(在处理代码时将它们放在单独的分支中是可以的 - 即预先提交检查对我不起作用.)

我的CI环境是Codeship.如果遇到任何有针对性的方法,是否有解决这个问题的解决方案会使Codeship中的测试失败?

使用像无焦点测试这样的东西是可以的.知道如何在Codeship中启用此规则作为错误并在本地禁用它吗?

javascript node.js jasmine codeship

19
推荐指数
2
解决办法
3289
查看次数

Docker-compose在其中一个容器上禁用输出

我正在为我的项目使用Codeship CI.我有selenium测试,我正在使用远程浏览器,selenium/standalone-firefox但它产生大量的日志,所以我想禁用selenium/standalone-firefox容器的stdout.

我有什么想法可以做到这一点?

docker codeship docker-compose

17
推荐指数
2
解决办法
7441
查看次数

SyntaxError:Web Component Tester注释时出现意外的标记ILLEGAL

我使用Codeship 基于Polymer入门套件v1.1测试我的项目.

当我npm test在测试管道内运行时,我看到以下错误:

> @ test /home/rof/src/github.com/TFarla/night-live
> gulp test:local

/home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/node_modules/lodash/index.js:8404
/**
^^^

SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:413:25)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/rof/src/github.com/TFarla/night-live/node_modules/browser-sync/lib/hooks.js:3:20)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
npm ERR! Test failed.  See above for more details.
Run Code Online (Sandbox Code Playgroud)

以下是设置命令:

# By default we use the Node.js version set in your package.json or the latest
# …
Run Code Online (Sandbox Code Playgroud)

unit-testing node.js codeship web-component-tester polymer-1.0

16
推荐指数
1
解决办法
1344
查看次数

Docker登录身份验证令牌

我正试图docker login~/.docker/config.json文件中获取身份验证.但我authconfig.json文件中看不到令牌.这是我的泊坞版.

docker version
Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Tue Mar 28 00:40:02 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Fri Mar 24 00:00:50 2017
 OS/Arch:      linux/amd64
 Experimental: true
Run Code Online (Sandbox Code Playgroud)

当我跑步时cat ~/.docker/config.json,我能看到的是

cat .docker/config.json
{
    "auths": {
        "https://index.docker.io/v1/": {}
    },
    "credsStore": "osxkeychain"
}%
Run Code Online (Sandbox Code Playgroud)

根据Codeship 文档,我应该看看

{
    "auths": {
        "https://index.docker.io/v1/": { …
Run Code Online (Sandbox Code Playgroud)

docker codeship dockerhub docker-compose macos-sierra

15
推荐指数
6
解决办法
1万
查看次数

Amazon Web Service CodeDeploy appspec.yml问题

我有一个Node.js应用程序,它使用CodeDeploy AWS部署系统通过Codeship自动部署到Amazon Web Service.

在部署过程中,我在appspec.yml中设置了要停止的当前运行的Web应用程序.部署完成后,我希望再次启动Web应用程序.

os: linux
files:
  - source: /
    destination: /var/www/app2
hooks:
  AfterInstall:
      - location: bash_scripts/stop_forever.sh
        runas: ec2-user
  ApplicationStart:
      - location: bash_scripts/start_forever.sh
        runas: ec2-user
Run Code Online (Sandbox Code Playgroud)

但是,在部署期间,我还无法从appspec.yml文件中成功调用这些脚本中的任何一个.

我在AWS部署代理日志中看到的当前错误是

Error CodeScriptMissing
Script Name /var/scripts/stop_forever.sh
MessageScript does not exist at specified location: /var/scripts/stop_forever.sh
Log TailLifecycleEvent - ApplicationStop
Run Code Online (Sandbox Code Playgroud)

这似乎是指旧版本的appspec.yml文件,它试图在不同的位置运行这些脚本.即使我已更改已部署包中的appspec.yml文件的内容,此错误消息在每次部署时保持不变.

除了上面列出的appspec.yml文件,我还尝试进行以下更改:

  • 不列出每个钩子的runas参数
  • 引用已部署目录中的脚本
  • 引用已部署目录之外的脚本
  • 版本参数初始设置为0.0

不幸的是,除了AWS文档之外,appspec.yml故障排除方面的在线数量非常少.

我做错了什么非常明显的事情?

continuous-integration yaml continuous-deployment codeship aws-code-deploy

14
推荐指数
2
解决办法
8721
查看次数

功能规格仅在CircleCI或Codeship持续集成服务上失败

我的基本功能规格在本地传递正常但在CircleCI和Codeship上失败.失败的测试:

require 'spec_helper'

describe 'Authentication' do

  describe "sign in" do
    it "is the landing page for non-authenticated users" do
      user = create(:user)
      visit root_path

      expect( page ).to have_content 'LOG IN' # On sign-in page
      fill_in 'Email', with: user.email
      fill_in "Password", with: user.password
      click_button 'Sign in'

      expect( current_path ).to eq user_path(user)
    end
  end

  describe 'registration' do
    it "allows new users to register" do
      visit root_path

      click_link 'Sign up'
      fill_in 'Email', with: 'myfake@email.com'
      fill_in 'Password', with: 'password'
      fill_in 'Password confirmation', with: 'password' …
Run Code Online (Sandbox Code Playgroud)

selenium rspec capybara circleci codeship

13
推荐指数
1
解决办法
2919
查看次数

无法将DaoAuthenticationConfigurer应用于已构建的对象

我得到了这个例外:

[WARN] org.springframework.web.context.support.GenericWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountResource': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private io.ilopezluna.japanathome.service.UserService io.ilopezluna.japanathome.web.rest.AccountResource.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.security.crypto.password.PasswordEncoder io.ilopezluna.japanathome.service.UserService.passwordEncoder; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityConfiguration': Injection of autowired dependencies failed; nested exception is …
Run Code Online (Sandbox Code Playgroud)

java spring spring-security jhipster codeship

9
推荐指数
1
解决办法
4887
查看次数

bash不会在远程ssh命令上加载节点

如果主题含糊不清,请原谅我,但我试图尽可能地描述我的问题.我有我的树莓派,我想部署使用代码.Rsyncing文件工作得很好,但是当我使用pm2我的问题重新启动我的应用程序时.

我已经使用节点版本管理器NVM安装了node和pm2.

ssh pi@server.com 'source /home/pi/.bashrc; cd project; pm2 restart app.js -x -- --prod'0 min 3 sec
bash: pm2: command not found
Run Code Online (Sandbox Code Playgroud)

我甚至添加了:

shopt -s expand_aliases在我的底部,bashrc但它没有帮助.

完成部署后,如何让它重新启动我的应用程序?在此先感谢您的圣人建议和更好的智慧!

编辑1:我的.bashrc http://pastie.org/10529200 My $ PATH:/home/pi/.nvm/versions/node/v4.2.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

编辑2:我添加/home/pi/.nvm/versions/node/v4.2.0/bin/pm2了pm2的完整路径,现在我收到以下错误:/usr/bin/env: node: No such file or directory

看来即使我提供完整路径,也不会执行节点.

linux ssh bash node.js codeship

8
推荐指数
5
解决办法
4242
查看次数

AngularJS持续部署工具

我一直在尝试使用Codeship和Heroku来持续部署我目前正在编写的AngularJS应用程序.该应用程序是使用Yeoman创建的,并使用bower和grunt.最初我认为这似乎是一个非常好的设置,因为Codeship可以免费使用,我很快就可以配置它来构建我的AngularJS项目,并且它提供了在构建之后添加部署步骤的能力.甚至有许多PaaS提供商可供选择(Heroku,S3,Google App Engine等).然而,我似乎已经变得有点卡住让Heroku上的应用程序运行.

问题始于所有文档都建议我/dist从我的路径中删除路径,.gitignore以便将此目录发布到Heroku post build.这主要来自谈论从本地机器发布到Heroku的文档,但我认为这无论如何都是Codeship所做的.我不想这样做,因为我不相信我应该检查构建输出到源代码控制.该/dist文件夹已添加到.gitignore有充分理由.此外,这种方式在某种程度上打败了CI服务器,因为我可能只是从我的机器上推出最新版本.

在进行了一些挖掘之后,我发现我可以在我的packages.json文件中添加一个postinstall步骤,例如bower install && grunt build,它将重新运行Heroku上的构建,从而重新填充所有的bower依赖项(他们希望我签入源代码的其他内容)控制!)和dist目录.

在试一试后,很明显我需要添加bowergrunt作为依赖项packages.json,这意味着移动devDependencies它们应该属于它们的位置!

所以我现在似乎陷入困境.我想要做的就是发布我的构建artefacts(/dist)依赖项(/bower_components)和server.js将运行该站点的文件.有谁知道如何使用Heroku和Codeship实现这一目标?或者,任何人都可以使用不同的工具取得成功.我正在寻找免费的东西,我愿意接受它不会生产稳定(不会扩展到多个服务器等),但现在这很好,因为我想做的就是不断部署应用程序内部测试,并能够与我的团队的非技术成员分享输出,以便我们可以讨论我们要优先考虑的功能等.

任何建议将不胜感激.

谢谢

heroku node.js continuous-deployment angularjs codeship

7
推荐指数
1
解决办法
1788
查看次数

Codeship - 捆绑安装错误(您必须使用捆绑程序 2 或更高版本与此锁定文件)

我正在尝试使用 Ruby 2.7.0 和 Rails 6.0.2.2 在 Codeship 上运行一些测试。

错误: 当我们尝试推送新的更改时,我们会收到一个构建错误,提示“您必须使用 bundler 2 或更高版本与此锁定文件”。

我尝试过的: 为了修改这一点,我尝试添加以下行:gem install -v bundler 2.1.4。但是,在将其包含在我的管道中之后,我们遇到了递归锁定错误。

当我运行'gem list | grep "bundle"' 我得到以下信息:

bundler (default: 2.1.2, 1.17.1)

Run Code Online (Sandbox Code Playgroud)

我的 Gemfile.lock 看起来像这样:

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (6.0.2.2)
      actionpack (= 6.0.2.2)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
    actionmailbox (6.0.2.2)
      actionpack (= 6.0.2.2)
      activejob (= 6.0.2.2)
      activerecord (= 6.0.2.2)
      activestorage (= 6.0.2.2)
      activesupport (= 6.0.2.2)
      mail (>= 2.7.1)
    actionmailer (6.0.2.2)
      actionpack (= 6.0.2.2)
      actionview (= 6.0.2.2)
      activejob (= 6.0.2.2)
      mail …
Run Code Online (Sandbox Code Playgroud)

ruby git ruby-on-rails codeship

7
推荐指数
2
解决办法
1888
查看次数