mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-02 22:03:07 +00:00
72 lines
1.3 KiB
Groovy
72 lines
1.3 KiB
Groovy
#!/usr/bin/env groovy
|
|
library 'status-jenkins-lib@v1.9.27'
|
|
|
|
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 {
|
|
disableConcurrentBuilds()
|
|
disableRestartFromStage()
|
|
/* manage how many builds we keep */
|
|
buildDiscarder(logRotator(
|
|
numToKeepStr: '20',
|
|
daysToKeepStr: '30',
|
|
))
|
|
}
|
|
|
|
environment {
|
|
GIT_AUTHOR_NAME = 'status-im-auto'
|
|
GIT_AUTHOR_EMAIL = 'auto@status.im'
|
|
PUPPETEER_SKIP_DOWNLOAD = 'true'
|
|
NO_COLOR = 'true'
|
|
}
|
|
|
|
stages {
|
|
stage('Deps') {
|
|
steps {
|
|
script {
|
|
nix.develop('npm install', pure: true)
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Packages') {
|
|
steps {
|
|
script {
|
|
nix.develop('npm run build', pure: true)
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Build') {
|
|
steps {
|
|
script {
|
|
nix.develop('npm run doc', pure: true)
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Publish') {
|
|
when { expression { GIT_BRANCH.endsWith('master') } }
|
|
steps {
|
|
sshagent(credentials: ['status-im-auto-ssh']) {
|
|
script {
|
|
nix.develop('npm run deploy', pure: false)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always { cleanWs() }
|
|
}
|
|
}
|