Skip to content

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#

  1. Check if diff against the last release contains any changes for users. If not, then probably there are no reasons to make a release.
  2. Check the current status of integration check infra build against avito-android Github or Stash
  3. If it is Failed you could release from previous Succeed commits or fix problems
  4. If there are pending changes after last success build. You should run build on last changes or use last success commit for release.
  5. Checkout a release branch with a name equals to projectVersion. For example, 2022.9.
    This branch must be persistent. It is used for automation.
  6. Publish infra to internal Artifactory repo Github or Stash on the release branch
  7. Currently, we don't publish to external Artifactory. Publish to Maven Central
  8. Update infraVersion at an internal avito-android repository
  9. 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

Publishing to Maven Central#

We publish releases to Maven Central on demand: com.avito.android.

If you release for the first time
  1. Push develop and release branches to remote.
  2. 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.
  3. Release staging repository
  4. Publish a release in Github:
    make draft_release version=<current release version> prev_version=<last release version>
    
    You need to have the Github cli.
    See also more details about Managing releases in a repository.

Getting access to Sonatype#

  1. Create an account
  2. Create an issue referencing original one, asking for com.avito.android access
  3. Wait for confirmation
  4. 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.

  1. Open Staging repositories oss-avito In a Content tab you can see uploaded artifacts.
  2. Close the repository:
    You don’t need to provide a description here. oss-close In an Activity tab you can track progress. oss-release
  3. Release the repository. It will publish the contents to Maven Central oss-release-confirm
  4. 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#

  1. Run make publish_to_maven_local in github repository.
  2. Run integration tests of your choice in avito with local version of infrastructure.

CI integration tests against Avito#

  1. Choose configuration from existed
  2. 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#