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 template for client tools auto-update download url #51210

Merged
merged 6 commits into from
Jan 24, 2025

Conversation

vapopov
Copy link
Contributor

@vapopov vapopov commented Jan 17, 2025

In this PR added templating for Teleport download package URL to use general function for both client-tools and agent managed updates, where BaseURL parameter might be overridden by environment variable.

Default template:

{{ .BaseURL }}/
{{- if eq .OS "darwin" }}
{{- .Package }}{{ if and .Enterprise (eq .Package "teleport") }}-ent{{ end }}-{{ .Version }}.pkg
{{- else if eq .OS "windows" }}
{{- .Package }}-v{{ .Version }}-{{ .OS }}-amd64-bin.zip
{{- else }}
{{- .Package }}{{ if .Enterprise }}-ent{{ end }}-v{{ .Version }}-{{ .OS }}-{{ .Arch }}{{ if .FIPS }}-fips{{ end }}-bin.tar.gz
{{- end }}

BaseURL might be overridden by TELEPORT_CDN_BASE_URL environment value

Changelog: Added support for customizing the base URL for downloading Teleport packages used in client tools managed updates

MakeURL moved to common function to be general for both, agent and client tools
@vapopov vapopov force-pushed the vapopov/client-tools-update-uri-template branch from feea920 to 2f06e54 Compare January 21, 2025 19:57
@vapopov
Copy link
Contributor Author

vapopov commented Jan 21, 2025

@sclevine I've changed to use TELEPORT_CDN_BASE_URL, also I moved makeUrl to common path, to be able replace in agent in next PR (I had to extend parameters by adding Package and BaseURL)

@flyinghermit flyinghermit removed their request for review January 21, 2025 23:46
@sclevine
Copy link
Member

@vapopov
Copy link
Contributor Author

vapopov commented Jan 23, 2025

@timothyb89 don't you mind also review this PR, need one more approval to merge

@vapopov vapopov added this pull request to the merge queue Jan 24, 2025
@vapopov vapopov removed this pull request from the merge queue due to a manual request Jan 24, 2025
@vapopov vapopov added this pull request to the merge queue Jan 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 24, 2025
@vapopov vapopov added this pull request to the merge queue Jan 24, 2025
Merged via the queue into master with commit 4ffaa89 Jan 24, 2025
41 checks passed
@vapopov vapopov deleted the vapopov/client-tools-update-uri-template branch January 24, 2025 21:47
@public-teleport-github-review-bot

@vapopov See the table below for backport results.

Branch Result
branch/v15 Failed
branch/v16 Failed
branch/v17 Create PR

vapopov added a commit that referenced this pull request Jan 24, 2025
* Add templates for client tools auto-update download url

* Change to base url setting by env

MakeURL moved to common function to be general for both, agent and client tools

* Add godoc for common function and constant for default package

* Use flags and version arguments instead of revision

* Move base url env to shared constant
vapopov added a commit that referenced this pull request Jan 24, 2025
* Add templates for client tools auto-update download url

* Change to base url setting by env

MakeURL moved to common function to be general for both, agent and client tools

* Add godoc for common function and constant for default package

* Use flags and version arguments instead of revision

* Move base url env to shared constant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants