Skip to content

Commit 398cfbc

Browse files
authored
Debug webapp-url Output (#20)
* Removed release selector in getting webapp-url * added RELEASE_LABEL_NAME input, reverted release loop * indentation
1 parent cedafa5 commit 398cfbc

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ inputs:
4545
description: Debug mode
4646
default: 'false'
4747
required: false
48+
release_label_name:
49+
description: The name of the label used to describe the helm release
50+
default: "release"
51+
required: false
4852
outputs:
4953
webapp-url:
5054
description: "Web Application url"
@@ -63,3 +67,4 @@ runs:
6367
GITREF_SHA: ${{ inputs.gitref-sha }}
6468
CLUSTER_NAME: ${{ inputs.cluster }}
6569
HELM_DEBUG: ${{ inputs.debug }}
70+
RELEASE_LABEL_NAME: ${{ inputs.release_label_name }}

entrypoint.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@ if [[ "${OPERATION}" == "deploy" ]]; then
3131
RELEASES=$(helmfile --namespace ${NAMESPACE} --environment ${ENVIRONMENT} --file /deploy/helmfile.yaml list --output json | jq .[].name -r)
3232
for RELEASE in ${RELEASES}
3333
do
34-
ENTRYPOINT=$(kubectl --namespace ${NAMESPACE} get -l release=${RELEASE} ingress --output=jsonpath='{.items[*].metadata.annotations.outputs\.webapp-url}')
35-
if [[ "${ENTRYPOINT}" != "" ]]; then
36-
echo "::set-output name=webapp-url::${ENTRYPOINT}"
34+
ENTRYPOINT=$(kubectl --namespace ${NAMESPACE} get -l ${RELEASE_LABEL_NAME}=${RELEASE} ingress --output=jsonpath='{.items[*].metadata.annotations.outputs\.webapp-url}')
35+
if [[ "${ENTRYPOINT}" != "" ]]; then
36+
echo "::set-output name=webapp-url::${ENTRYPOINT}"
3737
fi
3838
done
3939

4040

41-
4241
elif [[ "${OPERATION}" == "destroy" ]]; then
4342

4443
set +e

0 commit comments

Comments
 (0)