Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
a5724f5
Add GitHub Actions workflow for backend deployment
Khalilelk20 Jan 14, 2026
41ec392
infrastrcuture modules
Khalilelk20 Jan 14, 2026
3faefdc
step 1
Khalilelk20 Jan 14, 2026
2302399
deploy statical web app
Khalilelk20 Jan 14, 2026
0f57ef6
deploy statical web app step
Khalilelk20 Jan 14, 2026
c8d4495
Rename staticwebApp.bicep to staticWebApp.bicep
Khalilelk20 Jan 14, 2026
e4f6feb
duplicate app name on bicep main correction
Khalilelk20 Jan 14, 2026
73ffc99
Merge branch 'main' of https://github.com/Khalilelk20/parkndeploy
Khalilelk20 Jan 14, 2026
d804cc5
static web app bicep file review
Khalilelk20 Jan 14, 2026
13e7c56
deploy front end
Khalilelk20 Jan 14, 2026
817abbb
front end deploy
Khalilelk20 Jan 14, 2026
78aacd3
Update deploy-infra-and-apps.yml
Khalilelk20 Jan 14, 2026
97aa1c3
review gitflow yaml
Khalilelk20 Jan 14, 2026
a1adfa5
Merge branch 'main' of https://github.com/Khalilelk20/parkndeploy
Khalilelk20 Jan 14, 2026
3cdb024
review yaml gitflow file
Khalilelk20 Jan 14, 2026
b64f73d
review yaml workflow
Khalilelk20 Jan 14, 2026
663e67a
review yaml code
Khalilelk20 Jan 14, 2026
37cd7a2
correction workflow yaml
Khalilelk20 Jan 14, 2026
dc927ef
troubleshooting
Khalilelk20 Jan 14, 2026
0d7907c
troubleshooting frontend & backend
Khalilelk20 Jan 14, 2026
7ded8b3
ci: trigger deployment on semantic version tag
Khalilelk20 Jan 20, 2026
07a64b3
tag deployment
Khalilelk20 Jan 20, 2026
6c9a846
Add CI workflow for frontend and backend jobs
Khalilelk20 Jan 20, 2026
8d841e2
Refactor CI workflow for pull requests
Khalilelk20 Jan 20, 2026
1362fbb
Test CI pipeline
Khalilelk20 Jan 20, 2026
b828b40
Merge pull request #1 from Khalilelk20/feature/test-ci
Khalilelk20 Jan 20, 2026
e5c2d99
Add CI release pipeline for frontend and backend
Khalilelk20 Jan 20, 2026
6113315
Refactor GitHub Actions workflow for deployment
Khalilelk20 Jan 20, 2026
7f24945
Add workflow_run trigger for CI Release Pipeline
Khalilelk20 Jan 20, 2026
ed9df4b
Upgrade download-artifact action to version 4
Khalilelk20 Jan 20, 2026
0a8d382
Upgrade upload-artifact action to version 4
Khalilelk20 Jan 20, 2026
d8443cf
CI Release Pipeline
Khalilelk20 Jan 20, 2026
33180e9
Merge branch 'main' of https://github.com/Khalilelk20/parkndeploy
Khalilelk20 Jan 20, 2026
08383dc
Update workflow to remove tag push trigger
Khalilelk20 Jan 20, 2026
0669f31
Update CI workflow trigger to version tags
Khalilelk20 Jan 20, 2026
b918464
CI RELEASE TEST
Khalilelk20 Jan 20, 2026
8354964
Update workflow to trigger only on CI completion
Khalilelk20 Jan 20, 2026
bd0a644
CI CD WORKFLOW TEST
Khalilelk20 Jan 20, 2026
9c319c0
Merge branch 'main' of https://github.com/Khalilelk20/parkndeploy
Khalilelk20 Jan 20, 2026
22fcd61
CICD PIPELINE
Khalilelk20 Jan 20, 2026
8d8b62b
Remove unused workflow_dispatch event
Khalilelk20 Jan 20, 2026
892d600
CICD TEST
Khalilelk20 Jan 20, 2026
4851934
Refactor GitHub Actions workflow for CI/CD
Khalilelk20 Jan 20, 2026
f49454b
Delete .github/workflows/ci-release.yml
Khalilelk20 Jan 20, 2026
c5f3cbb
Upgrade GitHub Actions artifact upload/download to v4
Khalilelk20 Jan 20, 2026
6f0943b
TEST CICD PIP
Khalilelk20 Jan 20, 2026
0ab2256
REVIEW PIPELINE
Khalilelk20 Jan 20, 2026
18df180
REVIEW PIPELINE
Khalilelk20 Jan 20, 2026
0be06f6
REVIEW CICD WORKFLOW
Khalilelk20 Jan 20, 2026
f707bbe
feat: display app version
Khalilelk20 Jan 20, 2026
c6de362
feat: display app version
Khalilelk20 Jan 20, 2026
1fc0c7a
feat: display app version
Khalilelk20 Jan 20, 2026
6b1c7bc
Update code version
Khalilelk20 Jan 20, 2026
a5d98bc
chore: bump version to v7.7.7 [skip ci]
github-actions[bot] Jan 20, 2026
c8628c6
PIPELINE REFACTORING
wissalhacob Jan 21, 2026
e9e1b09
PIPELINE REFACTORING
wissalhacob Jan 21, 2026
2a439d9
chore: bump version to v7.7.8 [skip ci]
github-actions[bot] Jan 21, 2026
e537ee6
Split CI and CD pipeline into two workflows
wissalhacob Jan 21, 2026
d013b7f
Split CI and CD pipeline into two workflows
wissalhacob Jan 21, 2026
dcf0316
Merge branch 'main' of https://github.com/Khalilelk20/parkndeploy
wissalhacob Jan 21, 2026
5306b92
Split your CI and CD pipeline into two workflows
wissalhacob Jan 21, 2026
823c0f8
chore: bump version to v7.7.9 [skip ci]
github-actions[bot] Jan 21, 2026
dea3b3f
Least Privilege Principle
wissalhacob Jan 21, 2026
42eb0bf
Least Privilege Principle
wissalhacob Jan 21, 2026
97e281e
Least Privilege Principle
wissalhacob Jan 21, 2026
bfd3c87
chore: bump version to v8.0.0 [skip ci]
github-actions[bot] Jan 21, 2026
6a1cec9
Split CI and CD pipeline into two workflows
wissalhacob Jan 21, 2026
c6e1c87
Merge branch 'main' of https://github.com/Khalilelk20/parkndeploy
wissalhacob Jan 21, 2026
7300c13
Split CI & CD worfklows
wissalhacob Jan 21, 2026
d1b52ca
chore: bump version to v8.0.1 [skip ci]
github-actions[bot] Jan 21, 2026
c3d0274
Split CI & CD Workflows
wissalhacob Jan 21, 2026
f7d6039
Merge branch 'main' of https://github.com/Khalilelk20/parkndeploy
wissalhacob Jan 21, 2026
d566c89
Split CI & CD Workflows
wissalhacob Jan 21, 2026
7d78f03
chore: bump version to v8.0.2 [skip ci]
github-actions[bot] Jan 21, 2026
db4f158
Debug: List Artifact for CI Run
wissalhacob Jan 21, 2026
25fc322
chore: bump version to v8.0.3 [skip ci]
github-actions[bot] Jan 21, 2026
64209f7
Refactoring After Debuging (Split CI & CD on 2 Workflows)
wissalhacob Jan 21, 2026
78e5260
chore: bump version to v8.0.4 [skip ci]
github-actions[bot] Jan 21, 2026
8663957
Update README with course description and resources
Khalilelk20 Mar 2, 2026
85076b2
Delete doc directory
Khalilelk20 Mar 2, 2026
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
34 changes: 34 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
pull_request: # Ce workflow se déclenche uniquement sur les MR

