Skip to content

Commit

Permalink
Jenkins file for integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
satran004 committed Jun 5, 2021
1 parent c26ce75 commit aa77539
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
42 changes: 42 additions & 0 deletions Jenkinsfile.it
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
pipeline {
agent any

parameters {
string(
defaultValue: '',
name: 'TAG_NAME',
trim: true
)
}

tools {
jdk 'jdk-8'
}

environment {
SIGNING_PASSWORD = credentials("signing_password")
BF_PROJECT_ID = credentials("BF_PROJECT_ID")
}

stages {
stage('Build') {
steps {
sh "chmod +x scripts/download_libs.sh"
sh "./scripts/download_libs.sh ${TAG_NAME}"
sh './gradlew build fatJar -Psigning.password=${SIGNING_PASSWORD} --stacktrace'
}
}

stage('integrationTest') {
steps {
sh './gradlew integrationTest -PBF_PROJECT_ID=${BF_PROJECT_ID}'
}
}

stage('Results') {
steps {
archiveArtifacts 'build/libs/*.jar'
}
}
}
}
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ task fatJar(type: Jar) {

test {
useJUnitPlatform()
testLogging {
showStandardStreams = true
}
}

task integrationTest(type: Test) {
Expand All @@ -97,6 +100,10 @@ task integrationTest(type: Test) {
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
// mustRunAfter(tasks.named('test'))
systemProperty('BF_PROJECT_ID', findProperty("BF_PROJECT_ID"))
testLogging {
showStandardStreams = true
}
}

integrationTest {
Expand Down

0 comments on commit aa77539

Please sign in to comment.