Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

promote dev #335

Merged
merged 9 commits into from
Apr 4, 2024
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
30 changes: 20 additions & 10 deletions .github/workflows/push.back.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- main
- dev
paths:
- 'src/**'
- '.github/workflows/dotnet.yml'
- "src/**"
- ".github/workflows/push.back.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand Down Expand Up @@ -47,20 +47,20 @@ jobs:
- name: 🗝️ Authenticate Docker to Google Cloud
uses: docker/login-action@v3
with:
registry: gcr.io
registry: us-central1-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

- name: 🏷️ Extract tags from GitHub
id: meta
uses: docker/metadata-action@v5
with:
images: gcr.io/${{ secrets.PROJECT_ID }}/app
images: us-central1-docker.pkg.dev/${{ secrets.PROJECT_ID }}/images/app
tags: |
type=ref,suffix=-{{sha}},event=branch
type=ref,prefix=pr-,suffix=-{{sha}},event=pr
type=semver,pattern={{version}}
latest
type=raw,value=latest

- name: 📦 Build and push image
uses: docker/build-push-action@v5
Expand All @@ -78,12 +78,17 @@ jobs:
cache-to: type=gha,mode=max
provenance: false

- name: 🔍️ Set image name
run: |
IMAGE_ID=$(echo $DOCKER_METADATA_OUTPUT_TAGS | cut -d ' ' -f 1)
echo "IMAGE_ID=$IMAGE_ID" >> $GITHUB_ENV

- name: 🚀 Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v2
with:
service: app
image: gcr.io/${{ secrets.PROJECT_ID }}/app
image: ${{ env.IMAGE_ID }}
region: us-central1
flags: |
--service-account=cloud-run-sa@${{ secrets.PROJECT_ID }}.iam.gserviceaccount.com
Expand Down Expand Up @@ -129,20 +134,20 @@ jobs:
- name: 🗝️ Authenticate Docker to Google Cloud
uses: docker/login-action@v3
with:
registry: gcr.io
registry: us-central1-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

- name: 🏷️ Extract tags from GitHub
id: meta
uses: docker/metadata-action@v5
with:
images: gcr.io/${{ secrets.PROJECT_ID }}/app
images: us-central1-docker.pkg.dev/${{ secrets.PROJECT_ID }}/images/app
tags: |
type=ref,suffix=-{{sha}},event=branch
type=ref,prefix=pr-,suffix=-{{sha}},event=pr
type=semver,pattern={{version}}
latest
type=raw,value=latest

- name: 📦 Build and push image
uses: docker/build-push-action@v5
Expand All @@ -160,12 +165,17 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

- name: 🔍️ Set image name
run: |
IMAGE_ID=$(echo $DOCKER_METADATA_OUTPUT_TAGS | cut -d ' ' -f 1)
echo "IMAGE_ID=$IMAGE_ID" >> $GITHUB_ENV

- name: 🚀 Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v2
with:
service: app
image: gcr.io/${{ secrets.PROJECT_ID }}/app
image: ${{ env.IMAGE_ID }}
region: us-central1
flags: |
--service-account=cloud-run-sa@${{ secrets.PROJECT_ID }}.iam.gserviceaccount.com
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push.front.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Front End Workflow
on:
push:
paths:
- 'src/ClientApp/**'
- '.github/workflows/node.yml'
- "src/ClientApp/**"
- ".github/workflows/push.front.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"request": "launch",
"name": "Debug",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/bin/Debug/net7.0/app.dll",
"program": "${workspaceFolder}/src/bin/Debug/net8.0/app.dll",
"args": [],
"cwd": "${workspaceFolder}/src",
"stopAtEntry": false,
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"coverage-gutters.showLineCoverage": true,
"coverage-gutters.showRulerCoverage": false,
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
},
"editor.formatOnSave": true,
"editor.rulers": [
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ _If you are using vscode, download the recommended extensions from this workspac
- `cd src/ClientApp`
1. Using node lts get all of the project dependencies
- `npm install`
1. Rename `src/ClientApp/.env-cmdrc.template.json` to `src/ClientApp/.env-cmdrc.json` and add the correct values
1. Duplicate `src/ClientApp/.env` to `src/ClientApp/.env.local` and add the correct values
1. Start the development server
- `npm start`

_The offender feature service will not function since the reverse proxy dotnet service is not running._

### asp.net core mvc

1. Install the [dotnet 7.0.\* SDK](https://dotnet.microsoft.com/download/dotnet/7.0)
1. Install the [dotnet 8.0.\* SDK](https://dotnet.microsoft.com/download/dotnet/8.0)
1. Create an `appsettings.Development.json` file to overwrite and add properties to the `appsettings.json` file for development
1. Add an `ArcGIS` property in `appsettings.Development.json` with the following properties filled out

Expand Down
25 changes: 25 additions & 0 deletions parole-and-probation.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "app", "src\app.csproj", "{B2C45A76-23CC-49D3-B31E-60DA3033B34D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B2C45A76-23CC-49D3-B31E-60DA3033B34D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B2C45A76-23CC-49D3-B31E-60DA3033B34D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B2C45A76-23CC-49D3-B31E-60DA3033B34D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B2C45A76-23CC-49D3-B31E-60DA3033B34D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1A78DDEA-4174-4F0E-880D-CE7CC33241D8}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
module.exports = {
export default {
addons: ['@storybook/addon-essentials'],
stories: ['../src/**/*/*.stories.{js,jsx}'],
features: {
storyStoreV7: true
},
framework: {
name: '@storybook/react-vite',
options: {}
},
docs: {
autodocs: true
}
};
};
Loading
Loading