Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Generalizing the deployment scripts and revoking azure #91

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
# For more information on the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# For more samples to get started with GitHub Action workflows to deploy to Azure: https://github.com/Azure/actions-workflow-samples

name: Build, Test, and Deploy to Azure
name: Build, Test, and Deploy to GHCR

env:
AZURE_WEBAPP_NAME: omega-triageportal-dev1 # set this to the name of your Azure Web App
# AZURE_WEBAPP_NAME: omega-triageportal-dev1 # set this to the name of your Azure Web App
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
TAG: python
Expand Down Expand Up @@ -84,24 +84,24 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

deploy-dev:
permissions:
contents: none
runs-on: ubuntu-latest
needs: build-dev
environment:
name: 'Development'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Deploy Dev to Azure Web App
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
images: 'ghcr.io/${{ env.REPO }}:${{ github.sha }}'
# deploy-dev:
# permissions:
# contents: none
# runs-on: ubuntu-latest
# needs: build-dev
# environment:
# name: 'Development'
# url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
#
# steps:
# - name: Deploy Dev to Azure Web App
# run: |
# echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
#
# - name: Deploy to Azure Web App
# id: deploy-to-webapp
# uses: azure/webapps-deploy@v2
# with:
# app-name: ${{ env.AZURE_WEBAPP_NAME }}
# publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
# images: 'ghcr.io/${{ env.REPO }}:${{ github.sha }}'
26 changes: 13 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ jobs:
push: true
files: docker-compose.yml, docker-compose.ghcr.yml

- name: Login to Azure Container Registry
uses: docker/login-action@v2
with:
registry: omegatriagecontainerreg.azurecr.io
username: ${{ secrets.AZURE_CLIENT_ID }}
password: ${{ secrets.AZURE_CLIENT_SECRET }}

- name: Build and Push to Azure Container Registry
uses: docker/[email protected]
with:
builder: ${{ steps.buildx.outputs.name }}
push: true
files: docker-compose.yml, docker-compose.azure.yml
# - name: Login to Azure Container Registry
# uses: docker/login-action@v2
# with:
# registry: omegatriagecontainerreg.azurecr.io
# username: ${{ secrets.AZURE_CLIENT_ID }}
# password: ${{ secrets.AZURE_CLIENT_SECRET }}
#
# - name: Build and Push to Azure Container Registry
# uses: docker/[email protected]
# with:
# builder: ${{ steps.buildx.outputs.name }}
# push: true
# files: docker-compose.yml, docker-compose.azure.yml
39 changes: 21 additions & 18 deletions docker-compose.azure.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
version: '3.9'

services:
redis:
image: omegatriagecontainerreg.azurecr.io/redis
restart: unless-stopped
volumes:
- redis-data:/data

triage-portal:
image: omegatriagecontainerreg.azurecr.io/omega-triage-portal

volumes:
redis-data:
driver: azure_file
driver_opts:
share_name: triage-redis-data
storage_account_name: ${AZURE_STORAGE_ACCOUNT_NAME:-alphaomegaoafdev2}
# NOTE:Azure CICD deploy no longer in use.
# Commenting out section in the event we return to Azure deployment
#
#version: '3.9'
#
#services:
# redis:
# image: omegatriagecontainerreg.azurecr.io/redis
# restart: unless-stopped
# volumes:
# - redis-data:/data
#
# triage-portal:
# image: omegatriagecontainerreg.azurecr.io/omega-triage-portal
#
#volumes:
# redis-data:
# driver: azure_file
# driver_opts:
# share_name: triage-redis-data
# storage_account_name: ${AZURE_STORAGE_ACCOUNT_NAME:-alphaomegaoafdev2}