1 Star 0 Fork 2

WeiYuan/r5-shop-vue

forked from neruuuuuuu/r5-shop-vue 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Jenkinsfile 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
WeiYuan 提交于 2021-06-22 00:35 . fix coscmd need yes
pipeline {
agent any
stages {
stage('Install') {
steps {
echo 'Installing..'
sh 'npm install'
}
}
stage('Build') {
steps {
echo 'Building..'
sh 'npm run-script build'
}
}
stage('Archive') {
steps {
echo 'Archiving..'
archiveArtifacts artifacts: 'dist/', followSymlinks: false
}
}
stage('Deploy') {
/**
* Deploy to Tencent COS
* needed coscmd, before deploy remeber to install it on agent environment by `pip install coscmd`
*/
environment {
COS_SECRET_ID = credentials('r5-shop-cos-secret-id')
COS_SECRET_KEY = credentials('r5-shop-cos-secret-key')
COS_BUCKET = credentials('r5-shop-cos-bucket')
COS_REGION = credentials('r5-shop-cos-region')
}
steps {
echo 'Deploying....'
sh 'coscmd config -a ${COS_SECRET_ID} -s ${COS_SECRET_KEY} -b ${COS_BUCKET} -r ${COS_REGION}'
sh 'yes | coscmd -d upload -rs --delete dist/ /' //yes for "WARN: you are deleting some files in the '' cos_path, please make sure [y/N] "
}
}
stage('Clean') {
steps {
sh 'rm ~/.cos.conf' //clean the cos config include secret app key
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/WeiYuanStudio/r5-shop-vue.git
git@gitee.com:WeiYuanStudio/r5-shop-vue.git
WeiYuanStudio
r5-shop-vue
r5-shop-vue
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385