Skip to content

Commit 47044d1

Browse files
Merge pull request microsoft#72 from microsoft/hotfix
Hotfix to main branch
2 parents 39c913c + add28a4 commit 47044d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3626
-1286
lines changed

.flake8

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
max-line-length = 88
3+
extend-ignore = E501
4+
exclude = .venv, frontend
5+
ignore = E203, W503, G004, G200,B008,ANN,D100,D101,D102,D103,D104,D105,D106,D107,D205,D400,D401,D200

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Lines starting with '#' are comments.
2+
# Each line is a file pattern followed by one or more owners.
3+
4+
# These owners will be the default owners for everything in the repo.
5+
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @aniaroramsft @marktayl1 @Vinay-Microsoft
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
# Describe the bug
11+
A clear and concise description of what the bug is.
12+
13+
# Expected behavior
14+
A clear and concise description of what you expected to happen.
15+
16+
# How does this bug make you feel?
17+
_Share a gif from [giphy](https://giphy.com/) to tells us how you'd feel_
18+
19+
---
20+
21+
# Debugging information
22+
23+
## Steps to reproduce
24+
Steps to reproduce the behavior:
25+
1. Go to '...'
26+
2. Click on '....'
27+
3. Scroll down to '....'
28+
4. See error
29+
30+
## Screenshots
31+
If applicable, add screenshots to help explain your problem.
32+
33+
## Logs
34+
35+
If applicable, add logs to help the engineer debug the problem.
36+
37+
---
38+
39+
# Tasks
40+
41+
_To be filled in by the engineer picking up the issue_
42+
43+
- [ ] Task 1
44+
- [ ] Task 2
45+
- [ ] ...
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
# Motivation
11+
12+
A clear and concise description of why this feature would be useful and the value it would bring.
13+
Explain any alternatives considered and why they are not sufficient.
14+
15+
# How would you feel if this feature request was implemented?
16+
17+
_Share a gif from [giphy](https://giphy.com/) to tells us how you'd feel. Format: ![alt_text](https://media.giphy.com/media/xxx/giphy.gif)_
18+
19+
# Requirements
20+
21+
A list of requirements to consider this feature delivered
22+
- Requirement 1
23+
- Requirement 2
24+
- ...
25+
26+
# Tasks
27+
28+
_To be filled in by the engineer picking up the issue_
29+
30+
- [ ] Task 1
31+
- [ ] Task 2
32+
- [ ] ...

.github/ISSUE_TEMPLATE/subtask.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Sub task
3+
about: A sub task
4+
title: ''
5+
labels: subtask
6+
assignees: ''
7+
8+
---
9+
10+
Required by <link to parent issue>
11+
12+
# Description
13+
14+
A clear and concise description of what this subtask is.
15+
16+
# Tasks
17+
18+
_To be filled in by the engineer picking up the subtask
19+
20+
- [ ] Task 1
21+
- [ ] Task 2
22+
- [ ] ...

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Purpose
2+
<!-- Describe the intention of the changes being proposed. What problem does it solve or functionality does it add? -->
3+
* ...
4+
5+
## Does this introduce a breaking change?
6+
<!-- Mark one with an "x". -->
7+
8+
- [ ] Yes
9+
- [ ] No
10+
11+
<!-- Please prefix your PR title with one of the following:
12+
* `feat`: A new feature
13+
* `fix`: A bug fix
14+
* `docs`: Documentation only changes
15+
* `style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
16+
* `refactor`: A code change that neither fixes a bug nor adds a feature
17+
* `perf`: A code change that improves performance
18+
* `test`: Adding missing tests or correcting existing tests
19+
* `build`: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
20+
* `ci`: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
21+
* `chore`: Other changes that don't modify src or test files
22+
* `revert`: Reverts a previous commit
23+
* !: A breaking change is indicated with a `!` after the listed prefixes above, e.g. `feat!`, `fix!`, `refactor!`, etc.
24+
-->
25+
26+
## Golden Path Validation
27+
- [ ] I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.
28+
29+
## Deployment Validation
30+
- [ ] I have validated the deployment process successfully and all services are running as expected with this change.
31+
32+
## What to Check
33+
Verify that the following are valid
34+
* ...
35+
36+
## Other Information
37+
38+
<!-- Add any other helpful information that may be needed here. -->
39+

.github/dependabot.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
version: 2
2+
updates:
3+
# GitHub Actions dependencies
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"
8+
commit-message:
9+
prefix: "build"
10+
target-branch: "dependabotchanges"
11+
open-pull-requests-limit: 100
12+
13+
- package-ecosystem: "pip"
14+
directory: "/src/backend"
15+
schedule:
16+
interval: "monthly"
17+
commit-message:
18+
prefix: "build"
19+
target-branch: "dependabotchanges"
20+
open-pull-requests-limit: 100
21+
22+
- package-ecosystem: "pip"
23+
directory: "/src/frontend"
24+
schedule:
25+
interval: "monthly"
26+
commit-message:
27+
prefix: "build"
28+
target-branch: "dependabotchanges"
29+
open-pull-requests-limit: 100
30+
31+
- package-ecosystem: "npm"
32+
directory: "/src/frontend"
33+
schedule:
34+
interval: "monthly"
35+
commit-message:
36+
prefix: "build"
37+
target-branch: "dependabotchanges"
38+
open-pull-requests-limit: 100
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
name: Create-Release
11+
12+
jobs:
13+
create-release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.workflow_run.head_sha }}
20+
21+
- uses: codfish/semantic-release-action@v3
22+
id: semantic
23+
with:
24+
tag-format: 'v${version}'
25+
additional-packages: |
26+
['conventional-changelog-conventionalcommits@7']
27+
plugins: |
28+
[
29+
[
30+
"@semantic-release/commit-analyzer",
31+
{
32+
"preset": "conventionalcommits"
33+
}
34+
],
35+
[
36+
"@semantic-release/release-notes-generator",
37+
{
38+
"preset": "conventionalcommits",
39+
"presetConfig": {
40+
"types": [
41+
{ type: 'feat', section: 'Features', hidden: false },
42+
{ type: 'fix', section: 'Bug Fixes', hidden: false },
43+
{ type: 'perf', section: 'Performance Improvements', hidden: false },
44+
{ type: 'revert', section: 'Reverts', hidden: false },
45+
{ type: 'docs', section: 'Other Updates', hidden: false },
46+
{ type: 'style', section: 'Other Updates', hidden: false },
47+
{ type: 'chore', section: 'Other Updates', hidden: false },
48+
{ type: 'refactor', section: 'Other Updates', hidden: false },
49+
{ type: 'test', section: 'Other Updates', hidden: false },
50+
{ type: 'build', section: 'Other Updates', hidden: false },
51+
{ type: 'ci', section: 'Other Updates', hidden: false }
52+
]
53+
}
54+
}
55+
],
56+
'@semantic-release/github'
57+
]
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.TOKEN }}
60+
- run: echo ${{ steps.semantic.outputs.release-version }}
61+
62+
- run: echo "$OUTPUTS"
63+
env:
64+
OUTPUTS: ${{ toJson(steps.semantic.outputs) }}
65+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build Docker and Optional Push
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
- demo
9+
- hotfix
10+
pull_request:
11+
branches:
12+
- main
13+
- dev
14+
- demo
15+
- hotfix
16+
types:
17+
- opened
18+
- ready_for_review
19+
- reopened
20+
- synchronize
21+
merge_group:
22+
workflow_dispatch:
23+
24+
jobs:
25+
docker-build:
26+
strategy:
27+
matrix:
28+
include:
29+
- app_name: cmsabackend
30+
dockerfile: docker/Backend.Dockerfile
31+
password_secret: DOCKER_PASSWORD
32+
- app_name: cmsafrontend
33+
dockerfile: docker/Frontend.Dockerfile
34+
password_secret: DOCKER_PASSWORD
35+
uses: ./.github/workflows/build-docker.yml
36+
with:
37+
registry: cmsacontainerreg.azurecr.io
38+
username: cmsacontainerreg
39+
password_secret: ${{ matrix.password_secret }}
40+
app_name: ${{ matrix.app_name }}
41+
dockerfile: ${{ matrix.dockerfile }}
42+
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }}
43+
secrets: inherit

.github/workflows/build-docker.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Reusable Docker build and push workflow
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
registry:
7+
required: true
8+
type: string
9+
username:
10+
required: true
11+
type: string
12+
password_secret:
13+
required: true
14+
type: string
15+
app_name:
16+
required: true
17+
type: string
18+
dockerfile:
19+
required: true
20+
type: string
21+
push:
22+
required: true
23+
type: boolean
24+
secrets:
25+
DOCKER_PASSWORD:
26+
required: true
27+
28+
jobs:
29+
docker-build:
30+
runs-on: ubuntu-latest
31+
steps:
32+
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
36+
- name: Docker Login
37+
if: ${{ inputs.push }}
38+
uses: docker/login-action@v3
39+
with:
40+
registry: ${{ inputs.registry }}
41+
username: ${{ inputs.username }}
42+
password: ${{ secrets[inputs.password_secret] }}
43+
44+
- name: Set up Docker Buildx
45+
uses: docker/setup-buildx-action@v3
46+
47+
- name: Get current date
48+
id: date
49+
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
50+
51+
- name: Determine Tag Name Based on Branch
52+
id: determine_tag
53+
run: |
54+
if [[ "${{ github.ref_name }}" == "main" ]]; then
55+
echo "tagname=latest" >> $GITHUB_OUTPUT
56+
elif [[ "${{ github.ref_name }}" == "dev" ]]; then
57+
echo "tagname=dev" >> $GITHUB_OUTPUT
58+
elif [[ "${{ github.ref_name }}" == "demo" ]]; then
59+
echo "tagname=demo" >> $GITHUB_OUTPUT
60+
elif [[ "${{ github.ref_name }}" == "hotfix" ]]; then
61+
echo "tagname=hotfix" >> $GITHUB_OUTPUT
62+
else
63+
echo "tagname=default" >> $GITHUB_OUTPUT
64+
fi
65+
66+
67+
- name: Build Docker Image and optionally push
68+
uses: docker/build-push-action@v6
69+
with:
70+
context: .
71+
file: ${{ inputs.dockerfile }}
72+
push: ${{ inputs.push }}
73+
cache-from: type=registry,ref=${{ inputs.registry }}/${{ inputs.app_name}}:${{ steps.determine_tag.outputs.tagname }}
74+
tags: |
75+
${{ inputs.registry }}/${{ inputs.app_name}}:${{ steps.determine_tag.outputs.tagname }}
76+
${{ inputs.registry }}/${{ inputs.app_name}}:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}

0 commit comments

Comments
 (0)