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

Nevergreen PowerShell module - has anyone tried integrating it with Intune App Factory? #29

Open
AScott-WWF opened this issue Nov 21, 2024 · 6 comments

Comments

@AScott-WWF
Copy link

N.B. This is not strictly an issue, more of a feature request

We are just in the process of setting up Intune App Factory to reduce the manual packaging burden.
It's existing support of the Evergreen PowerShell module will help greatly (as we already use it), but we have a number of other apps that require a webscrape to determine the latest version and download url, so we have taken to using the NeverGreen PowerShell module for these use cases.
The NeverGreen module is available to install from the PSGallery, and the Github page is here: https://github.com/DanGough/Nevergreen.
Aaron Parker even mentions using Nevergreen on his website here: https://stealthpuppy.com/evergreen/how/#what-evergreen-does-not-do
One advantage of it is it provides a low entry point to gathering app info via a Webscrape, where Evergreen requires a fixed URL to query, a quick webscrape 'Nevergreen' script can fill the gap where this fixed info is not available to Evergreen.

From a simplistic view it can have the same outputs as Evergreen, so may be possible to include it as a data source for apps that can not be supported by Evergreen.

I'm wondering if anyone has already managed to integrate NeverGreen with Intune App Factory or if not, if there are any plans to integrate it, I'm thinking a switch in the JSON file that can use Evergreen or NeverGreen on the fly depending upon the App being checked / packaged?

Any guidance would be gratefully accepted :-)

@ChristianOe
Copy link

Hi @AScott-WWF ,
I can create a merge request for you with the nevergreen implementation. Its running for month in my fork. I will mention you when it's done.

@AScott-WWF
Copy link
Author

Ah! Perfect, Thank you @ChristianOe I appreciate the effort
🙇‍♂️

@AScott-WWF
Copy link
Author

AScott-WWF commented Dec 15, 2024

Thanks again Christian,

I have included your code changes into our app factory and this appears to be (almost) working.
I had to add a couple more filters to the Scripts/Test-AppList.ps1 file to cater for some of my NeverGreen scripts (not yet included in the current release), I also noticed your last filter was slightly incorrect, it was:

            if ($FilterOptions.ImageType) {
                $FilterList.Add("`$PSItem.Release -eq ""$($FilterOptions.ImageType)""") | Out-Null
            }

I corrected this to:

            if ($FilterOptions.ImageType) {
                $FilterList.Add("`$PSItem.ImageType -eq ""$($FilterOptions.ImageType)""") | Out-Null
            }

I also encountered an issue with App Factory failing to download the latest version of Convene (Nevergreen script / code in this request: DanGough/Nevergreen#67).
Here is a screengrab of the Pipeline Log for Save-Installer:
image

I've tracked this issue down to line 74 of .\Scripts\Save-Installer.ps1 in App Factory -
it appears the Convene download URL rejects the -UserAgent "wget" with a 403 Error (Access Denied).
But, I have found with no User Agent defined or an alternative User Agent e.g. "Powershell" it works.
However, I suspect changing line 74 may break other vendors downloads, so the Save-Installer.ps1 script might need adjusting somehow.
I wonder if defining an alternative User Agent setting in the Applist.json file (e.g. DownloadUserAgent) that could be used as a replacement for "wget" for downloading a file, which could be parsed to the Save-Installer.ps1 script as a parameter might be a solution for this?

p.s. line 29 in the above screen grab / log is incorrect as the file has failed to download

@ChristianOe
Copy link

@AScott-WWF: Great idea, i have created a pull request #34 . You can implement my changes at your own.
Happy new year and much fun with the intuneappfactory :-)

@AScott-WWF
Copy link
Author

Happy New Year to you too @ChristianOe
Thank you for the Pull request (and for suggesting they be added as PR's to NickolajA)
N.B. I'm unsure if you saw my comment on the Fixed Filter ImageType change - or even if my comment was correct 😕
I will add the above amendments to our App Factory and will post back my results here in time.

@ChristianOe
Copy link

@AScott-WWF: Thank you for your correction. It is correct and must be corrected in the Evergreen function in advance. I have silently adopted your change :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants