Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research the scenario of using the proxy in a CI/CD pipe with GitHub actions #53

Closed
5 tasks
waldekmastykarz opened this issue Dec 2, 2022 · 6 comments
Closed
5 tasks
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request work in progress

Comments

@waldekmastykarz
Copy link
Collaborator

waldekmastykarz commented Dec 2, 2022

By using the proxy in CI/CD pipelines, dev teams can verify that all committed code properly handles service errors. We should research the scenario of how the proxy could be used in a GitHub action that's a part of a PR validation workflow. Things to research:

  • how would developers install the proxy in a GH workflow
  • how would developers configure and start it
  • how would developers capture results and expose them in build results (artifacts)
  • how can we streamline this process to make it as seamless as possible
  • how we can express test suites and -cases in proxy
@waldekmastykarz waldekmastykarz added needs peer review Issue needs review from other team members enhancement New feature or request labels Dec 2, 2022
@waldekmastykarz waldekmastykarz added needs spec Issue needs specification and removed needs peer review Issue needs review from other team members labels Feb 15, 2023
@Adam-it
Copy link

Adam-it commented Apr 11, 2023

Hi there. So I found a bit of time to focus back on mgdp.
This time I am focusing on CI/CD pipes.
Currently, I would like to use mgdp to add an additional layer of testing during pipeline run for a product like .. hmm 🤔. let's say CLI for M365 😉😜.

I was wondering if you maybe had a chance to focus on this area a bit and maybe you already have something prepared or some guidance?
Of course, I already tried and have something working but the approach is a bit hacky 🤔.
For example, the way I currently install and start mgdp is a bit tricky and not clean.
I do it the same way as I would do it on any win machine

  1. download
  2. unzip
  3. start.exe
jobs:
  runMgdp:
    runs-on: windows-latest

    steps:
    - name: Perform a Pester test from the Tests.ps1 file
      shell: pwsh
      run: |
        $url = "https://github.com/microsoftgraph/msgraph-developer-proxy/releases/download/v0.6.0/msgraph-developer-proxy-win-x64-v0.6.0.zip"
        $dest = ".\mgdp"
        Invoke-WebRequest -Uri $url -OutFile "$dest.zip"
        Expand-Archive "$dest.zip" -DestinationPath $dest
        cd mgdp
        dir
        .\mgdp.exe

The next step would be to run it with some mock file from repo and run some scenarios with requests from the app monitoring the response.
What do you think?

@waldekmastykarz
Copy link
Collaborator Author

Thanks for bringing it up. We've been thinking about already #11. There are a few other things that we need to sort out first, but it's definitely on our radar.

@Adam-it
Copy link

Adam-it commented Apr 16, 2023

ok cool. In the meantime, I will leave it as is and proceed with my work flagging this as a workaround.
@waldekmastykarz did you also had a change to think of ways that mgdp will be installed on linux or mac OS?

@waldekmastykarz
Copy link
Collaborator Author

Like we mentioned in #11 for macOS we're considering Homebrew. For linux we'll need to identify the most common package manager.

@estruyf
Copy link

estruyf commented Mar 28, 2024

I've included a new page for the documentation which describes how you can use the Dev Proxy on GitHub Actions: MicrosoftDocs/microsoft-cloud#13

@waldekmastykarz waldekmastykarz added work in progress documentation Improvements or additions to documentation and removed needs spec Issue needs specification labels Apr 2, 2024
@waldekmastykarz
Copy link
Collaborator Author

Shipped! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request work in progress
Projects
None yet
Development

No branches or pull requests

3 participants