Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 28 additions & 26 deletions .github/workflows/deploy-applicationset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@ jobs:
(
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'push' &&
github.ref == 'refs/heads/main'
github.event_name == 'push' && ( github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' )
)
)

Expand Down Expand Up @@ -383,8 +382,7 @@ jobs:
(
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'push' &&
github.ref == 'refs/heads/main'
github.event_name == 'push' && ( github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' )
)
)

Expand All @@ -403,7 +401,6 @@ jobs:
name: selected-applicationsets
path: /tmp


- name: Configure Kubernetes for deployment
env:
KUBECONFIG_B64: ${{ secrets.KUBECONFIG_B64_DEPLOY }}
Expand All @@ -418,35 +415,40 @@ jobs:

chmod 600 ~/.kube/config

# - name: Verify Kubernetes connection
# run: |

- name: Verify Kubernetes connection
run: |

kubectl cluster-info

echo
kubectl config current-context
# kubectl cluster-info

# echo
# kubectl config current-context

- name: Deploy ApplicationSets
shell: bash
run: |
# - name: Deploy ApplicationSets
# shell: bash
# run: |

while read -r file; do
# while read -r file; do

[ -z "$file" ] && continue
# [ -z "$file" ] && continue

echo
echo "=========================================="
echo "Deploying: $file"
echo "=========================================="
# echo
# echo "=========================================="
# echo "Deploying: $file"
# echo "=========================================="

kubectl apply \
-f "$file"
# kubectl apply \
# -f "$file"

done < /tmp/appset-files.txt
# done < /tmp/appset-files.txt

# - name: Show ApplicationSets
# run: |
# kubectl get applicationsets -A

- name: Show ApplicationSets
- name: Show Message
shell: bash
run: |
kubectl get applicationsets -A
echo
echo "=========================================="
echo "Deploying ApplicationSet"
echo "=========================================="
Loading