diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b66dbba9..33894ee5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,34 +12,31 @@ jobs: build-test: runs-on: ubuntu-latest steps: - - run: echo "building and testing the app ..." + - run: echo "building and testing the app here..." + docker-build-push: runs-on: ubuntu-latest needs: build-test steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v2 - - - name: Set up QEMU + - name: Set up QEMU uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push + - name: Build and push uses: docker/build-push-action@v2 with: context: . file: WebApplication1/Dockerfile push: true - tags: mabusaa/argocd-course-webapp:${{ github.sha }} + tags: sakshirathoree/argocd-course-webapp:${{ github.sha }} + promote-to-dev-environment: runs-on: ubuntu-latest needs: docker-build-push @@ -56,4 +53,3 @@ jobs: sed -i "s,tag:.*,tag:\ ${{ github.sha }}," helm/webapp/values.yaml git add . && git commit -m "update image tag" git push - diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6c69b9605..27cfad33f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -9,7 +9,7 @@ jobs: build-test: runs-on: ubuntu-latest steps: - - run: echo "building and testing the app ..." + - run: echo "building and testing the app here again ..." docker-build-push: runs-on: ubuntu-latest needs: build-test @@ -36,7 +36,7 @@ jobs: context: . file: WebApplication1/Dockerfile push: true - tags: mabusaa/argocd-course-webapp:${{ github.event.pull_request.head.sha }} + tags: sakshirathoree/argocd-course-webapp:${{ github.event.pull_request.head.sha }} update-image-tag-in-helm: runs-on: ubuntu-latest needs: docker-build-push diff --git a/helm/webapp/templates/service.yaml b/helm/webapp/templates/service.yaml index 744c4ed0e..8d40e7138 100644 --- a/helm/webapp/templates/service.yaml +++ b/helm/webapp/templates/service.yaml @@ -9,7 +9,10 @@ spec: ports: - port: {{ .Values.service.port }} targetPort: http + {{- if .Values.service.nodeport }} + nodePort: {{ .Values.service.nodeport }} + {{- end }} protocol: TCP name: http selector: - {{- include "demo.selectorLabels" . | nindent 4 }} \ No newline at end of file + {{- include "demo.selectorLabels" . | nindent 4 }} diff --git a/helm/webapp/values.yaml b/helm/webapp/values.yaml index 1dfbe7666..3f2c0791f 100644 --- a/helm/webapp/values.yaml +++ b/helm/webapp/values.yaml @@ -5,10 +5,10 @@ replicaCount: 1 image: - repository: mabusaa/argocd-course-webapp + repository: sakshirathoree/argocd-course-webapp pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "9dbc07045cd3502b9863803b21356cd5ec2a93eb" + tag: 4510b415d92e7ddb9271d2f2266010326fceb501 imagePullSecrets: [] nameOverride: "" @@ -37,8 +37,9 @@ securityContext: {} # runAsUser: 1000 service: - type: ClusterIP + type: NodePort port: 80 + nodeport: 32080 ingress: enabled: false