Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVOPS-375 MAINTENANCE Add boolean param. for outgoingNetworkCalls, a… #4583

Merged
merged 1 commit into from
Jun 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 44 additions & 23 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ pipeline {
separator(name: "TEST_STAGES", sectionHeader: "Test Stages - CAUTION: The PR needs to be rebuild again with all test stages enabled before Code Review!!",
separatorStyle: "border-width: 0",
sectionHeaderStyle: """
background-color: #ffff00;
text-align: center;
padding: 4px;
color: #000000;
font-size: 20px;
font-weight: normal;
font-family: 'Orienta', sans-serif;
letter-spacing: 1px;
font-style: italic;
""")
background-color: #ffff00;
text-align: center;
padding: 4px;
color: #000000;
font-size: 20px;
font-weight: normal;
font-family: 'Orienta', sans-serif;
letter-spacing: 1px;
font-style: italic;
""")
booleanParam name: 'PULL_REQUEST_SUITE', defaultValue: true, description: 'Enables Pull ' +
'request suite'
booleanParam name: 'STANDALONE', defaultValue: true, description: 'When selected, ' +
Expand All @@ -99,6 +99,8 @@ pipeline {
booleanParam name: 'QUARANTINED_TESTS', defaultValue: true, description: 'Enables ' +
'Quarantined Tests'
booleanParam name: 'RTL_TESTS', defaultValue: true, description: 'Enables RTL Tests'
booleanParam name: 'OUTGOING_NETWORK_CALL_TESTS', defaultValue: false, description: 'Enables' +
'start Outgoing web tests'
}

options {
Expand All @@ -121,12 +123,11 @@ pipeline {
parallel {
stage('1') {
agent {
dockerfile {
filename d.fileName
dir d.dir
additionalBuildArgs d.buildArgs
args d.args
label useDebugLabelParameter(d.label)
docker {
image 'catrobat/catrobat-android:stable'
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle -m=6.5G'
label 'LimitedEmulator'
alwaysPull true
}
}

Expand Down Expand Up @@ -244,6 +245,27 @@ pipeline {
}
}

stage('Outgoing Network Call Tests') {
when {
expression { params.OUTGOING_NETWORK_CALL_TESTS == true }
}
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE')
{
sh '''./gradlew -PenableCoverage -Pemulator=android28 \
startEmulator createCatroidDebugAndroidTestCoverageReport \
-Pandroid.testInstrumentationRunnerArguments.class=org.catrobat.catroid.testsuites.OutgoingNetworkCallsTestSuite'''
}
}
post {
always {
junit '**/*TEST*.xml'
sh './gradlew stopEmulator clearAvdStore'
archiveArtifacts 'logcat.txt'
}
}
}

stage('RTL Tests') {
when {
expression { params.RTL_TESTS == true }
Expand Down Expand Up @@ -273,12 +295,11 @@ pipeline {

stage('2') {
agent {
dockerfile {
filename d.fileName
dir d.dir
additionalBuildArgs d.buildArgs
args d.args
label useDebugLabelParameter(d.label)
docker {
image 'catrobat/catrobat-android:stable'
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle -m=6.5G'
label 'LimitedEmulator'
alwaysPull true
}
}

Expand Down Expand Up @@ -314,4 +335,4 @@ pipeline {
}
}
}
}
}