Merge pull request #203 from kruzaavn/change_email_auth #143
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
env: | |
REGISTRY_URL: jtf191.azurecr.io | |
CLUSTER_NAME: jtf191 | |
CLUSTER_RESOURCE_GROUP: jtf191.app.server_group | |
on: | |
# this will launch every time there is a push to master | |
push: | |
branches: [ master ] | |
# Launch from the github actions page | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# build all microservices | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# build individual micro service components | |
strategy: | |
matrix: | |
# listed here are the directories to build from | |
component: [api-relay, api-server, bot, gateway, gci-relay, ui, rq-worker] | |
steps: | |
# Checks-out the repository under $GITHUB_WORKSPACE | |
- uses: actions/checkout@v2 | |
# Connect to Azure Container Registry (ACR) | |
- uses: azure/docker-login@v1 | |
with: | |
login-server: ${{ env.REGISTRY_URL }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
# Build container image at directory specified and tag it to the registry | |
- name: build image | |
run: docker image build ./${{matrix.component}} -t ${{env.REGISTRY_URL}}/${{matrix.component}}:latest | |
# Push container to the registry | |
- name: push image | |
run: docker push ${{env.REGISTRY_URL}}/${{matrix.component}}:latest | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
# listed here are the resources to be restarted | |
component: [ gci-relay, api-relay, rq-worker, api-server, bot, ui ] | |
steps: | |
# Checks-out the repository under $GITHUB_WORKSPACE | |
- uses: actions/checkout@v1 | |
# Sign into azure | |
- uses: azure/aks-set-context@v1 | |
with: | |
creds: '${{ secrets.AZURE_CREDENTIALS }}' | |
cluster-name: ${{ env.CLUSTER_NAME }} | |
resource-group: ${{ env.CLUSTER_RESOURCE_GROUP }} | |
- name: restart-pods | |
run: kubectl delete pod -l app=${{matrix.component}} |