jobs:
ci_merge_request:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Backend
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- name: Build backend
run: dotnet build --configuration Release
working-directory: ./backend

# Frontend
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '21.7.1'

- name: Build frontend
run: npm install && npm run build
working-directory: ./frontend

- name: Lint frontend
run: npm run lint
working-directory: ./frontend
100 changes: 100 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# --------------------------
# Pipeline CI
# Déclenche uniquement sur push d'un tag vMAJOR.MINOR.PATCH
# --------------------------
name: "ci_pipeline"
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
# --------------------------
# CI Frontend : build & artifact
# --------------------------
ci_frontend:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '21.7.1'

- name: Install & Build Frontend
run: npm install && npm run build
env:
VITE_APP_VERSION: ${{ github.ref_name }}
working-directory: ./frontend

- name: Upload Frontend Artifact
uses: actions/upload-artifact@v4
with:
name: frontend-dist
path: ./frontend/dist
retention-days: 2

package_version:
runs-on: ubuntu-latest
permissions:
contents: write
needs: [ci_frontend]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '21.7.1'

# 1. On change la version dans le fichier package.json localement
- name: Update package.json version
working-directory: ./frontend
run: npm version ${{ github.ref_name }} --no-git-tag-version

# 2. On sauvegarde ce changement sur le dépôt GitHub
- name: Commit and Push version update
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add frontend/package.json
# Le [skip ci] est crucial pour ne pas relancer le pipeline en boucle !
git commit -m "chore: bump version to ${{ github.ref_name }} [skip ci]"
git push origin HEAD:main

