Skip to content

Commit

Permalink
Merge pull request #200 from fridex/config-gen
Browse files Browse the repository at this point in the history
Fix issue with thoth config not generated from template
  • Loading branch information
sesheta authored Jul 23, 2021
2 parents f953a78 + 661a2d9 commit 7dde9e0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions assemble
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,20 @@ function restore_lock() {
[[ -f ../requirements.txt ]] && cp ../requirements.txt .
}

echo ">>> Thoth s2i builder image version: ${THOTH_S2I_VERSION}"

[[ ${THOTH_FORCE_GENERATE_CONFIG} -ne 0 ]] && {
rm -f .thoth.yaml
thamos config --no-interactive
}

[[ ${THOTH_ADVISE} -ne 0 -o ${THOTH_PROVENANCE_CHECK} -ne 0 ]] && {
echo ">>> Performing hardware and software discovery..."
thamos config --no-interactive || exit 1
echo ">>> Thoth's configuration file after hardware and software discovery:"
cat .thoth.yaml | /usr/bin/python3 -c "import yaml; import json; import sys; json.dump(yaml.safe_load(sys.stdin), sys.stdout, indent=2);"
}

[[ ${THOTH_CONFIG_CHECK} -ne 0 ]] && {
thamos check || {
if [[ ${THOTH_ERROR_FALLBACK} -ne 0 ]]; then
Expand All @@ -71,11 +80,6 @@ function restore_lock() {
pip3 install --force-reinstall -U git+https://github.com/thoth-station/invectio || exit 1
fi

echo ">>> Thoth s2i builder image version: ${THOTH_S2I_VERSION}"
echo ">>> Performing hardware and software discovery..."
thamos config --no-interactive || exit 1
echo ">>> Thoth's configuration file after hardware and software discovery:"
cat .thoth.yaml | /usr/bin/python3 -c "import yaml; import json; import sys; json.dump(yaml.safe_load(sys.stdin), sys.stdout, indent=2);"
echo -e "\n>>> Asking Thoth for advise..."
if [[ ${THOTH_DRY_RUN} -eq 0 ]]; then
thamos advise || {
Expand Down

0 comments on commit 7dde9e0

Please sign in to comment.