Code Monkey home page Code Monkey logo

fscps's Introduction

FSC-PS for GitHub

๐Ÿš€ FSC-PS for GitHub is a set of GitHub templates and actions, which can be used to setup and maintain professional DevOps processes for your Dynamics 365 FSC, Commerce or ECommerce projects.

The goal is that people who have created their GitHub repositories based on the FSC-PS templates, can maintain these repositories and stay current just by running a workflow, which updates their repositories. This includes necessary changes to scripts and workflows to cope with new features and functions.

The template repository to use as starting point are:

The below usage scenarios takes you through how to get started and how to perform the most common tasks.

Usage scenarios:

  1. Set up repository
  2. Set up CI
  3. Set up CD
  4. Set up your own GitHub runner to increase build performance
  5. Update FSC-PS files
  6. Add environment from the different tenant
  7. D365FSC. Include Test model into the deployable package
  8. D365FSC. Build a specific model(`s)
  9. D365FSC. Deploy the code to the environment

Note: Please refer to this description to learn about the settings file and how you can modify default behaviors.

This project

This project in the main source repository for FSC-PS for GitHub. This project is deployed on every release to a branch in the following repositories:

fscps's People

Contributors

onikolaiev avatar ciellos-dev avatar

Stargazers

Dmytro Semenakha avatar Luca Allegro avatar eplord avatar  avatar  avatar Ryan Whittaker avatar  avatar David Murray avatar Valery Moskalenko avatar Marijan Huljic avatar Tommy Skaue avatar  avatar  avatar Florian Hopfner avatar  avatar Brendan avatar

Watchers

 avatar David Murray avatar

fscps's Issues

fscps.gh RunPipeline action should fail gracefully when there is no model to build

The RunPipeline action currently fails with an unhelpful error message if no models can be determined to build.

Instead, the action should fail earlier in the "Getting the list of models to build" section with a more helpful error message.

In my case, the model was not found because it contained the text "test" in its name. It seems models with that text are assumed to be unit test models that by default are not build and packaged, because those models cannot be deployed to T2+ environments. It might be better to by default build, but not package them. But that is for another issue ๐Ÿ˜„

Current error message

[16:51:36][Invoke-FSCCompile] Error: | No X++ binary package(s) found
[16:51:41][Invoke-FSCPSCompile] Something went wrong while compiling | Stopping because of errors
[ 2024.06.02-16:51:41 ]: Execution is done.
Error: Unexpected error when running action (::Error::Stopping because of errors)
Error: Process completed with exit code 1.

Sample output from a failing run

[16:49:00][Set-FSCPSSettings] Running on GitHub
[16:49:01][Set-FSCPSSettings] Settings were updated succesfully.
Main model:
Models:
Models to package:
[16:49:02][Invoke-FSCCompile] //================= Reading current FSC-PS settings ============================//
[16:49:02][Invoke-FSCCompile] IsOneBox:
[16:49:02][Invoke-FSCCompile] //================= Getting the list of models to build ========================//
[16:49:02][Invoke-FSCCompile] Models to build:
[16:49:02][Invoke-FSCCompile] Models to package:
[16:49:02][Invoke-FSCCompile] //================= Generate solution folder ===================================//
[16:49:02][Invoke-FSCCompile] Complete
[16:49:02][Invoke-FSCCompile] //================= Copy source files to the build folder ======================//
[16:49:02][Invoke-FSCCompile] Source folder: D:\a\fscsimpletpltest01\fscsimpletpltest01
[16:49:02][Invoke-FSCCompile] Destination folder: c:\temp\fscps.tools_bld
[16:49:02][Invoke-FSCCompile] Complete
[16:49:02][Invoke-FSCCompile] //================= Download NuGet packages ====================================//
[16:49:07][Set-FSCPSActiveAzureStorageConfig] An Azure Storage Account with that name doesn't exists.
WARNING: [16:49:07][Set-FSCPSActiveAzureStorageConfig] Stopping because an Azure Storage Account with that name doesn't
exists.
[16:49:15][Invoke-FSCCompile] Complete
[16:49:15][Invoke-FSCCompile] //================= Install NuGet packages =====================================//
[16:51:35][Invoke-FSCCompile] Complete
[16:51:35][Invoke-FSCCompile] //================= Copy binaries to the build folder ==========================//
[16:51:35][Invoke-FSCCompile] Complete
[16:51:35][Invoke-FSCCompile] //================= Generate package ==========================================//
[16:51:36][Invoke-FSCCompile] Error: | No X++ binary package(s) found
[16:51:41][Invoke-FSCPSCompile] Something went wrong while compiling | Stopping because of errors
[ 2024.06.02-16:51:41 ]: Execution is done.
Error: Unexpected error when running action (::Error::Stopping because of errors)
Error: Process completed with exit code 1.

auto generate list of Microsoft models in .gitignore of fscps.fsctpl

FSC-PS uses the approach where the AOSService folder of a D365FSCM environment is used as folder of the Git repository. This requires to .gitignore all the contents of the folder that are Microsoft standard. It includes a list of all the standard modules: https://github.com/fscpscollaborative/fscps.fsctpl/blob/9558c71b42cd8ba61f8b9939b4bfda9431e16721/.gitignore#L76-L243

This long list often becomes outdated when Microsoft adds new modules. For the initial setup of a repository on a development environment, this could be covered by keeping the .gitignore file current with the modules of the latest D365FSCM version. However, after the initial setup, if a new version is installed on the environment, the .gitignore might not contain new modules added by that version.

Currently, the logic to update the FSC-PS files in a repository does not seem to cover the .gitignore file. It might also not be easy to update the file, since it is often customized to exclude additional files that are specific to a repository.

Instead, a PowerShell script (or maybe a cmdlet as part of fscps.tools, though that would require installing the module on a development environment) should be provided that could generate/update the list of modules in .gitignore. For the update part, the script would need to be able to differentiate Microsoft from custom modules. The logic of the -ExcludeMicrosoftModels parameter of the d365fo.tools cmdlet Get-D365Model might help here.

Simple "try out" template

I think the current templates and onboarding documentation work. For people unfamiliar with FSC-PS and GitHub, I propose a more simplified template and onboarding.

The template would just be for D365FSC extensions. It would have one build action and just the minimum of .json files to support that. Documentation for the template would explain

  • how to set it up
  • how to connect to it from a development environment
  • how to add a simple extension
  • how to run the build for that extension

Future work could add similar templates for commerce extensions. It could also add documentation that show how to add the other stuff (CI, CD, repo update, ...).

Aside from a more simplified onboarding, I also think this would remove concerns around allowing a third party access to the repo (the repo update) or having to upload an existing extension to a public url (for the import).

Enable discussions

Could we enable the GitHub discussion feature for this repo? This would enable some more highlevel/meta/organizational discussions that do not really fit the issues format.

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.