# --------------------------
# CI Backend : publish & artifact
# --------------------------
ci_backend:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- name: Publish Backend
run: dotnet publish -c Release -o ./myapp
working-directory: ./backend

- name: Upload Backend Artifact
uses: actions/upload-artifact@v4
with:
name: backend-publish
path: ./backend/myapp
retention-days: 2
137 changes: 137 additions & 0 deletions .github/workflows/deploy-infra-and-apps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# --------------------------
# Pipeline CD
# Déclenche uniquement sur la complétion du CI pipeline
# --------------------------
name: "cd_pipeline"
on:
workflow_run:
workflows: ["ci_pipeline"]
types: completed


# Variables globales pour le workflow
env:
AZURE_RG_NAME: rg-${{ vars.PROJECT_NAME }}-${{ vars.AZURE_RESOURCE_IDENTIFIER }}

jobs:

# --------------------------
# CD : Déployer l'infrastructure
# --------------------------
deploy_infrastructure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
permissions:
id-token: write
contents: read
environment: production

outputs:
appServiceName: ${{ steps.bicep_deploy.outputs.appServiceName }}
staticWebAppName: ${{ steps.bicep_deploy.outputs.staticWebAppName }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true

- name: Create resource group if not exists
run: |
az group show --name ${{ env.AZURE_RG_NAME }} || \
az group create --name ${{ env.AZURE_RG_NAME }} --location ${{ secrets.AZURE_REGION }}

- name: Deploy Bicep
id: bicep_deploy
uses: azure/arm-deploy@v2
with:
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }}
region: ${{ secrets.AZURE_REGION }}
template: ./infrastructure/main.bicep
parameters: project=${{ vars.PROJECT_NAME }} location=${{ secrets.AZURE_REGION }} swaLocation=${{ secrets.AZURE_SWA_REGION }} identifier=${{ vars.AZURE_RESOURCE_IDENTIFIER }}
resourceGroupName: ${{ env.AZURE_RG_NAME }}

# --------------------------
# CD Backend : télécharger artifact & déployer
# --------------------------
deploy_backend:
runs-on: ubuntu-latest
needs: [deploy_infrastructure]
permissions:
id-token: write
contents: read
actions: read
environment: production
steps:
- name: Checkout
uses: actions/checkout@v4


- name: Download Backend Artifact
uses: actions/download-artifact@v4
with:
name: backend-publish
run-id: ${{ github.event.workflow_run.id }}
path: ./backend-publish

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Deploy Backend to App Service
uses: azure/webapps-deploy@v2
with:
app-name: ${{ needs.deploy_infrastructure.outputs.appServiceName }}
package: ./backend-publish

# --------------------------
# CD Frontend : télécharger artifact & déployer
# --------------------------
deploy_frontend:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
actions: read
needs: [deploy_infrastructure]
environment: production
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download Frontend Artifact
uses: actions/download-artifact@v4
with:
name: frontend-dist
run-id: ${{ github.event.workflow_run.id }}
path: ./frontend/dist

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Get Static Web App Deployment Token
run: |
SWA_DEPLOYMENT_TOKEN=$(az staticwebapp secrets list -n ${{ needs.deploy_infrastructure.outputs.staticWebAppName }} -o tsv --query properties.apiKey)
echo "SWA_DEPLOYMENT_TOKEN=$SWA_DEPLOYMENT_TOKEN" >> $GITHUB_ENV

- name: Deploy Frontend to Static Web App
uses: azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ env.SWA_DEPLOYMENT_TOKEN }}
app_location: ./frontend/dist
action: upload
skip_app_build: true
skip_api_build: true
111 changes: 1 addition & 110 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,111 +1,2 @@
# Description
`ParkNDeploy` is an introductory DevOps course designed to guide you through deploying a basic Parking Finder App on Azure.

