我注意到構建https://travis-ci.org/neverendingqs/openssl-self-signed-certificate/builds/187723295,我忘了增加標籤回購時的補丁版本。但是,即使npm發佈由於版本已經存在而失敗,構建報告爲passing
。即使npm發佈失敗,爲什麼Travis CI會報告構建成功?
這裏是日誌的末尾:
Deploying application
NPM API key format changed recently. If your deployment fails, check your API key in ~/.npmrc.
http://docs.travis-ci.com/user/deployment/npm/
~/.npmrc size: 48
npm ERR! publish Failed PUT 403
npm ERR! Linux 4.8.12-040812-generic
npm ERR! argv "/home/travis/.nvm/v0.10.48/bin/node" "/home/travis/.nvm/v0.10.48/bin/npm" "publish"
npm ERR! node v0.10.48
npm ERR! npm v2.15.1
npm ERR! code E403
npm ERR! "You cannot publish over the previously published version 1.1.5." : openssl-self-signed-certificate
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/travis/build/neverendingqs/openssl-self-signed-certificate/npm-debug.log
No stash found.
Done. Your build exited with 0.
在情況下,它是很重要的,我有test
腳本packages.json
設置爲exit 0
,但在發佈階段之前發生的,所以這不應該是問題(?)。
爲什麼Travis CI在發佈失敗時報告構建失敗?
編輯:
我用特拉維斯CI CLI通過運行travis setup npm
,基於https://docs.travis-ci.com/user/deployment/npm/建立NPM發佈。
我.travis.yml
看起來是這樣的:
language: node_js
deploy:
provider: npm
email: myemail
api_key:
secure: blahblahblah
on:
tags: true
repo: neverendingqs/openssl-self-signed-certificate
我已經更新我如何生成'.travis.yml'內容的問題。 – neverendingqs