4848 required : false
4949 type : string
5050 description : ' Boundary for Kubernetes resources'
51+ dependency_repo_name :
52+ required : false
53+ type : string
54+ description : ' Dependency Repo Name'
55+ dependency_repo_url :
56+ required : false
57+ type : string
58+ description : ' Dependency Repo URL'
5159 rollback :
5260 required : false
5361 type : boolean
5462 description : ' Environment name for rollback'
63+ dependencies :
64+ required : false
65+ type : boolean
66+ description : ' Install chart dependencies or not'
5567 revision :
5668 required : false
5769 type : number
@@ -119,6 +131,22 @@ jobs:
119131 aws eks update-kubeconfig --name ${{ inputs.eks-cluster-name }} --region ${{ inputs.aws_region }}
120132 fi
121133
134+ - name : helm dependency build
135+ if : ${{ inputs.rollback != true && inputs.uninstall != true && inputs.dependencies == true }}
136+ run : |
137+ # Split the input strings into arrays using ',' as delimiter
138+ IFS=',' read -ra REPO_NAMES <<< "${{ inputs.dependency_repo_name }}"
139+ IFS=',' read -ra REPO_URLS <<< "${{ inputs.dependency_repo_url }}"
140+
141+ # Loop through the arrays and add each Helm repo
142+ for i in "${!REPO_NAMES[@]}"; do
143+ echo "Adding repo ${REPO_NAMES[$i]} -> ${REPO_URLS[$i]}"
144+ helm repo add "${REPO_NAMES[$i]}" "${REPO_URLS[$i]}"
145+ done
146+
147+ helm repo update
148+ helm dependency build "${{ inputs.helm-chart-directory }}"
149+
122150 - name : helm lint
123151 if : ${{ inputs.rollback != true && inputs.uninstall != true }}
124152 run : |
@@ -129,7 +157,7 @@ jobs:
129157 run : |
130158 helm template ${{ inputs.helm-chart-directory }} -f ${{ inputs.values-file-path }}
131159
132- - name : helm install and upgrade2
160+ - name : helm install and upgrade
133161 if : ${{ inputs.rollback != true && inputs.uninstall != true }}
134162 run : |
135163 if [ -n "${{ secrets.set-parameters }}" ]; then
0 commit comments