Skip to content
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
13 changes: 13 additions & 0 deletions scripts/build_mender_artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,21 @@ sed -e 's/\${BLAH2_V:-\([^}]*\)}/\1/g' \
-e 's/\${CONFIG_MERGER_V:-\([^}]*\)}/\1/g' \
-e 's/\${SPECTRUM_V:-\([^}]*\)}/\1/g' \
-e 's/\${RETINA_TRACKER_V:-\([^}]*\)}/\1/g' \
-e 's/\${TELEMETRY_V:-\([^}]*\)}/\1/g' \
"${COMPOSE_FILE}" > "${MANIFEST_DIR}/docker-compose.yaml"

# Every image tag must be a literal by this point. The list above is by hand,
# so adding a service to docker-compose.yml without adding its clause here
# leaves a ${VAR:-default} that skopeo receives as a literal tag — the artifact
# either fails to build or installs a service that can never start. Cheaper to
# fail here, with the name of the variable that was missed.
if unresolved=$(grep -nE '^\s+image:.*\$\{' "${MANIFEST_DIR}/docker-compose.yaml"); then
echo "Error: unresolved image tag variables in the generated manifest:" >&2
echo "${unresolved}" >&2
echo "Add a matching -e clause above for each." >&2
exit 1
fi

SCRIPT_DIR="$(dirname "$0")/mender-state-scripts"

# Build artifact — gen_docker-compose pulls images via skopeo automatically
Expand Down
Loading