Giter Club home page Giter Club logo

powerplatform-alm-with-github-template's Introduction

Power Platform ALM With GitHub - Template

Simplify Power Platform / Dynamics 365 development using GitHub!

📢 What is the PowerPlatform-ALM-With-GitHub-Template project?

It is a GitHub repository that can be easily used as a starting point to create your own repository for Power Platform / Dynamics 365 development.

It contains components (GitHub workflows, PowerShell scripts...) that will help you have a healthy application lifecycle management (ALM) strategy for Power Platform / Dynamics 365 applications using GitHub.

🚀 Goals

  1. Provide an easy way to setup a GitHub repository for Power Platform / Dynamics 365 development.
  2. Propose a starting point allowing a development team to customize the included components based on their own needs.
  3. Illustrate that we can automate many things related to the Power Platform to support an healthy ALM strategy.
  4. Be a complement to the work done around ALM in other repositories like coe-starter-kit and coe-alm-accelerator-templates.
  5. Show that a trunk-based development approach can be applied to Power Platform / Dynamics 365 development.
  6. Be an inspiration for the Power Platform & Dynamics 365 communities regarding using GitHub to support open-source projects that could benefit others.

Non-goals

  1. Be the best "solution" for Power Platform / Dynamics 365 development using GitHub - our expectations are high regarding the quality of the solution we will propose, but we will always support other similar projects, initiatives or ideas.
  2. Cover all the aspects of Power Platform / Dynamics 365 development - it is a really long-term goal and I (@rpothin) don't think I will be able to achieve it alone.

📖 Documentation

Setup and configurations

Others

📅 Roadmap

Keep an eye 👀 on:

  • the ⚒ Backlog to know what's in progress and what's coming next
  • the Changelog to know what has already been done

❗ Code of Conduct

I, Raphael Pothin (@rpothin), as creator of this project, am dedicated to providing a welcoming, diverse, and harrassment-free experience for everyone. I expect everyone visiting or participating in this project to abide by the following Code of Conduct. Please read it.

👐 Contributing to this project

From opening a bug report to creating a pull request: every contribution is appreciated and welcomed. For more information, see CONTRIBUTING.md

Not Sure Where to Start?

If you want to participate to this project, but you are not sure how you can do it, do not hesitate to contact @rpothin:

Contributors

Thanks to the following people who have contributed to this project:


Raphael Pothin

🤔 💻 🖋 📖 🚧 📆 ⚠️

This project follows the all-contributors specification. Everyone who would like to contribute to it is welcome!

📝 License

All files in this repository are subject to the MIT license.

💡 Inspiration

We would like to thank the open-source projects below that helped us find some ideas on how to organize this project.

powerplatform-alm-with-github-template's People

Contributors

allcontributors[bot] avatar dependabot[bot] avatar renaat-cdx avatar rpothin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

stefaan902

powerplatform-alm-with-github-template's Issues

[Bug 🐜] Solution versioning model proposed reached format limits

