Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "docker release" to existing release process #423

Closed
trentmc opened this issue Nov 30, 2023 · 1 comment
Closed

Add "docker release" to existing release process #423

trentmc opened this issue Nov 30, 2023 · 1 comment
Assignees
Labels
Type: Enhancement New feature or request

Comments

@trentmc
Copy link
Member

trentmc commented Nov 30, 2023

Background / motivation

pdr-backend has docker images on docker hub. They're used by barge. We need to make it clear how to update them.

Content to draw on 1

(From slack, Trent <> Alex.)

[Trent]
Gm! I'd like to publish a new "latest" docker image for pdr-backend for use by barge. Do we have the flow documented somewhere? What are the credentials?

Background: We have an issue where pdr-trueval testing on ganache relies on a BTC/TUSD pair. It's easy to change in pdr-backend, just one line of code different, when publishing a pdr feed data. This isn't enough of course: when I make that change in pdr-backend main, I then want to publish a new docker image for oceanprotocol/pdr-backend:latest. (And I want to get used to this, as I also want to do new docker image, with a testing label, for pdr-cli2 branch)

[Alex]

for now, we have automated docker build for main branch and for all releases (github is already connected to dockerhub)

Screenshot 2023-11-30 at 09 09 05

if you want to add branches, just go to https://hub.docker.com/repository/docker/oceanprotocol/pdr-backend/builds/edit

and then on build rules, add your branch.. like:
(I'm building pdr-backend: alex , from branch feature/alex

Screenshot 2023-11-30 at 09 10 50

(see last line)

you should be able to login, using gtrent@gmail.com (username: trentmc)

[Trent]

Oh great! Thanks very much for these detailed instructions. I will add them to pdr-backend too.

Content to draw on 2

[Alex]

release process is already in place. as soon as you hit "Release" on github, the docker image is automatically build. So we don't have to do anything about that

Also, for testing , I recommend local testing:

  • build your image locally (in pdr-backend folder) :
docker build -t 'oceanprotocol/pdr-backend:trent_custom' .
export PDR_BACKEND_VERSION=trent_custom

start barge (./start_ocean.sh ......)

this will start barge with your own docker image

Pros:

  • 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

Content to draw on 3

https://www.pluralsight.com/guides/create-docker-images-docker-hub

TODOs

  • Add the "content 1" and "2" above, in cleaned-up form, to pdr-backend's existing release process md file.
  • And bring in any relevant stuff from the "content 3" link, if anything
  • (Then, use the flow. If there are issues, tweak the md file further.)
@trentmc
Copy link
Member Author

trentmc commented Nov 30, 2023

Fixed in commit 98f17a7

@trentmc trentmc closed this as completed Nov 30, 2023
trentmc added a commit that referenced this issue Nov 30, 2023
Mostly by linking to the updated release-process.md.

A small follow-up to #423
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant