Match Fleet server version with fleetctl version #45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The provided GitHub Actions workflow currently installs the latest version of
fleetctl
during each run, which can result in the workflow failing if this version does not match the server version you are targeting.Here is an excerpt from an internal workflow run that failed to complete - the server version
4.54.1
was not aware of a key that was added infleetctl
version4.55.0
:... Warning: Version mismatch. Client Version: 4.55.0 Server Version: 4.54.1 Error: applying fleet config: PATCH /api/latest/fleet/config received status 400 Bad Request: unsupported key provided: "ios_updates" ...
This PR attempts to correct this by determining the Fleet server-side version via the /api/v1/fleet/version endpoint, and installing the correlating version of
fleetctl
during the GitHub workflow run.Assumptions:
curl
- the workflow is configured to run on the ubuntu-latest GitHub runner image which has this dependency installedjq
- the workflow is configured to run on the ubuntu-latest GitHub runner image which has this dependency installed