add a basic jenkinsfile

This commit is contained in:
Jakub Sokołowski 2018-08-13 13:35:25 -04:00
parent 1b56a09178
commit 729b383e85
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 49 additions and 0 deletions

28
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,28 @@
def website_host = 'node-01.ac-cn-hongkong-c.web.misc.statusim.net'
node('linux') {
environment {
GH_USER = gh_user
}
stage('Git Prep') {
checkout scm
}
stage('Install Deps') {
sh 'npm install'
}
stage('Build') {
sh 'npm run build'
}
stage('Publish') {
sshagent(['jenkins-ssh']) {
sh """
scp -o StrictHostKeyChecking=no -r dist/. \\
${website_host}:/var/www/cn.status.im/
"""
}
}
}

21
README.md Normal file
View File

@ -0,0 +1,21 @@
# Description
This repo creates the Status main Chinese page for https://cn.status.im.
# Usage
To develop the site use:
```
npm run develop
```
To build the site use:
```
npm run build
```
The build artifacts end up in `dist` folder.
# Continuous Integration
The deployment is handled by Jenkins(https://ci.status.im/) and configured via the [`Jenkinsfile`](./Jenkinsfile) and deployed via this job:
https://ci.status.im/job/misc/job/cn.status.im/