Skip to content

Commit

Permalink
change run-ci-stage1's post_run_cmd to disable workshop force-builds …
Browse files Browse the repository at this point in the history
…if it is enabled

- The use of force-builds is really only useful/necessary on the first
  instance of `crucible run` in a job because subsequent instances of
  'crucible run' should use the same images and building the same
  images over and over in the same job is just a waste of time (and
  resources) and could cause the job to timeout
  • Loading branch information
k-rister committed Aug 25, 2024
1 parent 8d41d51 commit 5a67d88
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/actions/integration-tests/run-ci-stage1
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,33 @@ function post_run_cmd {

# shutdown OpenSearch before each run to free up memory for image building
run_cmd "crucible stop opensearch"

# disable force builds, if enabled, because we really only need to do that for the first run
RICKSHAW_SETTINGS_FILE="/opt/crucible/subprojects/core/rickshaw/rickshaw-settings.json"
current_force_builds=$(jq -r '.workshop."force-builds"' ${RICKSHAW_SETTINGS_FILE})
start_github_group "rickshaw-settings force-builds update"
if [ "${current_force_builds}" == "true" ]; then
FORCE_BUILDS="false"
echo "Updating rickshaw-settings value workshop.force-builds to '${FORCE_BUILDS}' in ${RICKSHAW_SETTINGS_FILE}"

if jq --indent 4 --arg force_builds "${FORCE_BUILDS}" \
'.workshop."force-builds" = $force_builds' \
${RICKSHAW_SETTINGS_FILE} > ${RICKSHAW_SETTINGS_FILE}.tmp; then
if mv ${RICKSHAW_SETTINGS_FILE}.tmp ${RICKSHAW_SETTINGS_FILE}; then
echo "Successfully updated:"
jq --indent 4 . ${RICKSHAW_SETTINGS_FILE}
else
echo "ERROR: Failed to move force-builds"
exit 1
fi
else
echo "ERROR: Failed to update force-builds"
exit 1
fi
else
echo "No update required for rickshaw-settings value workshop.force-builds in ${RICKSHAW_SETTINGS_FILE}"
fi
stop_github_group
}

function remove_microk8s_images {
Expand Down

0 comments on commit 5a67d88

Please sign in to comment.