add jenkinsfile
parent
f92ddc787b
commit
862126b02f
|
@ -0,0 +1,43 @@
|
|||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('Pre-Build') {
|
||||
steps {
|
||||
sh '''mix local.hex --force
|
||||
mix local.rebar --force'''
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh '''mix deps.get
|
||||
mix compile'''
|
||||
}
|
||||
}
|
||||
stage('Unit') {
|
||||
steps {
|
||||
sh '''mix ecto.create
|
||||
mix ecto.migrate
|
||||
mix coveralls --trace --preload-modules'''
|
||||
}
|
||||
}
|
||||
stage('Analysis') {
|
||||
parallel {
|
||||
stage('Credo') {
|
||||
steps {
|
||||
sh 'mix credo --strict --only=warnings,todo,fixme,consistency,readability'
|
||||
}
|
||||
}
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'mix format --check-formatted'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Save') {
|
||||
steps {
|
||||
junit '_build/junit.xml'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue