- Configure
$CHRONON_SNAPSHOT_REPO
env var to point to the JFrog artifactory. - Login into JFrog artifactory webapp console and create an API Key under user profile section.
- In
~/.sbt/1.0/jfrog.sbt
add
credentials += Credentials(Path.userHome / ".sbt" / "jfrog_credentials")
- In
~/.sbt/jfrog_credentials
add
realm=Artifactory Realm
host=<Artifactory domain of $CHRONON_SNAPSHOT_REPO>
user=<your username>
password=<API Key>
- Get maintainer access to Maven Central on Sonatype
- Create a sonatype account if you don't have one.
- Sign up here https://issues.sonatype.org/
- Ask a current Chronon maintainer to add you to Sonatype project.
- To add a new member, an existing Chronon maintainer will need to email Sonatype central support and request a new member to be added as a maintainer. Include the username for the newly created Sonatype account in the email.
- Create a sonatype account if you don't have one.
brew install gpg
on your mac- In
~/.sbt/1.0/sonatype.sbt
add
credentials += Credentials(Path.userHome / ".sbt" / "sonatype_credentials")
- In
~/.sbt/sonatype_credentials
add
realm=Sonatype Nexus Repository Manager
host=s01.oss.sonatype.org
user=<your username>
password=<your password>
- setup gpg - just first step in this link
- Setup your pypi public account and contact @Nikhil to get added to the PyPi package as a collaborator
- Install
tox, build, twine
. There are three python requirements for the python build process.
- tox: Module for testing. To run the tests run tox in the main project directory.
- build: Module for building. To build run
python -m build
in the main project directory - twine: Module for publishing. To upload a distribution run
twine upload dist/<distribution>.whl
python3 -m pip install -U tox build twine
- Fetch the user token from the PyPi website.
- Make sure you have the credentials configuration for the python repositories you manage. Normally in
~/.pypirc
[distutils]
index-servers =
local
pypi
chronon-pypi
[local]
repository = # local artifactory
username = # local username
password = # token or password
[pypi]
username = # username or __token__
password = # password or token
# Or if using a project specific token
[chronon-pypi]
repository = https://upload.pypi.org/legacy/
username = __token__
password = # Project specific pypi token.
To publish all the Chronon artifacts of the current git HEAD (builds and publishes all the JARs)
sbt -mem 8192 publish
This will publish the artifacts to the JFrog artifactory at $CHRONON_SNAPSHOT_REPO
and is useful for integration testing.
NOTE: Python API package will also be generated, but it will not be pushed to any PyPi repository. Only release
will
push the Python artifacts to the public repository.
- Run release command in the right HEAD of chronon repository. Before running this, you may want to activate your Python venv or install the required Python packages on the laptop. Otherwise, the Python release will fail due to missing deps.
GPG_TTY=$(tty) sbt -mem 8192 release
This command will take into the account of version.sbt
and handles a series of events:
- Marks the current SNAPSHOT codebase as final (git commits).
- Creates a new git tag (e.g v0.7.0) pointing to the release commit.
- Builds the artifacts with released versioning suffix and pushes them to Sonatype, and PyPi central.
- Updates the
version.sbt
to point to the next in line developmental version (git commits).
- login into the staging repo in nexus (same password as sonatype jira)
- In the staging repos list - select your publish
- select "close" wait for the steps to finish
- Select "refresh" and "release"
- Wait for 30 mins to sync to maven or sonatype UI
- Verify the Python API from the PyPi website that we are pointing to the latest.
- Update Chronon repo main branch:
- Open a PR to main branch to bump version like this one: #860
- Push release tag to main branch
- tag new version to release commit
Setting version to 0.0.xx
. If not already tagged, can be added by
git tag -fa v0.0.xx <commit-sha>
- push tag
git push origin <tag-name>
- New tag should be available here - https://github.com/airbnb/chronon/tags
- tag new version to release commit