This guide covers how to get started with Develocity, with topics such as strategies for incrementally introducing Build Scans usage, and key Build Scan features for improving your development productivity.
Develocity provides Build Scan, a permanent and shareable record of an executed build that allows collaborative troubleshooting and optimization.
Installation
This guide does not cover installation of Develocity. Please consult one of the following installation manuals for help with installation:
The remainder of this guide will assume that your installation has a public hostname of develocity.mycompany.com
and has enabled HTTPS.
Develocity Python agent
To use Build Scans, you must apply the Develocity Python agent to your project.
Setup
The Develocity Python agent is a Python package, but it is not publicly available on PyPI. To install it in your virtual environment, you can use the command line below.
pip install https://develocity-python-pkgs.gradle.com/develocity_agent-0.9-py3-none-any.whl
Alternatively, you can add the Develocity Python agent directly in your requirements.txt
file (or equivalent):
... your other requirements ...
https://develocity-python-pkgs.gradle.com/develocity_agent-0.9-py3-none-any.whl
Python support needs to be enabled in your license to use the Develocity Python agent. Reach out to us to enable Python support. |
After installing the agent, you can use it in your Python runs.
Publishing a Build Scan to scans.gradle.com is not supported. The minimum configuration required is the Develocity server URL.
The agent is configured through a file named .develocity.py
which should be located at root of your Python project. The configuration file must define a function called develocity_configuration
which takes as parameter the current configuration and returns the updated configuration. Following is an example of minimal configuration:
def develocity_configuration(configuration):
configuration.develocity_url = 'https://develocity.mycompany.com'
return configuration
More detailed information about the Develocity Python agent can be found in the Develocity Python agent user manual.
Build Scan
Build Scans are a significant innovation in software build tooling. Having centralized and shareable records providing fine-grained details and insights of all builds, including local development builds, enables new levels of collaborative debugging and optimization.
Quick start
Build Scans are automatically enabled for all builds, when applying the Develocity Python agent. As the build completes, the last lines of output will be similar to:
Publishing build scan... https://develocity.mycompany.com/s/3z475bz247h5g
Follow that link to view your Build Scan.
Build Scan highlights
This section calls out a subset of the things that you can do with Build Scans.
Find and view any Build Scan
Search through all the captured Build Scans by going to https://develocity.mycompany.com/scans
.
This view allows searching by various criteria, including top-level project name, username, build outcome, build start time and more. By default, the list is sorted to show the most recent scans first.
Beyond looking for a particular Build Scan, the listing can provide new insights into the actual builds being run at your organization and by your colleagues. You might find occurrences of previously unknown errors with your build, or that the build is taking longer in certain cases than you expected, or that certain build users are executing more goals than they need to and are therefore subjecting themselves to more build time than they need to, and other previously unknown behaviors.
Inspect console log
The console log will be included in your Build Scan. Use the left navigation menu to visit the Console Log
section.
This section will display all the console log emitted by the Python run, except the logs produced by processes forked from Python.
Next steps
Custom tags, values and links
Build Scans can be enriched with metadata particular to your environment by several means.
Extending your Build Scans with tags, values and links is strongly recommended. In particular:
-
VCS information such as commit identifiers, branch names, etc.
-
Tags for different types of builds (for example,
CI
vs.local
) -
Links to CI system record of build for CI builds
This adds useful context to your Build Scans.
Integrating your CI tool
Build Scans are passive with regard to the build process. That is, enabling Build Scans does not affect the outcome or outputs of your build. As such, it is generally safe to simply add the necessary configuration to your projects to enable sending Build Scans to your Develocity installation and check it in to version control, enabling it for all users of the build.
The Develocity Python agent will not cause build failures, even when there is no connection available to the Develocity server when trying to publish.
Getting help or asking questions
If you are currently using Develocity as part of your trial sign-up or license purchase, you will have received instructions on how to access the priority Develocity support channel. If you have any issues with or questions about Develocity, please raise a support request.
Alternatively, or if you are not yet using Develocity, you can use our contact form.
Keeping up to date
Develocity is constantly evolving with regular updates that add new features and capabilities. The monthly Gradle newsletter is an easy way to stay informed about new releases, features and events.