「20」博客诡异事件

博客CI CD崩了

就在刚才修改了部分的config配置,后打了tag push了上去,

oh…GG了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
err: FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
err: TypeError: Cannot read property 'enable' of undefined
err: at ***/themes/nextTheme/scripts/filters/comment/disqus.js:11:21
err: at Filter.execSync (/***/node_modules/hexo/lib/extend/filter.js:74:28)
err: at Hexo.execFilterSync (/***/node_modules/hexo/lib/hexo/index.js:432:29)
err: at module.exports (***/themes/nextTheme/scripts/events/lib/injects.js:58:8)
err: at Hexo.<anonymous> (***/themes/nextTheme/scripts/events/index.js:9:27)
err: at Hexo.emit (events.js:314:20)
err: at Hexo._generate (/***/node_modules/hexo/lib/hexo/index.js:399:8)
err: at /***/node_modules/hexo/lib/hexo/index.js:249:***
err: at tryCatcher (/***/node_modules/bluebird/js/release/util.js:16:23)
err: at Promise._settlePromiseFromHandler (/***/node_modules/bluebird/js/release/promise.js:547:31)
err: at Promise._settlePromise (/***/node_modules/bluebird/js/release/promise.js:604:18)
err: at Promise._settlePromise0 (/***/node_modules/bluebird/js/release/promise.js:649:10)
err: at Promise._settlePromises (/***/node_modules/bluebird/js/release/promise.js:729:18)
err: at Promise._fulfill (/***/node_modules/bluebird/js/release/promise.js:673:18)
err: at PromiseArray._resolve (/***/node_modules/bluebird/js/release/promise_array.js:127:19)
err: at PromiseArray._promiseFulfilled (/***/node_modules/bluebird/js/release/promise_array.js:145:14)
err: at Promise._settlePromise (/***/node_modules/bluebird/js/release/promise.js:609:26)
err: at Promise._settlePromise0 (/***/node_modules/bluebird/js/release/promise.js:649:10)
err: at Promise._settlePromises (/***/node_modules/bluebird/js/release/promise.js:729:18)
err: at Promise._fulfill (/***/node_modules/bluebird/js/release/promise.js:673:18)
err: at Promise._resolveCallback (/***/node_modules/bluebird/js/release/promise.js:466:57)
err: at Promise._settlePromiseFromHandler (/***/node_modules/bluebird/js/release/promise.js:559:17)
out: INFO Start processing
err: FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
err: TypeError: Cannot read property 'enable' of undefined
err: at ***/themes/nextTheme/scripts/filters/comment/disqus.js:11:21
err: at Filter.execSync (/***/node_modules/hexo/lib/extend/filter.js:74:28)
err: at Hexo.execFilterSync (/***/node_modules/hexo/lib/hexo/index.js:432:29)
err: at module.exports (***/themes/nextTheme/scripts/events/lib/injects.js:58:8)
err: at Hexo.<anonymous> (***/themes/nextTheme/scripts/events/index.js:9:27)
err: at Hexo.emit (events.js:314:20)
err: at Hexo._generate (/***/node_modules/hexo/lib/hexo/index.js:399:8)
err: at /***/node_modules/hexo/lib/hexo/index.js:249:***
err: at tryCatcher (/***/node_modules/bluebird/js/release/util.js:16:23)
err: at Promise._settlePromiseFromHandler (/***/node_modules/bluebird/js/release/promise.js:547:31)
err: at Promise._settlePromise (/***/node_modules/bluebird/js/release/promise.js:604:18)
err: at Promise._settlePromise0 (/***/node_modules/bluebird/js/release/promise.js:649:10)
err: at Promise._settlePromises (/***/node_modules/bluebird/js/release/promise.js:729:18)
err: at Promise._fulfill (/***/node_modules/bluebird/js/release/promise.js:673:18)
err: at PromiseArray._resolve (/***/node_modules/bluebird/js/release/promise_array.js:127:19)
err: at PromiseArray._promiseFulfilled (/***/node_modules/bluebird/js/release/promise_array.js:145:14)
err: at Promise._settlePromise (/***/node_modules/bluebird/js/release/promise.js:609:26)
err: at Promise._settlePromise0 (/***/node_modules/bluebird/js/release/promise.js:649:10)
err: at Promise._settlePromises (/***/node_modules/bluebird/js/release/promise.js:729:18)
err: at Promise._fulfill (/***/node_modules/bluebird/js/release/promise.js:673:18)
err: at Promise._resolveCallback (/***/node_modules/bluebird/js/release/promise.js:466:57)
err: at Promise._settlePromiseFromHandler (/***/node_modules/bluebird/js/release/promise.js:559:17)

简单点,显示没有enable这个属性,,,,我懵了,这部署了多少次了,没有出现这么个错误啊。

先删了js,本地跑ok了,远端挂了,又提示另一个js错误。
再删一个错误的js,再跑…又挂了!

排查…

初步定位为文件没有更到最新

本地ok,服务器部署不起来…

查下文件scp copy的工作流

看起来很简单,也很好用,但是呢,大坑来了…
当时没有选择是否选择覆盖文件:

问题点

没有覆盖配置文件,导致残留或者修改不彻底,同名的始终不修改,导致的问题。

PS:花了半个小时定位这么个rewrite的问题! 记着吧,提醒自己…

参考:

copy workflow Github
scp copy workflow