You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add shared branch family/suite resolver script.
Reuse it in pkg-build and pkg-release workflows.
Update docs for last-two-segments parsing rule.
Signed-off-by: Simon Beaudoin <sbeaudoi@qti.qualcomm.com>
if resolve_from_ref "$normalized_base_ref" family suite; then
184
-
source_ref="$normalized_base_ref"
185
-
echo "::warning::debian-ref '$DEBIAN_REF_INPUT' does not match '<prefix>/<family>/<suite>'; falling back to base-ref '$BASE_REF_INPUT' for suite routing."
168
+
if resolved_kv="$("$RESOLVER_SCRIPT" "$BASE_REF_INPUT")"; then
169
+
parse_resolved_values "$resolved_kv"
170
+
source_ref="$normalized_ref"
171
+
echo "::warning::debian-ref '$DEBIAN_REF_INPUT' does not end with '/<family>/<suite>'; falling back to base-ref '$BASE_REF_INPUT' for suite routing."
186
172
else
187
-
echo "::error::Unable to resolve build target from debian-ref '$DEBIAN_REF_INPUT' or base-ref '$BASE_REF_INPUT'. Expected '<prefix>/<family>/<suite>' such as 'qcom/ubuntu/resolute'."
173
+
echo "::error::Unable to resolve build target from debian-ref '$DEBIAN_REF_INPUT' or base-ref '$BASE_REF_INPUT'. Expected a branch ending in '/<family>/<suite>' (for example 'ubuntu/resolute' or 'qcom/ubuntu/resolute')."
188
174
exit 1
189
175
fi
190
176
else
191
-
echo "::error::Unable to resolve build target from debian-ref '$DEBIAN_REF_INPUT'. Expected '<prefix>/<family>/<suite>' such as 'qcom/ubuntu/resolute'."
177
+
echo "::error::Unable to resolve build target from debian-ref '$DEBIAN_REF_INPUT'. Expected a branch ending in '/<family>/<suite>' (for example 'ubuntu/resolute' or 'qcom/ubuntu/resolute')."
if ! resolve_from_ref "$normalized_ref" family suite; then
121
-
echo "::error::Unable to resolve release target from debian-branch '$DEBIAN_REF_INPUT'. Expected '<prefix>/<family>/<suite>' such as 'qcom/ubuntu/resolute'."
if ! resolved_kv="$("$RESOLVER_SCRIPT" "$DEBIAN_REF_INPUT")"; then
86
+
echo "::error::Unable to resolve release target from debian-branch '$DEBIAN_REF_INPUT'. Expected a branch ending in '/<family>/<suite>' (for example 'ubuntu/resolute' or 'qcom/ubuntu/resolute')."
122
87
exit 1
123
88
fi
124
89
90
+
normalized_ref=""
91
+
family=""
92
+
suite=""
93
+
while IFS='=' read -r key value; do
94
+
case "$key" in
95
+
normalized_ref) normalized_ref="$value" ;;
96
+
family) family="$value" ;;
97
+
suite) suite="$value" ;;
98
+
esac
99
+
done <<< "$resolved_kv"
100
+
125
101
if [[ "$family" == "debian" ]] && [[ "$suite" == "latest" || "$suite" == "unstable" ]]; then
1.**Resolve suite family**: Normalize the caller input and decide whether the run is Debian or Ubuntu
@@ -135,6 +154,10 @@ flowchart TD
135
154
| `test-run` | boolean | No | `true` | Debian: stop after Debusine build/test. Ubuntu: still stateful, but upload to test/proposed destination based on this input |
136
155
| `debusine-parent-workspace` | string | No | `ci` | Parent Debusine workspace passed through to the Debian build/test phase |
137
156
157
+
`debian-branch`uses the same parsing rule as `debian-ref` in the build
158
+
reusable workflow: split on `/`, take the last two fields as
159
+
`<family>/<suite>`, and require `family` to be `debian` or `ubuntu`.
0 commit comments