构建验证
This commit is contained in:
parent
0a74007d21
commit
c8a3a7ba63
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 博客图片迁移记
|
||||
date: 2019-03-30 20:45:01
|
||||
date: 2019-4-18 10:53:34
|
||||
tags:
|
||||
- jenkins
|
||||
- nodejs
|
||||
@ -217,5 +217,16 @@ hexo.extend.filter.register('before_post_render', function(data){
|
||||
如果此时修改文章中的图片路径, 静态化之后的文件就是指向对象仓库的URL地址了
|
||||
日常编写正则处理一下( 注意使用前瞻断言, 正则尽可能精确, 避免影响到其他内容 )
|
||||
|
||||
### 5.执行构建
|
||||
### 5.验证
|
||||
以上所有做好之后, 在jenkins里面执行构建验证文件同步是否成功
|
||||

|
||||
|
||||
之前的构建步骤没什么变化, 最后调用nodejs脚本只要成功把新图片上传上去就可以了
|
||||
然后访问博客
|
||||
查看文章页面中的图片路径是否正确
|
||||

|
||||
|
||||
### 未竟的事情
|
||||
1. 脚本当中只是简单比较文件路径和文件名来确定文件是否在对象仓库存在, 并没有精确比对文件是否有差异
|
||||
严格来说应该在本地读取文件获取到md5值, 然后根据listObject接口返回拿到的md5值进行比对
|
||||
2. 上传过程的成功未进行本地md5值与服务器回传的md5值的比对, 不能确定上传过程数据的完整性
|
||||
BIN
source/images/linux/nos/执行构建.png
Normal file
BIN
source/images/linux/nos/执行构建.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
BIN
source/images/linux/nos/文章图片路径.png
Normal file
BIN
source/images/linux/nos/文章图片路径.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
Loading…
x
Reference in New Issue
Block a user