Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with thoth config not generated from template #200

Merged
merged 1 commit into from
Jul 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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