-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJenkinsfile
More file actions
68 lines (59 loc) · 1.45 KB
/
Jenkinsfile
File metadata and controls
68 lines (59 loc) · 1.45 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
library 'status-jenkins-lib@v1.9.10'
pipeline {
agent {
docker {
label 'linuxcontainer'
image 'harbor.status.im/infra/ci-build-containers:linux-base-1.0.0'
args '--volume=/nix:/nix ' +
'--volume=/etc/nix:/etc/nix ' +
'--user jenkins'
}
}
options {
timestamps()
/* Prevent Jenkins jobs from running forever */
timeout(time: 10, unit: 'MINUTES')
/* manage how many builds we keep */
buildDiscarder(logRotator(
numToKeepStr: '20',
daysToKeepStr: '30',
artifactNumToKeepStr: '1',
))
disableConcurrentBuilds()
disableRestartFromStage()
}
environment {
GIT_COMMITTER_NAME = 'status-im-auto'
GIT_COMMITTER_EMAIL = 'auto@status.im'
}
stages {
stage('Deps') {
steps { script {
nix.develop('npm install')
} }
}
stage('Build') {
steps { script {
nix.develop('npx quartz build')
jenkins.genBuildMetaJSON('public/build.json')
} }
}
stage('Publish Prod') {
when { expression { GIT_BRANCH.endsWith('master') } }
steps { script {
sshagent(credentials: ['status-im-auto-ssh']) {
nix.develop('ghp-import -c roadmap.vac.dev -p public', pure: false)
}
} }
}
stage('Archive') {
when { expression { !GIT_BRANCH.endsWith('master') } }
steps {
archiveArtifacts(artifacts: 'public/**')
}
}
}
post {
cleanup { cleanWs() }
}
}