最近我开始使用Codeship作为我正在维护的小型网站的CI/CD工具.我将我的Codeship项目设置为通过sftp进行部署,如其指南中所述.
它失败的部分在生产脚本中.我创建了一个deploy文件夹和一个production.sh包含以下行的脚本:
put -rp "${HOME}/clone/build/*" /path/to/remote/dir
Run Code Online (Sandbox Code Playgroud)
但是在运行构建时,我收到以下错误:
sftp> put -rp "${HOME}/clone/build/*" /path/to/remote/dir
stat ${HOME}/clone/build/*: No such file or directory
Run Code Online (Sandbox Code Playgroud)
呼应$HOME直接在Codeship测试脚本给我我的主目录,所以环境变量的作品.但是,在运行批处理脚本时,环境变量无法识别.
我怎样才能解决这个问题?我宁愿不在我的部署脚本中硬编码路径.这似乎也不可能发生,因为我加了后缀production.sh,而在文档中他们只有一个production脚本?
我正在使用CodeDeploy AWS部署系统通过Codeship部署Node.js应用程序.
我正在使用appspec.yml文件来设置其中一个已部署目录的所有者和权限.
我想允许读取/写入将在部署的指定文件夹中创建的任何文件.Web应用程序开始运行后,将创建文件.
目前我的appspec.yml包含以下内容:
version: 0.0
os: linux
files:
- source: /
destination: /var/www/APPLICATION_NAME
permissions:
- object: /var/www/APPLICATION_NAME/tmpfiles
mode: 644
owner: ec2-user
type:
- directory
Run Code Online (Sandbox Code Playgroud) yaml amazon-web-services continuous-deployment codeship aws-code-deploy
由于某种原因,此命令在我的本地计算机上运行良好:
mvn clean install -DskipTests=true -Psdk
Run Code Online (Sandbox Code Playgroud)
然而,对于 Codeship,它现在可以工作并抛出此“找不到符号”错误。在 Codeship 中完整的命令是:
jdk_switcher use oraclejdk8
echo $JAVA_HOME
mvn clean install -DskipTests=true -Psdk
Run Code Online (Sandbox Code Playgroud)
在 POM 存储库中有这样的内容:
mvn clean install -DskipTests=true -Psdk
Run Code Online (Sandbox Code Playgroud)
错误:
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ client-app ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 65 source files to /home/rof/src/bitbucket.org/company/client-app/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/rof/src/bitbucket.org/company/client-app/src/main/java/com/client/rest/resources/MyResource.java:[3,61] cannot find symbol
symbol: class MyEntity
Run Code Online (Sandbox Code Playgroud) 我正在构建一个有两个应用程序的应用程序,microservices并尝试CI/CD使用Codeship和编写管道原型Docker.
我对使用codeship-services.yml和使用之间的区别有点困惑docker-compose.yml.Codeship文档说 -
默认情况下,我们查找文件名codeship-services.yml.如果没有,Codeship将自动搜索docker-compose.yml文件以供其使用.
根据我的理解,docker-compose在我的情况下可能更合适,因为我想同时为所有设备启动容器microservices进行集成测试.codeship-services.yml如果我想连续地而不是并行地构建我的服务,那会有所帮助.
我的理解是否正确?
我正在阅读有关跳过构建的Codeship文档.
在提交时我很难理解正确的格式.我想跳过构建,因为我不想超过100个免费的每月构建.我会自己运行测试.
Codeship说我可以--skip-ci或者[skip ci]提交消息.我尝试过以下格式:
git commit -m "My message" --skip-ci
git commit -m "My message" [skip ci]
git commit -m -skip-ci "My message"
Run Code Online (Sandbox Code Playgroud)
这些都不起作用.什么是正确的格式?
Codeship不支持YAML配置文件,是吗?我在他们的文档页面上找不到任何关于它的文档.
我试图把文件像codeship.yml或your_config.yml在我的回购协议,但它不工作.
P/S:我知道CircleCI,TravisCI和其他人支持YAML文件,即circle.yml和.travis.yml.
我有一个一致的问题,我的 Codeship Basic 设置步骤在运行时失败npm install:
npm http GET https://registry.npmjs.org/babel-runtime
npm ERR! Error: SSL Error: CERT_UNTRUSTED
npm ERR! at ClientRequest.<anonymous> (/home/rof/.nvm/v0.6.21/lib/node_modules/npm/node_modules/request/main.js:440:26)
npm ERR! at ClientRequest.g (events.js:156:14)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1256:7)
npm ERR! at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:91:29)
npm ERR! at CleartextStream.socketOnData [as ondata] (http.js:1288:20)
npm ERR! at CleartextStream._push (tls.js:375:27)
npm ERR! at SecurePair.cycle (tls.js:734:20)
npm ERR! at EncryptedStream.write (tls.js:130:13)
npm ERR! at Socket.ondata (stream.js:38:26)
npm ERR! [Error: SSL Error: CERT_UNTRUSTED]
npm …Run Code Online (Sandbox Code Playgroud) After I run rspec in my Rails 4 project all the tests pass but I get:
Coverage (79.17%) is below the expected minimum coverage (80.00%).
Run Code Online (Sandbox Code Playgroud)
as the last line. This is causing Codeship to mark the build as failed and email me.
Is there anyway to disable this coverage test or change the minimum coverage percentage?
当我grunt test在源代码Github/Codeship中运行时,我发现以下错误.
在代码内部的setup命令中,以下代码配置如下.
nvm install 0.12.6
nvm use 0.12.6
npm install grunt-cli bower -g
npm install
bower install -p
npm run update-webdriver
Run Code Online (Sandbox Code Playgroud)
代码内的测试命令;
grunt test
Run Code Online (Sandbox Code Playgroud)
但是在我的源代码中找不到该错误,并且通过查看codeship给出的以下错误消息实际上在github/codeship中找到了该错误.因为我们在服务器中配置的文件夹结构没有定义.请帮我解决一下.谢谢.
Using 2 x hasMany to represent N:M relations has been deprecated. Please use belongsToMany instead
>> Mocha exploded!
>> /home/rof/src/github.com/MyProjects/node_modules/sparkpost/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js:5
>> const Hoek = require('hoek');
>> ^^^^^
>> SyntaxError: Use of const in strict mode.
>> at exports.runInThisContext (vm.js:73:16)
>> at Module._compile (module.js:443:25)
>> at Object.Module._extensions..js (module.js:478:10)
>> at Module.load (module.js:355:32)
>> …Run Code Online (Sandbox Code Playgroud)