During some tests (ex: 5-import-solution-to-validation #103) I have encountered the following unexpected error in the solution pack step:
Error: Invalid format for element 'Version'; Should be 'x.x.x.x' where x is an integer.

After some investigations, by manually updating the solution version in the Power Apps maker portal, I found that solution versioning model (major.minor.yyyymmddxxx with xxx the github.run_number predefined variable) proposed in this repository reached some limits:

  • 1.0.20220508103 ==> Error
  • 1.0.2022050899 ==> Ok
  • 1.0.20220508100 ==> Error

To avoid this kind of errors, and providing a better scalability for the model proposed in this repository, I propose a new versioning model: major.yyyymmdd.xxx with xxx the github.run_number

[Idea 💡] Manage configurations used in workflows in a file

The ALM strategy proposed in the template repository involved (at least today 😊) the creation of different environments (development and build).

Currently, the configuration details required by the create-environment action are managed in GitHub secrets.

I think this way of managing this kind of information (not really confidential) is a little bit "overkilled".

I would like to manage these configuration details in a file that would be used in the different workflows where we create an environment.

[Idea 💡] Automate the configuration of Azure Application Insights Instrumentation Key in canvas apps

The idea would be to consider different Azure Applications Insights for the canvas apps through different environments (at least one for production and one for non-production work).

Idea: It seems in the unpacked canvas app there is a "AppInsightsKey.json" file that contains the instrumentation key. We could set the value to "00000000-0000-0000-0000-000000000000" during the export and then update it again before the pack step for the import of the solution based on values in the "CustomDeploymentSettings_%.json" files.

Microsoft documentation: https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/application-insights

[Idea 💡] Add configurations for the execution of the solution checker in the "global" configurations file

The environment variables below from the solution-quality-check-on-pr workflow should be moved to the configurations.json file.

solution_checker_result_output_directory:  solutionchecker/ # Output folder for the results of the solution checker execution
solution_checker_geography: Canada # Considered geography for the solution checker execution (https://docs.microsoft.com/en-us/power-platform/alm/checker-api/overview#determine-a-geography)
solution_checker_max_nb_medium_severity_points: 5 # Maximum number of the Medium severity points that will be tolerate in the solution checker results
solution_checker_max_nb_high_severity_points: 0 # Maximum number of the High severity points that will be tolerate in the solution checker results

[Technical Debt ⚒] Add path filters for the trigger of the "solution-quality-check-on-pr" workflow

Currently this workflow triggers on pull requests targeting the main branch without path restrictions.
But because the goal of this repository is to work on Power Platform development (not on the GitHub workflows inside this repository for example) we should definitely consider adding some path filtering in the tigger of this worklow.

For example, in the import-solution-to-validation workflow we have the following trigger:

on:
  push:
    branches: [ main ]
    paths:
      - 'Solutions/**'
      - '!.github/**'
      - '!Scripts/**'
      - '!Configurations/**'
      - '!.all-contributorsrc'
      - '!CHANGELOG.md'
      - '!CODE_OF_CONDUCT.md'
      - '!CONTRIBUTING.md'
      - '!LICENSE'
      - '!README.md'

[Improvement 👍🏼] Remove cloud flows custom JSON formatting in workflows

Based on information seen in an issue from the CoE Starter Kit - [ALM Accelerator - Feature]: Remove flow json formatting from pipelines GitHub repository and also some tests, it seems the "out-of-the-box" GitHub actions for the export and import of solutions natively handled cloud flows JSON formatting now.

The goal of this issue is to remove the custom code in the workflows to manage the JSON formatting of cloud flows after solution export and before solution import.

[Improvement 👍🏼] Update the cloud flows activation process to handle child flows

Currently, our cloud flows activation process, based on the Enable-CloudFlows.ps1 PowerShell script is not built to handle correctly scenarios with child flows.
Child flows need to be enabled before the cloud flows that use them, and if you try to enable a cloud flow depending on a disabled child flow you will get an error that will stop the GitHub workflow with a failed status.

We need to find a way to make this process more reliable.

Resources:

[Idea 💡] Security group and description management in Dataverse environment creation process

Currently, after the creation of the development environment in the workspace-initialization workflow we create a team on the environment to give access to the developers as System Administrators.

But, in the case of Dynamics 365 environments, if we don't limit access to a specific security group, everyone with a Dynamics 365 license will be created as user on the environment.

From a governance perspective I think we can do better. The goal of this issue will te be to restrict the access to an environment to a specific security group.

[Idea 💡] Update release candidate deployment process

A few points we are thinking of covering in this issue:

  • Remove the creation of release branches and only base the identification of version deployed to production using tags (created with GitHub releases)
  • Integrate the creation of a GitHub release and deployment to the Production environment directly after the deployment to the Validation environment
    • Major version considered for the solution managed in a configuration file
    • Find a better way to automatically generate GitHub release body regarding what has been changed (idea Automatically generated release notes)
  • Confirm that the same commit is used in the different jobs of a GitHub workflow for the deployment of a release candidate (should be ok based on the information in the page of the checkout action)

Image

[Bug 🐜][solution-quality-checks] Timeout on solution import

Bug Description

While importing a solution in the "solution-quality-checks" GitHub workflow, we get a timeout error on the "Import solution as unmanaged to build env" step.

Steps To Reproduce

Trigger a run of the "3-solution-quality-check-on-pr" GitHub workflow by creating a pull request or updating the source branch of a pull request.

Expected Behavior

The considered solution is imported without an error.

Relevant log output

Error: The request channel timed out while waiting for a reply after 00:01:59.9989995. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.
      The request channel timed out while waiting for a reply after 00:01:59.9989995. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.
          The HTTP request to 'https://gh-build-20220127-1***/XRMServices/2011/Organization.svc/web?SDKClientVersion=9.0.46.3291' has exceeded the allotted timeout of 00:02:00. The time allotted to this operation may have been a portion of a longer timeout.
              The operation has timed out

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Technical Debt ⚒] Remove workarounds regarding unpack and pack of canvas apps

