Releasing infrastructure#
Disclaimer
The text below contains Avito specific details
We publish releases to Maven Central on demand.
How to make a new infra release#
- Check if diff against the last release contains any changes for users. If not, then probably there are no reasons to make a release.
- Check the current status of
integration check infra build against avito-android
Github or Stash - If it is
Failed
you could release from previousSucceed
commits or fix problems - If there are pending changes after last success build. You should run build on last changes or use last
success
commit for release. - Checkout a
release branch
with a name equals toprojectVersion
. For example,2022.9
.
This branch must be persistent. It is used for automation. - Publish infra to internal Artifactory repo Github or Stash on the
release branch
- Currently, we don't publish to external Artifactory. Publish to Maven Central
- Update
infraVersion
at an internal avito-android repository - Update
infraVersion
at the infra repository:- Change
infraVersion
property in the./gradle.properties
to the new version - Bump up a
projectVersion
property in the./gradle.properties
to the next version - Open a pull request with those changes
- Change
Publishing to Maven Central#
We publish releases to Maven Central on demand: com.avito.android.
If you release for the first time
- Get an access to Sonatype
- Install Github CLI
- Push
develop
andrelease
branches to remote. - Manually run Github publish configuration on the latest or needed
release branch
. It will upload artifacts to a staging repository in Sonatype. So you can upload it in advance at any previous step and drop in case of problems. - Release staging repository
- Publish a release in Github:
You need to have themake draft_release version=<current release version> prev_version=<last release version>
Github cli
.
See also more details about Managing releases in a repository.
Getting access to Sonatype#
- Create an account
- Create an issue referencing original one, asking for
com.avito.android
access - Wait for confirmation
- Login to nexus to validate staging profile access
Some additional info:
Making a release in Sonatype#
We publish a release through a temporary staging repository. If something goes wrong you can drop the repository to cancel the publication process.
- Open Staging repositories In a Content tab you can see uploaded artifacts.
- Close the repository:
You don’t need to provide a description here. In an Activity tab you can track progress. - Release the repository. It will publish the contents to Maven Central
- Wait till new packages appear on Maven Central. It takes usually about 15-30 min. You can see them earlier in a repository manager or in public search before all of them will be available for download.
Some additional info:
Local integration tests against Avito#
- Run
make publish_to_maven_local
in github repository. - Run integration tests of your choice in avito with
local
version of infrastructure.
CI integration tests against Avito#
- Choose configuration from existed
- Run build.
If you need to test unmerged code, select a custom build branch.
You will see branches from both repositories:
- By default, build uses develop from github against develop from avito
- If you pick a branch from avito, it will run against develop on github
- If you pick a branch from github, it will run against develop on avito
- To build both projects of special branch, they should have the same name
CI integration configurations#
- fast check configuration (internal) - pull request's builds
- integration check - currently, contains the biggest amount of integration checks
- nightly integration check - the same as
integration check
but uses more Android emulators