Skip to content

Commit

Permalink
Update the instructions to run the product details rebuild locally (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielBusta authored May 31, 2024
1 parent 4da7df3 commit 2685355
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,21 @@ product-details rely on a `pulse queue <https://github.com/mozilla-releng/shipit
This pulse queue is then consumed by `worker.py <https://github.com/mozilla-releng/shipit/blob/df379442c32baa7931767b058840bbb293135010/api/src/shipit_api/admin/worker.py#L42>`__. Although, there's a
way to by-pass the need for a pulse queue.

1. ``docker-compose run api bash``
1. Define the container in which the api application is running

2. ``shipit_rebuild_product_details --database-url="postgresql://shipituser:shipitpassword@db/shipitdb" --channel development``
::

export SHIPIT_API_CONTAINER="shipit-api-1"

2. Access the Docker container's interactive shell

::

docker exec -it "$SHIPIT_API_CONTAINER" /bin/bash

3. ``poetry run shipit_rebuild_product_details --database-url="postgresql://shipituser:shipitpassword@db/shipitdb" --channel development``

3. This will ask you for some GitHub crendentials. You can provide them if you want to update https://github.com/mozilla-releng/product-details. That said, you can also ``Ctrl+C`` and inspect the content of `/tmp/product-details` in the docker container. Changes are done here before they pushed to the git repo.
4. This will ask you for some GitHub crendentials. You can provide them if you want to update https://github.com/mozilla-releng/product-details. That said, you can also ``Ctrl+C`` and inspect the content of `/tmp/product-details` in the docker container. Changes are done here before they pushed to the git repo.

⚠️ If you decide to provide GitHub crendentials, remember that GitHub accounts that enabled 2-factor-authentication have to provide a GitHub token
instead of their regular password. Instructions to generate a token are found above. This time tough, grant the ``public_repo`` scope.
Expand Down

0 comments on commit 2685355

Please sign in to comment.