Skip to content

Commit 2e64242

Browse files
authored
chore: drop static e2e image version (#19)
* chore: drop static image version from e2e test On-behalf-of: @SAP christopher.junk@sap.com Signed-off-by: Christopher Junk <christopher.junk@sap.com> * feat: release v0.1.3 On-behalf-of: @SAP christopher.junk@sap.com Signed-off-by: Christopher Junk <christopher.junk@sap.com> --------- Signed-off-by: Christopher Junk <christopher.junk@sap.com>
1 parent fc974b1 commit 2e64242

3 files changed

Lines changed: 17 additions & 6 deletions

File tree

Taskfile.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ tasks:
2222
desc: "Build image for current platform and tag without suffix for testing"
2323
cmds:
2424
- task: build:img:build
25-
- docker tag ghcr.io/openmcp-project/images/{{.COMPONENTS}}:{{.BUILD_VERSION}}-linux-{{ARCH}} ghcr.io/openmcp-project/images/{{.COMPONENTS}}:{{.VERSION}}
25+
- docker tag ghcr.io/openmcp-project/images/{{.COMPONENTS}}:{{.VERSION}}-linux-{{ARCH}} ghcr.io/openmcp-project/images/{{.COMPONENTS}}:{{.VERSION}}
2626
vars:
27-
BUILD_VERSION:
28-
sh: $COMMON_SCRIPT_DIR/get-version.sh
2927
VERSION:
30-
sh: cat VERSION
28+
sh: $COMMON_SCRIPT_DIR/get-version.sh
3129
ARCH:
3230
sh: uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/'
3331

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.1.2-dev
1+
v0.1.3

test/e2e/main_test.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ package e2e
22

33
import (
44
"flag"
5+
"fmt"
56
"os"
7+
"os/exec"
8+
"strings"
69
"testing"
710

811
"k8s.io/klog/v2"
@@ -17,6 +20,7 @@ var testenv env.Environment
1720

1821
func TestMain(m *testing.M) {
1922
initLogging()
23+
version := mustVersion()
2024
openmcp := setup.OpenMCPSetup{
2125
Namespace: "openmcp-system",
2226
Operator: setup.OpenMCPOperatorSetup{
@@ -34,7 +38,7 @@ func TestMain(m *testing.M) {
3438
ServiceProviders: []providers.ServiceProviderSetup{
3539
{
3640
Name: "velero",
37-
Image: "ghcr.io/openmcp-project/images/service-provider-velero:v0.1.2-dev",
41+
Image: fmt.Sprintf("ghcr.io/openmcp-project/images/service-provider-velero:%s", version),
3842
LoadImageToCluster: true,
3943
},
4044
},
@@ -44,6 +48,15 @@ func TestMain(m *testing.M) {
4448
os.Exit(testenv.Run(m))
4549
}
4650

51+
func mustVersion() string {
52+
cmd := exec.Command("../../hack/common/get-version.sh")
53+
version, err := cmd.Output()
54+
if err != nil {
55+
panic(err)
56+
}
57+
return strings.TrimSpace(string(version))
58+
}
59+
4760
func initLogging() {
4861
klog.InitFlags(nil)
4962
if err := flag.Set("v", "2"); err != nil {

0 commit comments

Comments
 (0)