It follows [GitRDone](https://github.com/jraillard/gitrdone), a hands-on course to get you up to speed with version control using Git.

This course covers continuous integration and continuous deployment (CI/CD) pipelines, as well as infrastructure-as-code (IaC) practices.

## Prerequisites

### Tools

- An Azure Account in order to deploy your App :rocket:
- [Azure Students](./doc/azure_students.md)
- [Classic one](https://azure.microsoft.com/pricing/purchase-options/azure-account?icid=azurefreeaccount) (you will be ask to put a credit card even if nothing is debited)

- A GitHub account in order to fork this repo and start to work :wink:

- A source code management tool :
- Git Bash for CLI guys :sunglasses:
- [Fork](https://git-fork.com/) for GUI guys :star:

- **[Optional]** IDEs to build the app locally :
- Visual Studio Community with .Net 9 SDK (Backend)
- Visual Studio Code & Node JS >= 21.7.1 (Frontend)

### Knowledges

- **[Appreciated]** Basic repository management (commits, push, merge-request)
- **[Optional]** Basic understanding of APIs
- **[Optional]** Basic understanding of SPAs

## Build the App locally

[Getting the project](#getting-the-project) is mandatory.
[Backend](#backend) and [Frontend](#frontend) build step will only be mandatory at the end of this workshop.

### Getting the project

First of all, you'll need to get the source code :grin: :

- Fork this project on your personnal GitHub account

:warning: Keep `Copy the DEFAULT branch only` option checked (to avoid conflicts between branch names).

> If you never made a fork, just follow the steps mentionned [here](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#forking-a-repository) :eyes:.

- Clone the project on your local machine

> Again, if you never did it, just follow the steps mentionned [here](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#cloning-your-forked-repository) :eyes:.

- And that's it ! :sparkles:

> :bulb: The repository will contain the `main` branch as you're starting point.
> You're free to use `feature branches` or not.
>
> If for some reasons you're blocked during this workshop, you can check
> `solution-<currentYear>` branches on the main repository.:smirk:

### Backend
---
Easiest one :
- Open the `ParkNDeploy.sln` file with Visual Studio
- Hit the `Run` button using the `Project Https` profile (default one)
- Wait the Swagger API to launch on your default navigator
- You can start to play with it to see what it does :video_game:

> Some details about how the API is made and what it does could be find in the [backend README file](./backend/README.md).

### Frontend
---

Follow the next steps :

:one: Open the `./frontend` folder with Visual Studio Code

:two: Open a command line terminal using `CTRL+ù` hotkey or through the `Terminal menu` on the top of Visual Studio Code

:three: Run the following commands :

```bash
# This will download all the dependencies for the frontend
npm install

# This will compiles and run the frontend app under a Vite developpement server
npm run dev

# If it works, you should see a localhost URL link
```

:four: Show the app in browser, here you have two possibilities :

- Without Visual Studio Code debugger : just `CTRL+Click` on the localhost URL that is being displayed on the terminal you just launched before

- With Visual Studio Code debugger :
- Hit `CTRL+SHIFT+D` hotkey or click on ![debug icon](./doc/assets/vscode_debug_icon.png) in the left navigation bar

- Click on ![play button](./doc/assets/vscode_debug_play_button.png)

&rarr; Basically VS Code will run the [launch.json config](./frontend/.vscode/launch.json) which launch a Chrome navigator and attach the VS Code debugger to the frontend app process. This will allow you to debug through breakpoints and so on inside Visual Studio code (instead of spamming your source code with `console.log()` :stuck_out_tongue_winking_eye:).

> Some details about how the Frontend App is made and what it does could be find in the [frontend README file](./frontend/README.md)

## Let's dive-In !

:rocket: Buckle up, folks! It's time to blast off to the [first step](./doc/step0_studying_devops.md) of our course. Ready, set, deploy!

## Additional Resources (for DevOps enthusiastics)

First of all, I hope this initiation gave you interest into DevOps concepts and that you understand how it could help you in your day-to-day tasks in real-world project.

Now for a treasure trove of additional resources to dive deeper into DevOps concepts, check out the [**to go further section**](doc/to_go_further.md). :eyes:
Deploying a basic Parking Finder App on Azure.
Binary file removed doc/assets/app_service_default_page.png
Binary file not shown.
Binary file removed doc/assets/azure_portal.png
Binary file not shown.
Binary file removed doc/assets/backend_swagger.png
Binary file not shown.
Binary file removed doc/assets/final_deployed_app.png
Binary file not shown.
Binary file removed doc/assets/react_app_no_backend_error.png
Binary file not shown.
Binary file removed doc/assets/swa_default_page.png
Binary file not shown.
Binary file removed doc/assets/uai_role_assignment.png
Binary file not shown.
Binary file removed doc/assets/vscode_debug_icon.png
Binary file not shown.
Binary file removed doc/assets/vscode_debug_play_button.png
Binary file not shown.
Loading