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