simple-dapp/Jenkinsfile

55 lines
973 B
Groovy

pipeline {
agent { label 'linux' }
options {
disableConcurrentBuilds()
/* manage how many builds we keep */
buildDiscarder(logRotator(
numToKeepStr: '20',
daysToKeepStr: '30',
))
}
environment {
SCP_OPTS = 'StrictHostKeyChecking=no'
GH_USER = 'status-im-auto'
GH_MAIL = 'auto@status.im'
}
stages {
stage('Git Prep') {
steps {
sh "git config user.name ${env.GH_USER}"
sh "git config user.email ${env.GH_MAIL}"
}
}
stage('Install Deps') {
steps {
sh 'yarn install --ignore-optional'
}
}
stage('Compile') {
steps {
sh 'yarn run compile'
}
}
stage('Build') {
steps {
sh 'yarn run build'
}
}
stage('Deploy') {
steps {
sshagent(credentials: ['status-im-auto-ssh']) {
sh 'yarn run deploy'
}
}
}
}
post {
always {
sh 'yarn run clean'
}
}
}