diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 94665d8..c7ca24b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,6 +7,7 @@ on: branches: [ main ] jobs: + test: runs-on: ubuntu-latest steps: @@ -40,7 +41,6 @@ jobs: run: | docker push ${{ secrets.DOCKERHUB_USERNAME }}/devops-journey:latest - - name: Set up Helm uses: azure/setup-helm@v3 with: @@ -51,7 +51,23 @@ jobs: helm package ./helm-chart - name: Upload Helm chart as artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 + with: + name: devops-journey-chart + path: devops-journey-*.tgz + + deploy: + needs: build-and-push + runs-on: self-hosted # deploying to local k8s cluster + steps: + - name: Download Helm chart + uses: actions/download-artifact@v4 with: name: helm-chart - path: devops-journey-*.tgz \ No newline at end of file + path: ./ + + - name: deploy-to-dev + run: | + helm upgrade --install devops-journey devops-journey-chart.tgz -n dev + echo "Deployed to dev successfully!!" + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 351adf3..981b040 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ *.crt *.pem -./actions-runner +/actions-runner/