backstage-demo-janus-showcase/.rhdh/docker
Med Mouine 089a1cd890 config
2024-04-18 10:23:04 -04:00
..
.gitignore config 2024-04-18 10:23:04 -04:00
cachito_hash.sh config 2024-04-18 10:23:04 -04:00
Dockerfile config 2024-04-18 10:23:04 -04:00
README.requirements.md config 2024-04-18 10:23:04 -04:00
requirements-build.in config 2024-04-18 10:23:04 -04:00
requirements-build.txt config 2024-04-18 10:23:04 -04:00
requirements.in config 2024-04-18 10:23:04 -04:00
requirements.txt config 2024-04-18 10:23:04 -04:00
setup.py config 2024-04-18 10:23:04 -04:00

To iteratively add/fix requirements:

Add more dependencies to requirements.in, then:

pip-compile --allow-unsafe --strip-extras requirements.in -o requirements.txt

If it passes, you can run cachito_hash.sh to fix the sha256sums.

Try to install everything in requirements.txt:

rm -rf pyvenv.cfg lib* bin/*
virtualenv .; . bin/activate
pip install -r requirements.txt

If it fails, repeat previous step to add more dependencies requirements.in and repeat.

Now, set up BUILD requirements, see https://github.com/containerbuildsystem/cachito/blob/master/docs/pip.md#build-dependencies to get pip_find_builddeps.py, then run:

rm -fr /tmp/pip_find_builddeps.py*
pip_find_builddeps.py requirements.txt -o requirements-build.in --append --no-cache

Review the contents of requirements-build.in to remove dupes. Then regenerate requirements-build.txt

pip-compile --allow-unsafe --strip-extras requirements-build.in -o requirements-build.txt

If it passes, you can run cachito_hash.sh to fix the sha256sums.

Finally, MAKE SURE YOU OVERRIDE what's in the .txt files to add in the cachito_hash values, as pip-compile will remove them. This can be done by running cachito_hash.sh.

mkdocs-techdocs-core @ https://github.com/backstage/mkdocs-techdocs-core/archive/bbdab44e0d3aecfdc4e77b14c72b57791d4902b2.zip#cachito_hash=sha256:40421a5f43b11fd9ea9f92e107f91089b6bfa326967ad497666ab5a451fcf136
plantuml-markdown @ https://github.com/mikitex70/plantuml-markdown/archive/17d348bfaa9112cdd2130e6410ce3a50224db3cf.zip#cachito_hash=sha256:221cc4972c75ba911cad4a56df07f61771c20077f8cbc8966181e30cabf68de1

To test in a container build in Brew, using something like:

pip3.11 install --user --no-cache-dir -r requirements.txt -r requirements-build.txt

If the build fails, add more dependencies to the requirements file, and try again.

When the build passes, commit changes to midstream and downstream, and trigger sync to cause a downstream build to verify your changes.

Note that some files are transformed between up/mid/downstream, so you may have to apply changes in more than one file.

  • Upstream: docker/Dockerfile (upstream) and .rhdh/docker/Dockerfile (mid + downstream)

  • Midstream: distgit/containers/rhdh-hub/.rhdh/docker/Dockerfile is transformed to distgit/containers/rhdh-hub/Dockerfile.in via sync.sh

  • Downstream: Dockerfile.in becomes Dockerfile automatically, injecting the product version from gcp_env/product_version