Skip to content
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
12 changes: 11 additions & 1 deletion jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,14 @@
# This script is used for verifying changes in Jenkins. In order to provide faster feedback, the tasks are ordered so
# that faster tasks are executed in every module before slower tasks (if possible). For example, the unit tests for all
# the modules are executed before the integration tests.
./gradlew clean compileJava compileScala compileTestJava compileTestScala spotlessScalaCheck checkstyleMain checkstyleTest spotbugsMain unitTest rat integrationTest --no-daemon --continue -PxmlSpotBugsReport=true -PtestLoggingEvents=started,passed,skipped,failed "$@"

# Run validation checks (compilation and static analysis)
./gradlew clean compileJava compileScala compileTestJava compileTestScala \
spotlessScalaCheck checkstyleMain checkstyleTest spotbugsMain rat \
--profile --no-daemon --continue -PxmlSpotBugsReport=true "$@" \
|| { echo 'Validation steps failed'; exit 1; }

# Run tests
./gradlew unitTest integrationTest \
--profile --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed "$@" \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the --profile information is printed to a file. How would one see that for a Jenkins build?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mumrah Can you elaborate on this one? Apart from that, I think we are good to merge.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure: the --profile flag tells gradle to time all of the tasks in during a build. It breaks it down so you can see how much time is spent during the different task phases. It's quite useful when investigating slow builds. The HTML reports generated by the profiling could be archived by Jenkins and/or published using the HTML publisher plugin (similar to a coverage report or junit results)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please file a JIRA with details about what we should do in Jenkins to make this useful?

|| { echo 'Test steps failed'; exit 1; }