From: Israel Fruchter <
fr...@scylladb.com>
Committer: Israel Fruchter <
israel....@gmail.com>
Branch: master
fix(build_n_push):
requirement.in relative when calling pip-compile
Since the path of the input file appear in the output requriements.txt
multiple times, it shouldn't be a full path, since it's generating
lots of diffs every time new image created
---
diff --git a/docker/env/build_n_push.sh b/docker/env/build_n_push.sh
--- a/docker/env/build_n_push.sh
+++ b/docker/env/build_n_push.sh
@@ -24,7 +24,8 @@ if [[ -n "$(docker images scylladb/hydra:${VERSION} -q)" ]]; then
else
echo "Hydra image with version $VERSION not found locally. Building..."
cd "${DOCKER_ENV_DIR}"
- pip-compile ${SCT_DIR}/
requirements.in --allow-unsafe --generate-hashes > ${SCT_DIR}/${PY_PREREQS_FILE}
+ REQUIREMENTS_IN=$(realpath --relative-to=${DOCKER_ENV_DIR} ${SCT_DIR}/
requirements.in)
+ pip-compile $REQUIREMENTS_IN --allow-unsafe --generate-hashes > ${SCT_DIR}/${PY_PREREQS_FILE}
cp -f ${SCT_DIR}/${PY_PREREQS_FILE} .
docker build --network=host -t scylladb/hydra:${VERSION} .
rm -f ${PY_PREREQS_FILE}