forked from municipio-se/municipio-deployment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.jenkinsfile
48 lines (47 loc) · 1.29 KB
/
deploy.jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env groovy
pipeline {
agent any
environment {
FLIGHTPLAN_HOST = "${env.JOB_NAME}"
FLIGHTPLAN_DIR = "/srv/www/${env.JOB_NAME}"
FLIGHTPLAN_DOMAIN = "https://${env.JOB_NAME}"
FLIGHTPLAN_TARGET_DIR = "${env.JOB_NAME}"
FLIGHTPLAN_USER = "web"
}
stages {
stage('Build') {
steps {
nodejs('v14') {
sh "yarn install"
}
}
}
stage('Modularity') {
steps {
nodejs('v14') {
sh "cd ./wp-content/plugins/modularity && yarn install"
sh "cd ./wp-content/plugins/modularity && npm run build"
sh "cd ./wp-content/plugins/modularity && composer install --ignore-platform-reqs --no-dev --no-interaction"
}
}
}
stage('Municipio') {
steps {
nodejs('v14') {
sh "cd ./wp-content/themes/municipio && npm install https://github.com/helsingborg-stad/styleguide/archive/refs/tags/0.11.630.tar.gz --save-dev"
sh "cd ./wp-content/themes/municipio && npm install"
sh "cd ./wp-content/themes/municipio && npm run build"
}
}
}
stage('Deploy') {
steps {
sshagent(credentials: ['ssh-key-build-whitespace-house']) {
nodejs('v14') {
sh "fly deploy:jenkins"
}
}
}
}
}
}