2014-05-24 72 views
3

我使用Meteor的內置託管進行登臺,使用Codeship處理持續部署。 Codeship中的所有測試和通知均按預期成功完成,但沒有任何部署。通過Codeship爲Meteor.com託管部署腳本

我的腳本:

expect -c "set timeout 60; spawn meteor deploy staging.myapp.com; expect 「Email:」 { send $METEOR_DEPLOY_EMAIL\r; expect eof } expect "Password:" { send $METEOR_DEPLOY_PASSWORD\r; expect eof }" 

當該腳本在生成過程中我看到下面的運行:

spawn meteor deploy staging.myapp.com 
=> Running Meteor from a checkout -- overrides project version (0.8.1) 
To instantly deploy your app on a free testing server, just enter your 
email address! 
ail: 

ail:是不是一個錯字......這就是Codeship顯示器。它似乎最終超時並繼續前進,儘管沒有顯示錯誤。

首次設置CI服務器(並使用Expect),所以在此先感謝您的幫助!

回答

5

想通了......有兩個語法問題:

  1. 左/右雙引號中悄悄出現(而不是 標準引號)
  2. 缺少分號

所以痕對於任何想要使用Codeship部署到* .meteor.com的腳本,這裏是工作腳本:

expect -c "set timeout 60; spawn meteor deploy example.com; expect "Email:" { send $METEOR_DEPLOY_EMAIL\r; expect eof }; expect "Password:" { send $METEOR_DEPLOY_PASSWORD\r; expect eof }" 
+0

當我運行它(有兩個變量)時,我得到以下錯誤:'執行 時丟失大括號 「expect Password:{」 無法讀取文件「0 | sh \ r;期望eof};「:沒有這樣的文件或目錄的任何想法? – phadaphunk

+0

確保語法是準確的。例如'expect」密碼:'應該是'expect'密碼:「'(注意字符串中缺少雙引號。就像你最後可能還有一個額外的分號一樣,祝你好運! –