Dev/prod builds
This commit is contained in:
parent
62fd8a939b
commit
c9fa471d41
1 changed files with 17 additions and 4 deletions
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
|
@ -6,15 +6,28 @@ pipeline {
|
|||
}
|
||||
|
||||
stages {
|
||||
stage('Build client') {
|
||||
stage('Install dependencies') {
|
||||
steps {
|
||||
sh 'CI=true npm_config_python=/usr/local/bin/python2.7 yarn --no-progress --non-interactive --skip-integrity-check --frozen-lockfile install'
|
||||
sh 'yarn build'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Deploy to dev instance') {
|
||||
stage('Build and deploy to dev instance') {
|
||||
steps {
|
||||
sh 'sed -i -e \'s/ury.org.uk\\/webstudio/ury.org.uk\\/webstudio-dev/\' package.json'
|
||||
sh 'yarn build'
|
||||
sshagent(credentials: ['ury']) {
|
||||
sh 'rsync -av --delete-after build/ deploy@ury:/usr/local/www/webstudio-dev'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build and deploy for production') {
|
||||
when {
|
||||
branch 'production'
|
||||
}
|
||||
steps {
|
||||
sh 'sed -i -e \'s/ury.org.uk\\/webstudio-dev/ury.org.uk\\/webstudio/\' package.json'
|
||||
sh 'yarn build'
|
||||
sshagent(credentials: ['ury']) {
|
||||
sh 'rsync -av --delete-after build/ deploy@ury:/usr/local/www/webstudio'
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue