Skip to content

Commit

Permalink
update Jenkins unit test part 👷
Browse files Browse the repository at this point in the history
  • Loading branch information
alivx committed Dec 8, 2020
1 parent 43318ca commit 9d26d42
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
pipeline {
agent { label 'appBuilder' }
stages {
stage('Clone Service') {
steps {
git branch: 'master', url: 'https://github.com/alivx/urless.git'
sh label: 'Get current commit', script: 'git log --name-status HEAD^..HEAD > current_commit.meta'
sh label: 'Save Build Meta Data', script: 'echo "${JOBNAME} - ${BUILD_ID}" > build.meta'
}
}
stage("Unit test"){
agent {
docker { image 'alivx/urless:latest' }
// Equivalent to "docker build -f Dockerfile.build --build-arg version=1.0.2 ./build/
dockerfile {
filename 'Dockerfile'
dir 'build'
label 'my-defined-label'
args '-v /tmp:/tmp'
}
}
steps{
sh 'nosetests --with-xunit'
sh 'cd api;nosetests --with-xunit'
}
}
stage('Check Code') {
Expand Down

0 comments on commit 9d26d42

Please sign in to comment.