Tests

  • For the export-and-unpack-solution workflow, the folders with the source code of the canvas apps should be generated with only one solution unpack
  • For the import-solution-to-validation using the set-canvasapps-instrumentation-key action, the configured Azure Application Insights Instrumentation Key should be considered without the "manual" solution pack step

[Idea 💡] Manage the configuration of the Dataverse environments with code

Depending on the requirements of the applications you build in a Dataverse environment and also the evolution of the platform itself, it could be interesting to manage the configuration of the Dataverse environments involved in the development process (dev, build, validation, production...) with code.

Scope of what we would like to cover in this issue:

  • Languages
  • Organization table
  • DLP policy configuration (related issue to create to dynamically manage the short-lived development environments)
  • Configuration data (like teams, business units...)

[Idea 💡] Consider a team of developers in the "workspace initialization" workflow

Currently, we consider only one developer (email provided in a GitHub secret) in the workspace-initialization-when-issue-assigned workflow.

The goal was to implement a solution to quickly give access to a user to the new development environment just created. But it was definitely more a POC than a final solution.

The next target is to consider the entire development team in this process. Because if another team member need to access the considered just in time development environment to check something or to provide some help, we would like to be sure to have everything correctly set up.

[Idea 💡] Reorganize solution-quality-check-on-pr workflow to be able to use build-managed-solution reusable workflow

Currently, in the solution-quality-checks job of the solution-quality-check-on-pr workflow we build a managed version of a solution using a just-in-time environment but without using the build-managed-solution reusable workflow.

The goal of this issue is to reorganize the solution-quality-check-on-pr workflow to use the build-managed-solution reusable workflow.

Requirements:

  • The solution checker will be executed on the unamanged version of the solution generated in the build-managed-solution reusable workflow.
  • The workflow needs to fail if at least one of the conditions below is not met:
    • Generation of the managed version of the solution without error
    • Solution checker pass the threshold specified in the configuration file

[Idea 💡] Explore unused parameters of the "export-solution" action

New inputs have been added to the export-solution - non-exhaustive list below:

  • export-auto-numbering-settings
  • export-calendar-settings
  • export-customization-settings
  • export-email-tracking-settings
  • export-general-settings
  • export-outlook-synchronization-settings
  • export-relationship-roles

We should definitely try some of these new options at some point to see if it can bring some value to this repository.

[Bug 🐜][export-from-dev][Unpack canvas app source files] Remove-Item - "Access to the path ... is denied."

Bug Description

When we try to remove the Power Platform CLI source code from the local copy of the repository in the agent of a run of the "export-from-dev" GitHub workflow we get the following error: Access to the path 'D:\a\PowerPlatform-ALM-With-GitHub-Template-Demo\PowerPlatform-ALM-With-GitHub-Template-Demo\pac\Microsoft.PowerApps.CLI.***\tools\Microsoft.ApplicationInsights.dll' is denied.

Steps To Reproduce

Run the "2-export-and-unpack-solution" GitHub workflow with valid input parameters.

Expected Behavior

The considered solution is exported and unpacked without an error.

Relevant log output

Remove-Item: D:\a\_temp\1a633e5c-1bdc-4adf-82f6-0456590a19d6.ps1:23
Line |
  23 |  Remove-Item -Path $outFolder -Recurse
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Access to the path
     | 'D:\a\PowerPlatform-ALM-With-GitHub-Template-Demo\PowerPlatform-ALM-With-GitHub-Template-Demo\pac\Microsoft.PowerApps.CLI.***\tools\Microsoft.ApplicationInsights.dll' is denied.

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Idea 💡] Use "environment-url" output of the "create-environment" action in workflows

Currently we use a custom output configured in the create-build-environment job in different workflows of this repository for the domain name of the just in time build environment that we combine with other variables to generate the environment URL with use in other actions (like Import solution as unmanaged to build env).

It would be definitely better to use the environment-url output provided in the create-environment action.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.