1、上传除了以html结尾的文件
2、以七牛云为例
官网文档(七牛云)
https://developer.qiniu.com/kodo/1302/qshell
安装
[root@dev soft]#wget http://devtools.qiniu.com/qshell-linux-x64-v2.4.2.zip
[root@dev soft]#unzip qshell-linux-x64-v2.4.2.zip
[root@dev soft]#mv qshell-linux-x64-v2.4.2 qshell
[root@dev soft]#mv qshell /usr/sbin/
[root@dev soft]# qshell -v
qshell version v2.4.1
设置密钥
[root@dev soft]qshell account zesdfHynRAt5eFn2Vm8cyhOsI3FSxxxxxOQZeIjIyYOITzgs aLXzGVvdQosv9KoZiL4z3A99z7zxxxxDmeXsdfkNrtODbw2 bfgdfg@sdv.com
查看
[root@dev soft]# qshell user ls
Name: 3dssdf@sdce.com
AccessKey: zesdfHynRAt5eFn2Vm8cyhOsI3noghintsFSxxxxxOQZeIjIyYOITzgs
SecretKey: aLXzGVvdQosv9KoZinothingsL4z3A99z7zxxxxDmeXsdfkNrtODbw2
[root@dev soft]#qshell domains xxxx空间名 获取指定空间的相关域名
sdf.sdds.com
设置自动补全
[root@dev soft]#yum install bash-completion -y
[root@dev soft]# vim ~/.bashrc
export PATH="/usr/local/anaconda2/bin:$PATH"
source <(qshell completion bash)
[root@dev soft]# source ~/.bashrc
cd /usr/local/talent/servicegroup/qshell/
设置域名
[root@dev soft]# vim /root/curexxfuxxnprdo.qshell.json
{
"hosts": {
"rs": "cucrexxfuxxnpro.csrxxefecun.com"
}
}
配置文件
[root@dev soft]# cd /usr/local/talent/servicegroup/qshell
[root@dev qshell]# vim upload.conf
{
"src_dir" : "/usr/local/talent/servicegroup/paltform_web_organization",
"bucket" : "cucrfexxfunprro", 空间
"ignore_dir" : false,
"overwrite" : true,
"check_exists" : true,
"check_hash" : true,
"check_size" : true,
"rescan_local" : true,
"skip_suffixes" : ".html,.htm",
"log_file" : "upload.log",
"log_level" : "info",
"log_rotate" : 1,
"log_stdout" : false,
"file_type" : 0
}
jenkins部分内容
#上传所有文件至cnd cucrfexxfunprro空间
DATE=`date +%Y%m%d`
cd /usr/local/talent/servicegroup/qshell/
qshell user ls
qshell account
qshell qupload -c 4 --success-list sucess${DATE}.txt --failure-list failure${DATE}.txt --overwrite-list overFile${DATE}.txt upload.conf
ls /usr/local/talcweewent/servicegroup/qshell/*.log
命令行测试命令
qshell qupload -c 4 --success-list sucess20210120.txt --failure-list failure20210120.txt --overwrite-list overFile20210120.txt upload.conf
注:我这里是以配置文件的方式上传文件至七牛云,另外也可以使用全命令行模式
------------------------------end