Skip to content

Commit 2453016

Browse files
authored
Merge pull request #183 from securesign/fix_git_clone_params
fix: Set correct parameters for git clone
2 parents 0b0f474 + ba5bb19 commit 2453016

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

pipelines/rhtas-operator-e2e.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ spec:
298298
value: stepactions/git-clone.yaml
299299
params:
300300
- name: url
301-
value: "$(tasks.parse-metadata.results.git-url)"
301+
value: "$(tasks.parse-metadata.results.operator-url)"
302302
- name: revision
303-
value: "$(tasks.parse-metadata.results.git-revision)"
303+
value: "$(tasks.parse-metadata.results.operator-revision)"
304304
- name: repository
305305
value: repository
306306
- name: install-keycloak
@@ -350,14 +350,14 @@ spec:
350350
- name: url
351351
value: https://github.com/securesign/pipelines.git
352352
- name: revision
353-
value: fix-e2e-for-1.2
353+
value: main
354354
- name: pathInRepo
355355
value: stepactions/git-clone.yaml
356356
params:
357357
- name: url
358-
value: "$(tasks.parse-metadata.results.git-url)"
358+
value: "$(tasks.parse-metadata.results.operator-url)"
359359
- name: revision
360-
value: "$(tasks.parse-metadata.results.git-revision)"
360+
value: "$(tasks.parse-metadata.results.operator-revision)"
361361
- name: repository
362362
value: repository
363363
- name: get-tuftool
@@ -532,9 +532,9 @@ spec:
532532
value: stepactions/git-clone.yaml
533533
params:
534534
- name: url
535-
value: "$(tasks.parse-metadata.results.git-url)"
535+
value: "$(tasks.parse-metadata.results.operator-url)"
536536
- name: revision
537-
value: "$(tasks.parse-metadata.results.git-revision)"
537+
value: "$(tasks.parse-metadata.results.operator-revision)"
538538
- name: repository
539539
value: repository
540540
- name: git-clone-sigstore-e2e

tasks/parse-metadata.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ spec:
1616
description: "Stores information about the component's source url."
1717
- name: git-revision
1818
description: "Stores information about the component's source revision."
19+
- name: operator-url
20+
description: "Stores information about the rhtas-operator source url."
21+
- name: operator-revision
22+
description: "Stores information about the rhtas-operator's source revision."
1923
params:
2024
- name: SNAPSHOT
2125
description: The JSON string of the Snapshot under test
@@ -49,6 +53,16 @@ spec:
4953
GIT_URL=$(jq -r --arg component_name "${COMPONENT_NAME}" '.components[] | select(.name == $component_name) | .source.git.url' <<< "${SNAPSHOT}")
5054
GIT_REVISION=$(jq -r --arg component_name "${COMPONENT_NAME}" '.components[] | select(.name == $component_name) | .source.git.revision' <<< "${SNAPSHOT}")
5155
56+
57+
if [[ "$COMPONENT_NAME" =~ ^rhtas-operator.* ]]; then
58+
OPERATOR_URL=$GIT_URL
59+
OPERATOR_REVISION=$GIT_REVISION
60+
else
61+
#use default values
62+
OPERATOR_URL="https://github.com/securesign/secure-sign-operator.git"
63+
OPERATOR_REVISION="main"
64+
fi
65+
5266
# Log declared environment variables
5367
echo "Snapshot metadata:"
5468
echo " SNAPSHOT: ${SNAPSHOT}"
@@ -58,6 +72,8 @@ spec:
5872
echo " IMAGE: ${IMAGE}"
5973
echo " GIT_URL: ${GIT_URL}"
6074
echo " GIT_REVISION: ${GIT_REVISION}"
75+
echo " OPERATOR_URL: ${OPERATOR_URL}"
76+
echo " OPERATOR_REVISION: ${OPERATOR_REVISION}"
6177

6278
# Write each environment variable to its respective results:
6379
echo -n "${EVENT_TYPE}" > $(results.test-event-type.path)
@@ -66,3 +82,5 @@ spec:
6682
echo -n "${IMAGE}" > $(results.image.path)
6783
echo -n "${GIT_URL}" > $(results.git-url.path)
6884
echo -n "${GIT_REVISION}" > $(results.git-revision.path)
85+
echo -n "${OPERATOR_URL}" > $(results.operator-url.path)
86+
echo -n "${OPERATOR_REVISION}" > $(results.operator-revision.path)

0 commit comments

Comments
 (0)