Skip to content

Commit

Permalink
feat: use CODING DevOps to deploy in China
Browse files Browse the repository at this point in the history
close #180
  • Loading branch information
shaunthegeek authored and phodal committed Jun 17, 2020
1 parent 3e21f77 commit 5925b1f
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 3 deletions.
65 changes: 65 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
pipeline {
agent {
docker {
image 'node:12'
reuseNode true
args '-v /usr/local/share/.cache/yarn/:/usr/local/share/.cache/yarn/'
}
}
stages {
stage('检出') {
steps {
checkout([
$class: 'GitSCM',
branches: [[name: env.GIT_BUILD_REF]],
userRemoteConfigs: [[url: env.GIT_REPO_URL, credentialsId: env.CREDENTIALS_ID]]
])
}
}
stage('安装依赖') {
steps {
sh '''find /etc/apt/ -name "*.list" -print0 |
xargs -0 sed -i "s/[a-z]\\+.debian.org/mirrors.cloud.tencent.com/g"
'''
sh 'apt-get update'
sh "apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2" +
" libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4" +
" libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0" +
" libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1" +
" libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6" +
" libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation" +
" libappindicator1 libnss3 lsb-release xdg-utils wget python3-pip"
sh 'yarn install'
}
}
stage('检查代码规范') {
steps {
sh 'yarn lint'
}
}
stage('构建') {
steps {
sh 'yarn build:ci'
}
}
stage('测试') {
steps {
sh 'yarn test:ci'
}
}
stage('部署到腾讯云存储') {
when {
anyOf {
branch 'master'
tag '*'
}
}
steps {
sh 'pip3 install coscmd'
sh "coscmd config -a $COS_SECRET_ID -s $COS_SECRET_KEY" +
" -b $COS_BUCKET_NAME -r $COS_BUCKET_REGION"
sh 'coscmd upload -r dist/ledge/ /'
}
}
}
}
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@
[![codecov](https://codecov.io/gh/phodal/ledge/branch/master/graph/badge.svg)](https://codecov.io/gh/phodal/ledge)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fphodal%2Fledge.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fphodal%2Fledge?ref=badge_shield)

[![CODING 持续集成](https://coding-public.coding.net/badges/ledge/job/236475/master/build.svg)](https://coding-public.coding.net/p/ledge/d/ledge/git)
[![腾讯云 IPv6 解决方案](https://img.shields.io/badge/IPv6-Ready-brightgreen)](https://cloud.tencent.com/solution/ipv6)
[![SSL 评级](https://img.shields.io/badge/MySSL-A%2B-brightgreen)](https://myssl.com/ledge.devops.host)
[![HTTP/2](https://img.shields.io/badge/HTTP%2F2-enabled-brightgreen)](https://http2.pro/check?url=https%3A//ledge.devops.host/)

<p align="center">
<img src="src/assets/images/logo.svg" width="288" height="74">
</p>

在线使用:[https://devops.phodal.com/](https://devops.phodal.com/)

国内服务器(不定期同步)
国内服务器:

1. 腾讯云-云开发服务器: [https://ledge.wdsm.io/](https://ledge.wdsm.io/)
1. CODING(每小时同步):[https://ledge.devops.host/](https://ledge.devops.host/)
2. 腾讯云-云开发服务器(不定期同步): [https://ledge.wdsm.io/](https://ledge.wdsm.io/)

Ledge (from Know-Ledge,意指承载物)知识和工具平台,是我们基于在 ThoughtWorks 进行的一系列 DevOps 实践、敏捷实践、软件开发与测试、精益实践提炼出来的知识体系。它包含了各种最佳实践、原则与模式、实施手册、度量、工具,用于帮助您的企业在数字化时代更好地前进,还有 DevOps 转型。

Expand Down Expand Up @@ -142,5 +148,4 @@ others see in the Code.

@ 2020 A [Phodal Huang](https://www.phodal.com)'s [Idea](http://github.com/phodal/ideas). This code is distributed under the MPL license. See `LICENSE` in this directory.


[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fphodal%2Fledge.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fphodal%2Fledge?ref=badge_large)

0 comments on commit 5925b1f

Please sign in to comment.