forked from CraftTweaker/CraftTweaker-Documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
39 lines (38 loc) · 891 Bytes
/
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
#!/usr/bin/env groovy
pipeline {
agent any
environment {
CROWDIN_TOKEN = credentials('crowdin-token')
CROWDIN_PROJECT_ID = credentials('crowdin-project-id')
}
stages {
stage('Setup') {
steps {
echo 'Setting up npm'
sh 'npm ci'
sh 'cd site && npm ci'
}
}
stage('Build') {
steps {
echo 'Building files'
sh 'npm run-script build'
}
}
stage('Deploy') {
steps {
echo 'Deploying docker container'
dir('site') {
sh "docker-compose up -d --build"
}
}
}
}
options {
disableConcurrentBuilds()
retry(2)
}
triggers {
cron('0 */24 * * *')
}
}