You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.9 KiB

  1. # -*- ispell-local-dictionary: "english" -*-
  2. #+SETUPFILE: ~/.emacs.d/etc/setup/latex.setup
  3. #+SETUPFILE: ~/.emacs.d/etc/setup/html-readtheorg-local.setup
  4. #+TITLE: Rocket.Chat
  5. * Updating the charm to a new version
  6. We are using official image. Latest tags usually.
  7. ** Test new version
  8. Rocket.chat has a powerfull and working database update mecanism that
  9. will take care of migrating database on startup *as long as you jump only
  10. from one major version to the next*.
  11. *** Get latest available versions
  12. You can double-check available candidate for official images like this:
  13. #+begin_src sh
  14. docker-tags-fetch rocketchat/rocket.chat -l 15 -f "^[0-9]+\.[0-9]+\.[0-9]+$" | sort -rV
  15. #+end_src
  16. Check/Choose the version you want to test.
  17. *** Modify your own =compose.yml=
  18. By adding these 2 lines in your rocket chat service:
  19. #+begin_src yaml
  20. docker-compose:
  21. image: rocketchat/rocket.chat:X.Y.Z
  22. #+end_src
  23. Replace X.Y.Z by the target version you want to test.
  24. Launch =compose up=.
  25. Be ready to wait a few minutes after =compose up= finished before the
  26. service to be available: rocketchat is expected to take some time to
  27. migrate.
  28. ** Change the current charm to include new version
  29. To prepare the commit for next version, you can run the following
  30. on the repository you'll use to push the new commit.
  31. #+begin_src sh
  32. BASENAME=rocketchat/rocket.chat
  33. VERSION=$(docker-tags-fetch "$BASENAME" -l 15 -f "^[0-9]+\.[0-9]+\.[0-9]+$" | sort -rV | head -n 1)
  34. echo Last version of rocket chat: $VERSION
  35. docker pull rocketchat/rocket.chat:"$VERSION" &&
  36. docker tag rocketchat/rocket.chat:"$VERSION" docker.0k.io/rocketchat:"$VERSION" &&
  37. docker push docker.0k.io/rocketchat:"$VERSION" &&
  38. sed -ri "s%^(docker-image: docker.0k.io/rocketchat:).*%\1$VERSION%" metadata.yml &&
  39. sed -ri "s%^(#docker-image: rocketchat/rocket.chat:).*%\1$VERSION%" metadata.yml
  40. #+end_src
  41. You can review the changes and commit them.