Update docs repo if your changes affect docs.oceanprotocol.com content.
To create a new release for pdr-backend, follow these steps:
- Visit pdr-backend Github Releases. Note the current version number, eg
v0.1.4
. It follows semantic versioning. - Decide a new version number, by incrementing patch (eg
v0.1.5
), minor (egv0.2.0
), or major (egv1.0.0
). Major is rare. - Click "Draft a new release".
- For tag version, put something like
v0.1.5
. - For release title, put the same value (like
v0.1.5
). - For the target, select the
main
branch, or the most recent commit in main. - Describe the main changes. You can auto-generate a first cut following these instructions, step 8.
- Click "Publish release."
What happens then:
- The pdr-backend Github Releases Page will now include this release
- CI/CD will automatically build and publish a new Docker image with the release tag, making it available for installation and use.
The release process does not include publishing to pypi.
- This is because we have explicitly not put pdr-backend into pypi yet. It's not meant to be used as a library yet. In time, it likely will. Just not yet.
CI/CD will automatically build and publish a new Docker image
To elaborate: we have an automated docker build for pdr-backend main
branch and for all releases. Github is already connected to dockerhub.
If you want to add Docker branches, go to oceanprotocol/pdr-backend.
Then: on "Build rules", add your branch. Below is an example, where Alex is building "pdr-backend: alex" from branch "feature/alex".
In the last line: you should be able to log in with your username (eg trentmc).
We recommend local testing (versus adding more to dockerhub). Here's how.
First, build your image locally with a custom label, eg yaml-cli2
.
cd ~/code/pdr-backend
docker build . -t 'oceanprotocol/pdr-backend:yaml-cli2' .
Then, start barge, using the custom label:
cd ~/code/barge
export PDR_BACKEND_VERSION=yaml-cli2
./start_ocean.sh ...<the usual>...
Then, from pdr-backend, use barge as usual.
Pros of local testing:
- don't pollute dockerhub with one time images
- no need of cleanups. If a PR is merged, we don't need to delete that branch from dockerhub autobuild.
- no need of access to dockerhub
- dockerhub should be used for production ready images only
- barge.md: the main Barge README
- barge-calls.md: order of execution from Barge and pdr-backend code
- release-process.md: pdr-backend Dockerhub images get published with each push to
main
, and sometimes other branches. In turn these are used by Barge.