cn.status.im/Jenkinsfile

41 lines
678 B
Plaintext
Raw Normal View History

2018-08-15 17:45:46 +00:00
properties([
parameters([
string(
name: 'APK_URL',
description: 'URL for the Android mobile app release.'
)
])
])
2018-08-13 17:35:25 +00:00
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') {
2018-08-15 17:45:46 +00:00
env.APK_URL = params.APK_URL
2018-08-15 18:00:20 +00:00
sh 'npm run clean'
2018-08-13 17:35:25 +00:00
sh 'npm run build'
2018-08-15 17:52:53 +00:00
sh 'du -hsc dist/*'
2018-08-13 17:35:25 +00:00
}
stage('Publish') {
sshagent(['jenkins-ssh']) {
sh """
scp -o StrictHostKeyChecking=no -r dist/. \\
${website_host}:/var/www/cn.status.im/
"""
}
}
}