|
16 | 16 | description: "Stores information about the component's source url." |
17 | 17 | - name: git-revision |
18 | 18 | 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." |
19 | 23 | params: |
20 | 24 | - name: SNAPSHOT |
21 | 25 | description: The JSON string of the Snapshot under test |
|
49 | 53 | GIT_URL=$(jq -r --arg component_name "${COMPONENT_NAME}" '.components[] | select(.name == $component_name) | .source.git.url' <<< "${SNAPSHOT}") |
50 | 54 | GIT_REVISION=$(jq -r --arg component_name "${COMPONENT_NAME}" '.components[] | select(.name == $component_name) | .source.git.revision' <<< "${SNAPSHOT}") |
51 | 55 |
|
| 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 | + |
52 | 66 | # Log declared environment variables |
53 | 67 | echo "Snapshot metadata:" |
54 | 68 | echo " SNAPSHOT: ${SNAPSHOT}" |
|
58 | 72 | echo " IMAGE: ${IMAGE}" |
59 | 73 | echo " GIT_URL: ${GIT_URL}" |
60 | 74 | echo " GIT_REVISION: ${GIT_REVISION}" |
| 75 | + echo " OPERATOR_URL: ${OPERATOR_URL}" |
| 76 | + echo " OPERATOR_REVISION: ${OPERATOR_REVISION}" |
61 | 77 |
|
62 | 78 | # Write each environment variable to its respective results: |
63 | 79 | echo -n "${EVENT_TYPE}" > $(results.test-event-type.path) |
|
66 | 82 | echo -n "${IMAGE}" > $(results.image.path) |
67 | 83 | echo -n "${GIT_URL}" > $(results.git-url.path) |
68 | 84 | 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