Skip to content

Commit

Permalink
Testing changes in final step update kubernetes deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus Sanchez committed Sep 27, 2024
1 parent 7a30e03 commit a51a3dc
Showing 1 changed file with 12 additions and 24 deletions.
36 changes: 12 additions & 24 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
# - name: Set up Docker Build
# uses: docker/setup-buildx-action@v3
#
# - name: Log in to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
#
# - name: Build, tag, and push image to Docker Hub
# env:
Expand Down Expand Up @@ -57,8 +57,8 @@ jobs:
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
- name: Create kube-config directory
run: mkdir -p $HOME/.kube
# - name: Create kube-config directory
# run: mkdir -p $HOME/.kube

- name: Decode and set kubeconfig
env:
Expand All @@ -81,25 +81,13 @@ jobs:
run: aws sts get-caller-identity # Check AWS CLI setup


# - name: Verify kubectl Configuration
# run: |
# kubectl config view # Show kubectl config
# kubectl config current-context # Show current context
# kubectl get nodes # List Kubernetes nodes to verify connection

- name: Generate Kubernetes Deployments
env:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_REPOSITORY: ${{ secrets.DOCKER_HUB_REPOSITORY }}
IMAGE_TAG: latest
run: |
cat k8s/deployment.yaml.template | envsubst > k8s/deployment.yaml
cat k8s/service.yaml.template | envsubst > k8s/service.yaml
- name: Print current working directory
run: pwd

- name: List files and directories in the current directory
run: ls -R
- name: Deploy to EKS
run: |
kubectl apply --validate=false -f k8s/deployment.yaml
kubectl apply --validate=false -f k8s/service.yaml
run: kubectl apply --validate=false -f k8s/deployment.yaml
# - name: Validate kubeconfig and Test kubectl Configuration
# run: |
# # Print the kubeconfig file content
Expand Down

0 comments on commit a51a3dc

Please sign in to comment.