init
This commit is contained in:
parent
98cfd0a0b2
commit
410f4c3abc
@ -18,6 +18,8 @@ spec:
|
||||
- name: base
|
||||
description: Git-cloned source code
|
||||
results:
|
||||
- name: specDoamin
|
||||
description: Extracted domain name (e.g. user)
|
||||
- name: version
|
||||
description: Extracted project version (e.g. 0.2.0)
|
||||
steps:
|
||||
@ -32,6 +34,7 @@ spec:
|
||||
|
||||
echo "🔍 Extracting tag from Git ref..."
|
||||
FULL_REF="$(params.ref)"
|
||||
DOMAIN_FROM_REF=$(echo "$FULL_REF" | awk -F'[/-]' '{print $2}')
|
||||
TAG_FROM_REF=$(basename "$FULL_REF") # → 0.2.0
|
||||
|
||||
OPENAPI_FILE="specs/$(params.specDomain)/openapi.yaml"
|
||||
@ -49,4 +52,5 @@ spec:
|
||||
fi
|
||||
|
||||
echo "✅ Tag and version match: $VERSION"
|
||||
echo -n "$DOMAIN_FROM_REF" > /tekton/results/specDoamin
|
||||
echo -n "$VERSION" > /tekton/results/version
|
Loading…
x
Reference in New Issue
Block a user