mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-09-19 20:44:52 -04:00
upgrade: fix 2.6 -> 2.7 migration for 2.7.1 patch (#1649)
* upgrade: fix 2.6 -> 2.7 migration for 2.7.1 patch Also correctly set microservice version from config. Previously the key was ignored and microservices were always tried for an upgrade. * ci: add simulatedTargetVersion to e2e-upgrade This allows us to build a CLI that reports the given version during an upgrade test. With this we can test patch upgrades. Signed-off-by: Otto Bittner <cobittner@posteo.net> * ci: e2e-upgrade, case-insensitive string compare * hack: fix v-prefixing in pseudo-version tool pre-release versions and release versions behaved differently. This lead to a duplicate v prefix in the cli's version. Signed-off-by: Otto Bittner <cobittner@posteo.net> --------- Signed-off-by: Otto Bittner <cobittner@posteo.net> Co-authored-by: Otto Bittner <cobittner@posteo.net>
This commit is contained in:
parent
9bee6fc69c
commit
3a9291499b
7 changed files with 108 additions and 53 deletions
|
@ -28,7 +28,7 @@ import (
|
|||
type upgradeInfo struct {
|
||||
measurements measurements.M
|
||||
shortPath string
|
||||
wantImage string
|
||||
imageRef string
|
||||
}
|
||||
|
||||
func fetchUpgradeInfo(ctx context.Context, csp cloudprovider.Provider, toImage string) (upgradeInfo, error) {
|
||||
|
@ -61,7 +61,7 @@ func fetchUpgradeInfo(ctx context.Context, csp cloudprovider.Provider, toImage s
|
|||
}
|
||||
info.measurements = fetchedMeasurements
|
||||
|
||||
wantImage, err := fetchWantImage(ctx, versionsClient, csp, versionsapi.ImageInfo{
|
||||
imageRef, err := fetchImageRef(ctx, versionsClient, csp, versionsapi.ImageInfo{
|
||||
Ref: ver.Ref,
|
||||
Stream: ver.Stream,
|
||||
Version: ver.Version,
|
||||
|
@ -69,7 +69,7 @@ func fetchUpgradeInfo(ctx context.Context, csp cloudprovider.Provider, toImage s
|
|||
if err != nil {
|
||||
return upgradeInfo{}, err
|
||||
}
|
||||
info.wantImage = wantImage
|
||||
info.imageRef = imageRef
|
||||
|
||||
return info, nil
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ func getFromURL(ctx context.Context, client *http.Client, sourceURL *url.URL) ([
|
|||
return content, nil
|
||||
}
|
||||
|
||||
func fetchWantImage(ctx context.Context, client *fetcher.Fetcher, csp cloudprovider.Provider, imageInfo versionsapi.ImageInfo) (string, error) {
|
||||
func fetchImageRef(ctx context.Context, client *fetcher.Fetcher, csp cloudprovider.Provider, imageInfo versionsapi.ImageInfo) (string, error) {
|
||||
imageInfo, err := client.FetchImageInfo(ctx, imageInfo)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue