add Jenkinsfile & udpate README

Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
Jakub Sokołowski 2018-07-06 10:10:37 +02:00 committed by Julien Eluard
parent db331c0ec8
commit 508a1a0fdd
No known key found for this signature in database
GPG Key ID: 6FD7DB5437FCBEF6
2 changed files with 32 additions and 0 deletions

20
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,20 @@
node('linux') {
stage('Git Prep') {
checkout scm
sh 'git config user.name "status-im-auto"'
sh 'git config user.email "auto@status.im"'
}
stage('Install Deps') {
sh 'cd website && npm install'
}
stage('Publish') {
withCredentials([string(
credentialsId: 'jenkins-github-token',
variable: 'GITHUB_TOKEN',
)]) {
sh 'cd website && GIT_USER="status-im-auto:$GITHUB_TOKEN" npm run publish-gh-pages'
}
}
}

View File

@ -30,3 +30,15 @@ To add a directory:
After that it will be available through localhost:8080 and the main gateway.
It will eventually disappear from the main gateway.
## Continous Deployment
To make possible deploying the new version of the page from the `master` branch a Jenkins job is configured at:
https://jenkins.status.im/job/misc/job/pluto/
This job is ran according to the [`Jenkinsfile`](Jenkinsfile) configuration.
In order for this to work there are two requirements:
* The `status-im-auto` user which API token is used needs to have at least write access.
* The repo has to have the https://jenkins.status.im/github-webhook/ webhook configured.