Skip to content

codehub-learn/GTGH-AI-Engineering-Day-5-CICD

Repository files navigation

Session B: Professional Project Setup & MLOps Foundation Defining and tracking Project Goals Effective Git workflow (branching, pull requests) Introduction to CI/CD pipelines with GitHub Actions

Lesson Plan

  1. Discuss the following as first approach on monitoring our project
  2. Go through and follow the steps
    • Spend time on ci_pipeline.yalm and on how the process actually runs

📝 Note: Your public profile must be download from your azrure portal and be set as a secret variable in your github repos

  • Steps
    • Go to your Azure Function App in the Azure Portal.
    • Navigate to Deployment Center > Manage publish profile.
    • Download the profile and copy its contents.
    • In GitHub, go to your repo’s Settings > Secrets and variables > Actions -> New Repository Secrets
    • Create a new secret named AZURE_FUNCTIONAPP_PUBLISH_PROFILE and paste the profile contents

🚀 Python Azure Function CI/CD Pipeline

This project sets up a CI/CD pipeline for deploying a Python-based Azure Function using GitHub Actions. The goal is to automate code checks and deployment to Azure upon each push to the main branch.


✅ Project Goals

  • Create Azure Function App

    • [✅] Set up the Function App in Azure
    • [✅] Configure Python runtime
  • Initialize Git Repository

    • Add source code and config files
    • Include .gitignore for Python/Azure
  • Set Up CI/CD Workflow

    • Use GitHub Actions or other CI/CD tool
    • Trigger workflow on push to main
  • Add Code Quality Checks

    • Integrate flake8, black, or pylint
    • Fail pipeline if checks fail
  • Run Unit Tests

    • Add test suite (pytest, unittest)
    • Run tests in CI/CD pipeline
  • Deploy to Azure

    • Use azure/functions-action or Azure CLI
    • Deploy only if checks/tests pass
  • Secure Secrets

    • Store credentials in GitHub Secrets
    • Use secrets in workflow securely
  • Enable Monitoring

    • Configure logging in Azure
    • Optionally integrate Application Insights

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages