Skip to content

Commit

Permalink
Merge pull request #1 from jeffhollan/dev
Browse files Browse the repository at this point in the history
Merging dev to master
  • Loading branch information
jeffhollan authored Apr 26, 2020
2 parents bf4d1dd + b44df44 commit 58d2e4c
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 4 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This is a basic workflow to help you get started with Actions

name: Build and Release

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ jeff, dev, master ]
pull_request:
branches: [ jeff, dev, master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-and-release:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2


- name: Docker Build
run: docker build -t covidscreeningregistry.azurecr.io/covidscreeningapi:v1 Start/COVIDScreeningApi/COVIDScreeningApi


- name: Connect to Azure Container Registry
run: |
echo Connecting to Azure Container Registry
sleep $[ ( $RANDOM % 10 ) + 1 ]s
- name: Push image and version to ACR
run: |
echo docker push
sleep $[ ( $RANDOM % 60 ) + 10 ]s
- name: Publish to Azure Kubernetes Service
run: |
echo Publishing to AKS
sleep $[ ( $RANDOM % 10 ) + 10 ]s
- name: Publish OpenAPI Definition to Azure API Management
run: |
echo Publishing OpenAPI Definition to Azure API Management
sleep $[ ( $RANDOM % 10 ) + 5 ]s
3 changes: 2 additions & 1 deletion Start/COVIDScreeningApi/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
UnitTests.csproj
README.md
5 changes: 2 additions & 3 deletions Start/COVIDScreeningApi/COVIDScreeningApi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ EXPOSE 443

FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /src
COPY ["Start/COVIDScreeningApi/COVIDScreeningApi/COVIDScreeningApi.csproj", "Start/COVIDScreeningApi/COVIDScreeningApi/"]
RUN dotnet restore "Start/COVIDScreeningApi/COVIDScreeningApi/COVIDScreeningApi.csproj"
COPY ["COVIDScreeningApi.csproj", ""]
RUN dotnet restore "COVIDScreeningApi.csproj"
COPY . .
WORKDIR "/src/Start/COVIDScreeningApi/COVIDScreeningApi"
RUN dotnet build "COVIDScreeningApi.csproj" -c Release -o /app/build

FROM build AS publish
Expand Down
29 changes: 29 additions & 0 deletions Start/COVIDScreeningApi/COVIDScreeningApi/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: covidscreeningAPI
spec:
replicas: 1
template:
metadata:
labels:
app: covidscreeningAPI
spec:
containers:
- name: covidscreeningAPI
image: covidscreeningregistry.azurecr.io/covidscreeningapi:v1
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: covidscreeningAPI
spec:
ports:
- name: http-port
port: 80
targetPort: 80
selector:
app: covidscreeningAPI
type: LoadBalancer

0 comments on commit 58d2e4c

Please sign in to comment.