-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
51 lines (47 loc) · 1.16 KB
/
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
49
50
51
pipeline {
environment {
MYSQL_HOST=credentials('MYSQL_HOST')
MYSQL_USER=credentials('MYSQL_USER')
MYSQL_PASSWORD=credentials('MYSQL_PASSWORD')
MYSQL_TABLE_NAME=credentials('MYSQL_TABLE_NAME')
MYSQL_DATABASE_NAME=credentials('MYSQL_DATABASE_NAME')
DOMAIN=credentials('MANUAL_DOMAIN')
API_KEY=credentials('MANUAL_API_KEY')
NODE_ENV='development'
}
agent {
docker {
image 'node:fermium'
args '-u 0:0'
}
}
triggers {
cron('@midnight')
}
stages {
stage('Preparing workspace') {
steps {
sh 'chown -R 996:992 ./'
sh 'chmod -R 777 ./'
echo 'Creating services folder'
}
}
stage('Build') {
steps {
echo 'Building..'
sh 'npm install'
}
}
stage('Test') {
steps {
echo 'Testing..'
sh 'npm run unit:test'
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
}