Skip to content
This repository was archived by the owner on Aug 5, 2021. It is now read-only.

Commit a163a25

Browse files
Xoryobeschoenen
authored andcommitted
Xoryo/deploy (#1)
* Add first revision of jenkinsfile * Remove artisan reference * Disable debug mode and install deps under root * Update jenkinsfile to use npm command * Fix build
1 parent eb2df17 commit a163a25

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

Jenkinsfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@Library('deployment') _
2+
import org.mapcreator.Deploy
3+
4+
node('node') {
5+
stage('checkout') {
6+
checkout scm
7+
}
8+
9+
stage('build') {
10+
sh 'npm install'
11+
sh 'npm run copy-pages'
12+
sh 'npm run compile-docs-api'
13+
sh 'sudo bundle install'
14+
sh 'bundle exec middleman build --clean'
15+
}
16+
17+
stage('deploy') {
18+
def deploy = new Deploy(steps)
19+
deploy.initialize(
20+
'/var/www/',
21+
'maps4news-docs',
22+
'master',
23+
BUILD_NUMBER,
24+
'f206c873-8c0b-481e-9c72-1ecb97a5213a',
25+
'deploy',
26+
'54.246.191.92',
27+
false
28+
)
29+
30+
deploy.prepare()
31+
deploy.copy('./build/*')
32+
deploy.finish()
33+
}
34+
35+
stage('cleanup') {
36+
step([$class: 'WsCleanup'])
37+
}
38+
}

config/api_templates/.gitkeep

Whitespace-only changes.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"name": "slate",
33
"version": "1.0.0",
44
"scripts": {
5-
"build": "npm run copy-pages && npm run compile-docs-api",
65
"copy-pages": "cp pages/* source/",
76
"compile-docs-api": "npx widdershins https://api.beta.maps4news.com/docs/assets/api-docs.json -e config/widdershins-api.json -o source/api.html.md"
87
},

0 commit comments

Comments
 (0)