fork 0k-charms
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.

59 lines
1.8 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.
  10. *** Get latest available versions
  11. You can double-check available candidate for official images like this:
  12. #+begin_src sh
  13. docker-tags-fetch rocketchat/rocket.chat -l 15 -f "^[0-9]+\.[0-9]+\.[0-9]+$" | sort -rV
  14. #+end_src
  15. Check/Choose the version you want to test.
  16. *** Modify your own =compose.yml=
  17. By adding these 2 lines in your rocket chat service:
  18. #+begin_src yaml
  19. docker-compose:
  20. image: rocketchat/rocket.chat:X.Y.Z
  21. #+end_src
  22. Replace X.Y.Z by the target version you want to test.
  23. Launch =compose up=.
  24. Be ready to wait a few minutes after =compose up= finished before the
  25. service to be available: rocketchat is expected to take some time to
  26. migrate.
  27. ** Change the current charm to include new version
  28. To prepare the commit for next version, you can run the following
  29. on the repository you'll use to push the new commit.
  30. #+begin_src sh
  31. BASENAME=rocketchat/rocket.chat
  32. VERSION=$(docker-tags-fetch "$BASENAME" -l 15 -f "^[0-9]+\.[0-9]+\.[0-9]+$" | sort -rV | head -n 1)
  33. echo Last version of rocket chat: $VERSION
  34. docker pull rocketchat/rocket.chat:"$VERSION" &&
  35. docker tag rocketchat/rocket.chat:"$VERSION" docker.0k.io/rocketchat:"$VERSION" &&
  36. docker push docker.0k.io/rocketchat:"$VERSION" &&
  37. sed -ri "s%^(docker-image: docker.0k.io/rocketchat:).*%\1$VERSION%" metadata.yml &&
  38. sed -ri "s%^(#docker-image: rocketchat/rocket.chat:).*%\1$VERSION%" metadata.yml
  39. #+end_src
  40. You can review the changes and commit them.