Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
FreshRSS-Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
30
Issues
30
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Christophe Henry
FreshRSS-Android
Commits
693a3371
Commit
693a3371
authored
Feb 13, 2020
by
Christophe Henry
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'improve-jenkins' into 'develop'
Parallelize Jenkins instrumented tests step See merge request
!69
parents
da77f03b
d11d37d6
Pipeline
#3488
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
31 deletions
+40
-31
Jenkinsfile
Jenkinsfile
+40
-31
No files found.
Jenkinsfile
View file @
693a3371
...
...
@@ -7,8 +7,10 @@ pipeline {
}
environment
{
MIN_SDK_IMAGE
=
"system-images;android-21;default;x86_64"
TARGET_SDK_IMAGE
=
"system-images;android-28;default;x86_64"
MIN_SDK_VERSION
=
21
MAX_SDK_VERSION
=
28
MIN_SDK_IMAGE
=
"system-images;android-$MIN_SDK_VERSION;default;x86_64"
MAX_SDK_IMAGE
=
"system-images;android-$MAX_SDK_VERSION;default;x86_64"
ANDROID_HOME
=
"/opt/android-sdk-linux"
}
...
...
@@ -42,7 +44,6 @@ pipeline {
updateGitlabCommitStatus
name:
"Job"
,
state:
"running"
updateGitlabCommitStatus
name:
"Pre"
,
state:
"running"
library
"android-pipeline-steps"
sh
"apt-get install net-tools"
}
post
{
failure
{
...
...
@@ -119,40 +120,48 @@ pipeline {
}
}
}
stage
(
"Instrumented tests on min SDK image"
)
{
steps
{
updateGitlabCommitStatus
name:
"Instrumented tests on min SDK image"
,
state:
"running"
withAvd
(
hardwareProfile:
"Nexus 5X"
,
systemImage:
env
.
MIN_SDK_IMAGE
,
headless:
true
)
{
sh
"./gradlew clean connectedDebugAndroidTest"
}
}
stage
(
"Instrumented tests"
)
{
parallel
{
stage
(
"on min SDK level"
)
{
steps
{
sh
"echo ${env.MIN_SDK_IMAGE}"
updateGitlabCommitStatus
name:
"Instrumented tests on target SDK image"
,
state:
"running"
withAvd
(
hardwareProfile:
"Nexus 5X"
,
systemImage:
env
.
MIN_SDK_IMAGE
,
headless:
true
)
{
sh
"./gradlew clean connectedDebugAndroidTest"
}
}
post
{
failure
{
updateGitlabCommitStatus
name:
"Instrumented tests on min SDK image"
,
state:
"failed"
}
success
{
updateGitlabCommitStatus
name:
"Instrumented tests on min SDK image"
,
state:
"success"
}
}
}
stage
(
"Instrumented tests on target SDK image"
)
{
steps
{
updateGitlabCommitStatus
name:
"Instrumented tests on target SDK image"
,
state:
"running"
withAvd
(
hardwareProfile:
"Nexus 5X"
,
systemImage:
env
.
TARGET_SDK_IMAGE
,
headless:
true
)
{
sh
"./gradlew clean connectedDebugAndroidTest"
post
{
failure
{
updateGitlabCommitStatus
name:
"Instrumented tests on min SDK image"
,
state:
"failed"
}
success
{
updateGitlabCommitStatus
name:
"Instrumented tests on min SDK image"
,
state:
"success"
}
}
}
}
post
{
failure
{
updateGitlabCommitStatus
name:
"Instrumented tests on target SDK image"
,
state:
"failed"
}
success
{
updateGitlabCommitStatus
name:
"Instrumented tests on target SDK image"
,
state:
"success"
stage
(
"on max SDK level"
)
{
steps
{
sh
"echo ${env.MAX_SDK_IMAGE}"
updateGitlabCommitStatus
name:
"Instrumented tests on target SDK image"
,
state:
"running"
withAvd
(
hardwareProfile:
"Nexus 5X"
,
systemImage:
env
.
MAX_SDK_IMAGE
,
headless:
true
)
{
sh
"./gradlew clean connectedDebugAndroidTest"
}
}
post
{
failure
{
updateGitlabCommitStatus
name:
"Instrumented tests on target SDK image"
,
state:
"failed"
}
success
{
updateGitlabCommitStatus
name:
"Instrumented tests on target SDK image"
,
state:
"success"
}
}
}
}
}
// stage("Build APK") {
// steps {
// withAvd(hardwareProfile: "Nexus 5X", systemImage: env.MIN_SDK_IMAGE, headless: true) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment