1. 16 Sep, 2021 8 commits
  2. 12 Sep, 2021 2 commits
  3. 11 Sep, 2021 1 commit
  4. 10 Sep, 2021 1 commit
  5. 09 Sep, 2021 1 commit
    • Michael Große's avatar
      Stop printing success update notes twice · e4268295
      Michael Große authored
      If the update was a success, then that update message is also printed in
      In general the code in internal should not print to the console.
      However, since execution stops there if the update was not a success,
      the output is moved into that if-condition to keep showing the error
      message to the user before the program exits.
  6. 17 Aug, 2021 1 commit
    • Addshore's avatar
      Format files consistently · 7f754c1d
      Addshore authored
      My IDE wants to do this on save now...
      Change-Id: I6153b0939095cb7d2cd81cab634e7243de01fa49
  7. 10 Aug, 2021 1 commit
  8. 06 Aug, 2021 1 commit
    • Addshore's avatar
      Updates from releases.wikimedia.org · e1fd6968
      Addshore authored
      Has not been fully tested yet, as there is no real release to grab
      at this point.
      However, this also doesn't alter the default current behaviour,
      so should be safe to merge anyway..
      Change-Id: If92526a73f588e81b8a37c1cc684ca6d8973cea3
  9. 14 Jul, 2021 1 commit
    • Jeena Huneidi's avatar
      Add dev alias, replace docker with mwdd · 1f910e34
      Jeena Huneidi authored and Addshore's avatar Addshore committed
      Creates an alias called dev for the default development environment.
      This will be useful when other environments are added to the cli.
      Replaces the docker command with mwdd to remove duplicate functionality.
      Also update the test to be mwdd / docker focused
      but this needs to be commented out for now...
      Change-Id: Ibb2798f438f9372289694f0bb4ce5dbb087d18dc
  10. 13 Jul, 2021 2 commits
    • Addshore's avatar
      Introduce a cli config and config command · f63a1329
      Addshore authored and Jeena Huneidi's avatar Jeena Huneidi committed
      This introduces a basic JSON config that can be expanded and
      used initially for the "dev mode" option, of either mediawiki-docker
      or mwdd.
      Bug: T286088
      Change-Id: I5aa878737e7ac42ffa5b1abdb1f867db1c539c91
    • Addshore's avatar
      Improve updater output · db62f2bc
      Addshore authored and Jeena Huneidi's avatar Jeena Huneidi committed
      Provides the user with a better error on failure saying why it
      Doesnt output with log. (so no more timestamps)
      Does non 0 exit code on failure
      Bug: T285628
      Change-Id: Ie8f09806d526b1c5385572e472b27e6faff99167
  11. 30 Jun, 2021 2 commits
  12. 29 Jun, 2021 3 commits
  13. 28 Jun, 2021 2 commits
  14. 22 May, 2021 6 commits
    • Addshore's avatar
      mwdd: Allow users to choose http or ssh for clones · 56bfa18e
      Addshore authored
      Bug: T282354
      Change-Id: If7a1f622a4b692d6e4d531ee2bf285d16770aab5
    • Addshore's avatar
      mwdd: Use TTY for almost all command execution · 803b6ec8
      Addshore authored and Addshore's avatar Addshore committed
      This means all output is now streamed which is nice.
      The only non TTY execution is for a command where we
      only care about the exit code and don't want to bother
      the user with the output anyway!
      Bug: T282375
      Change-Id: I34edbb9a210e4045e47091087bfea1e410a172ac
    • Addshore's avatar
      mwdd: Allow any docker-compose commands to be used · e8753dc2
      Addshore authored and Addshore's avatar Addshore committed
      This ends up being an advanced feature in most cases,
      but it is quite nice for commands like ps!
      This will also allow inspection of logs for any of the services
      with ease without needing to provide more special commands etc.
      This can be useful for debugging.
      Bug: T282335
      Change-Id: I1645423ddf785857171e26a7fef766084c05615a
    • Addshore's avatar
      mwdd: mw phpunit & composer, use "correct" working dir · 96454bf4
      Addshore authored and Addshore's avatar Addshore committed
      This means that when these commands are used on the host
      system in a directory such as "skins/Vector", then working
      dir used with docker will reflect this.
      This allows composer commands to be used on sub repos, like
      skins and extensions, as well as for phpunit tests to easily
      be run when in other directories with auto completion of paths
      that just works.
      This does NOT allow users to use these commands when outside of
      the expected MediaWiki directory.
      This is out of scope for this patch (but might be something to
      consider in the future)
      Bug: T282350
      Change-Id: Id5fb148116bb3346f42867af2140933619f9bf2f
    • Addshore's avatar
      mwdd: Fix mwdd.DefaultForUser().DockerExec out of bounds error · 0f9b4ff6
      Addshore authored and Addshore's avatar Addshore committed
      Bug: T282340
      Change-Id: I56fff40f35eac5fff9b490ee2282525ef959193a
    • Addshore's avatar
      mwdd: composer install & mediawiki composer command · 531fa275
      Addshore authored and Addshore's avatar Addshore committed
      Will still need to aim to:
       - Make use of composer cache
       - Make working in different directories nice!
      Change-Id: If96edd73f60aad1757a8ec67512f2ad97e4f5c7a
  15. 18 May, 2021 1 commit
    • Addshore's avatar
      mwdd: Wizard to guide you through env setup · 7243f0ed
      Addshore authored and Addshore's avatar Addshore committed
      This includes:
       - Prompting the user to pick a PORT for the mwdd env
       - Prompting the user to pick a MW directory if not set
       - Clone of MediaWiki and optionally Vector
       - Ability to do a shallow clone for speed
       - Ability to clone from Github and switch to Gerrit
      This also leaves some TODOs around the place:
       - Allow the user to choose if the remotes end up on https or ssh
       - Allow cloning async for more speed
       - Allow the user to get more skins or extensions?
       - Auto detection of MW directory
       - Check if git is even installed
      And leaves 1 clear next step to make initial setup quite
      slick, this being do an initial composer install if
      MW determines that it needs it (will be done in a followup)
      Change-Id: Id58e45c26fed77a06226b081f6248d5f27a234b6
  16. 12 May, 2021 7 commits
    • Addshore's avatar
      mwdd: Make mediawiki installation more stable · a8453bc0
      Addshore authored and Addshore's avatar Addshore committed
      Change summary:
       - No longer have mediawiki writing a LS.php file with the wrong
       - Add a check to make sure a correct looking LS.php exists before
         allowing install via mwdd.
       - If NO LS.php files exists at all, then create one for the user.
       - If a LS.php exists, but doesn't have our shim, tell the user.
       - Use a nice server option when installing so the output makes sense
         to the user (rather than just saying localhost)
       - Switch from arguments to flags for mediawiki install
      This includes some small refactoring and additions to the mediawiki
      package which is used by both the docker and mwdd command.
      Change-Id: I2253730996c2969e775d3e77cf376cb1ebd67363
    • Addshore's avatar
      mwdd: mediawiki exec command can be run as system user · 54616941
      Addshore authored and Addshore's avatar Addshore committed
      This means that users have the choice of using their user,
      if they want to touch files mounted from their system.
      Or they can also choose "root" if they want to do other things,
      like poke around packages etc.
      Change-Id: I12d3d3196ae28d3b42e4f41b6e9e00a99eb4a826
    • Addshore's avatar
      mwdd: Initial phpunit command · 2ac80947
      Addshore authored and Addshore's avatar Addshore committed
      This can be tested with a command such as:
      ./dev.sh mwdd mediawiki phpunit \
      This uses the docker SDK directly to allow for easy passthrough
      of stdin and out for commands.
      This similar pattern will be used for further CLI interaction
      in mwdd.
      The phpunit command will also be worked on in further patches, including:
       - Clever things to do with directories (and maybe path completion?)
       - Ability to run on different --wikis
      Change-Id: I4ca04705ba584e3eb241bd75e33e3530305fbf82
    • Jeena Huneidi's avatar
      Remove generated files from repo · 1cb180de
      Jeena Huneidi authored and Addshore's avatar Addshore committed
      Generates files at build time in order to avoid storing packaged files
      in the repo.
      Change-Id: If1bfc12c04ac0f036870a7b7859ff9e9b6999c3f
    • Addshore's avatar
      mwdd: Implement nice destroy commands for individual services · 77f36074
      Addshore authored and Addshore's avatar Addshore committed
      These commands now destroy the containers and volumes of the
      specific service being interacted with.
      Prior to this the mediawiki destroy command would just run
      down on the whole docker-compose setup (as it was the only service).
      But now we need to be a little more selective.
      docker-compose doesn't provide commands to do all of this out of
      the box, which is why a docker command is needed to destroy specific
      named volumes for the services.
      Bug: T253313
      Change-Id: I8a861978894dd0fe10ffbcadc73314d64138ddd3
    • Addshore's avatar
      mwdd: Refactor mwdd.DockerCompose to use a struct instead of parameters · 0477c538
      Addshore authored and Addshore's avatar Addshore committed
      This will allow easier adding of specific extra modifications
      to the parameters, such as allowing conditional loading of
      only some of the docker-compose files.
      This also cleans up all of the string slice appending that was going
      on in mwdd.DockerCompose instead only taking a single slice of strings.
      Change-Id: I53680c010ea600d1c95706855a7e35a74ce55efb
    • Addshore's avatar
      mwdd: Enable installing with mariadb · 38e0b4a1
      Addshore authored and Addshore's avatar Addshore committed
      This adds the logic for the mysql service that for now
      just uses a mariadb image from docker hub.
      Eventually a followup will come to allow custom images to be used here.
      Verified in github actions on addshore fork
      You can see the steps needed to test this out in the test there.
      Assuming you have mediawiki, composer installed with the correct settings
      file, then:
      - mwcli mwdd create
      - mwcli mwdd mysql create
      - mwcli mwdd mediawiki install somesite mysql
      Really should figure out how to best maintain the docs for this soon.
      Vuepress perhaps?
      Bug: T253313
      Change-Id: I04b56065757e0fad21d85cd76b6624e7ea86ebde