Skip to content

Releasing infrastructure#

Disclaimer

The text below contains Avito specific details

We publish releases to Maven Central on demand.

Publishing to an in-house Artifactory#

  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 githubIntegrationCheck tools against avito-android monorepo.
    If it is Failed you could release from previous Succeed commits or fix problems.
  3. Checkout a release branch with a name equals to projectVersion. For example, 2022.9.
    This branch must be persistent. It is used for automation.
  4. If the release branch is not on the commit from githubIntegrationCheck tools against avito-android monorepo, manually run it on the release branch.
  5. Manually run Artifactory publish on the release branch. It will upload artifacts to an in-house Artifactory instance.
  6. Make a PR to an internal avito repository with the new version of infrastructure.
  7. Checkout a new branch and make a PR to the tools 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
  8. Publish to Maven Central if needed.

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#