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

Add built-in resolution of URLs #4

Closed
DanGough opened this issue May 14, 2021 · 2 comments
Closed

Add built-in resolution of URLs #4

DanGough opened this issue May 14, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@DanGough
Copy link
Owner

Add a function inside Get-NevergreenApp to automatically resolve the URL provided by each application script, for example to turn:

https://aka.ms/installazurecliwindows

Into:

https://azcliprod.blob.core.windows.net/msi/azure-cli-2.23.0.msi

I could a;so resolve the filename portion of the URL, and the modified date of the file and output that as an extra field.

This is not straightforward:

  • Some URLs do not resolve correctly with some user agents
  • Some URLs like Github releases and Oracle Java downloads end in what looks like a valid filename, until you resolve the redirects you end up with a query string. You then have to parse the Content-Disposition header to retrieve the filename.
  • When querying the header with Invoke-WebRequest -Method HEAD, some URLs refuse to respond, so fallback methods required.

I have old scripts that do this already, they just need polishing and integration.

@DanGough DanGough added the enhancement New feature or request label May 14, 2021
@JonathanPitre
Copy link
Contributor

This is required for Zoom. Evergreen already has something built-in for this.

@DanGough
Copy link
Owner Author

Resolve-Uri function now exists, not using it for every result though, just as and when required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In progress
Development

No branches or pull requests

2 participants