Skip to content

Revert "Downgraded Kafka cluster to 3.4.1" #369

Revert "Downgraded Kafka cluster to 3.4.1"

Revert "Downgraded Kafka cluster to 3.4.1" #369

Workflow file for this run

name: Build and Deploy
on:
push:
branches: [ main ]
jobs:
backend:
environment: Demo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build and Deploy to Docker Registry
run: ./gradlew build jib -Pdocker_registry=${{ secrets.DOCKER_REGISTRY }} -Pdocker_registry_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_registry_password=${{ secrets.DOCKER_PASSWORD }}
env:
CI_PASSWORD: ${{ secrets.CI_PASSWORD }}
- name: Upload Functions Artifacts
uses: actions/upload-artifact@v3
with:
name: functions
path: './functions/build/azure-functions/vtch-functions/'
retention-days: 1
frontend:
environment: Demo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build and Deploy Frontend
run: >
docker login ${{ secrets.DOCKER_REGISTRY }} -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} &&
docker build -t ${{ secrets.DOCKER_REGISTRY }}/microservice-kubernetes-cluster/frontend:${GITHUB_SHA} -t ${{ secrets.DOCKER_REGISTRY }}/microservice-kubernetes-cluster/frontend:latest ./frontend &&
docker push ${{ secrets.DOCKER_REGISTRY }}/microservice-kubernetes-cluster/frontend:latest &&
docker push ${{ secrets.DOCKER_REGISTRY }}/microservice-kubernetes-cluster/frontend:${GITHUB_SHA}
functions:
needs: backend
environment: Demo
runs-on: ubuntu-latest
steps:
- name: Download Functions Artifacts
uses: actions/download-artifact@v3
with:
name: functions
path: vtch-functions
- name: Deploy Azure Functions
uses: Azure/functions-action@v1
id: fa
with:
app-name: vtch-functions
package: './vtch-functions'
publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }}
argocd:
needs: [backend, frontend]
environment: Demo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Python install requests dependency
uses: py-actions/py-dependency-install@v4
with:
path: "scripts/release-toggles/requirements.txt"
update-pip: "false"
update-setuptools: "false"
update-wheel: "false"
- name: Deploy to ArgoCD
env:
ARGOCD_SERVER: vtch-aks-demo-argocd.duckdns.org:80
ARGOCD_AUTH_TOKEN: ${{ secrets.ARGOCD_TOKEN }}
run: >
releaseToggles=$(python scripts/release-toggles/findJiraTickets.py ${{ secrets.JIRA_TOKEN }}) &&
echo "Release Toggles are $releaseToggles" &&
curl -sSL -o argocd http://vtch-aks-demo-argocd.duckdns.org:80/download/argocd-linux-amd64 &&
chmod +x argocd &&
./argocd app set applications -p image.tag=${GITHUB_SHA} -p releaseToggles=$releaseToggles --plaintext --grpc-web &&
./argocd app sync applications --plaintext --grpc-web &&
./argocd app sync -l app.kubernetes.io/instance=applications --plaintext --grpc-web
docs:
needs: argocd
environment: Demo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish API Documentation
run: ./gradlew gitPublishPush --no-parallel -Prerun -x jacocoTestReport
env:
CI_PASSWORD: ${{ secrets.CI_PASSWORD }}
GRGIT_USER: ${{ secrets.GIT_USER }}