Skip to content

Commit

Permalink
chore(ci): re-promote 1.8.0 release each time (#1364)
Browse files Browse the repository at this point in the history
* chore(ci): re-promote 1.8.0 release each time

* chore(ci): re-promote 1.8.0 release each time
  • Loading branch information
emosbaugh committed Oct 22, 2024
1 parent a14c153 commit 430c1c8
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,11 @@ jobs:
export APP_VERSION="appver-${SHORT_SHA}-pre-minio-removal"
replicated release promote 807 2cHXb1RCttzpR0xvnNWyaZCgDBP --version "${APP_VERSION}"
# re-promote a release containing an old version of embedded-cluster to test upgrades
export APP_VERSION="appver-${SHORT_SHA}-1.8.0-k8s-1.28"
replicated release promote 11615 2cHXb1RCttzpR0xvnNWyaZCgDBP --version "${APP_VERSION}"
replicated release promote 11615 2eAqMYG1IEtX8cwpaO1kgNV6EB3 --version "${APP_VERSION}"
# install the previous k0s version to ensure an upgrade occurs
export EC_VERSION="$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')-previous-k0s"
export APP_VERSION="appver-${SHORT_SHA}-previous-k0s"
Expand Down
20 changes: 12 additions & 8 deletions e2e/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,19 +551,21 @@ func TestUpgradeEC18FromReplicatedApp(t *testing.T) {
})
defer tc.Cleanup(withEnv)

t.Logf("%s: downloading embedded-cluster 1.8.0+k8s-1.28 on node 0", time.Now().Format(time.RFC3339))
line := []string{"vandoor-prepare.sh", "1.8.0+k8s-1.28", os.Getenv("LICENSE_ID"), "false"}
appVer := fmt.Sprintf("appver-%s-1.8.0-k8s-1.28", os.Getenv("SHORT_SHA"))

t.Logf("%s: downloading embedded-cluster %s on node 0", appVer, time.Now().Format(time.RFC3339))
line := []string{"vandoor-prepare.sh", appVer, os.Getenv("LICENSE_ID"), "false"}
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
t.Fatalf("fail to download embedded-cluster on node 0: %v: %s: %s", err, stdout, stderr)
}

t.Logf("%s: downloading embedded-cluster 1.8.0+k8s-1.28 on worker node", time.Now().Format(time.RFC3339))
line = []string{"vandoor-prepare.sh", "1.8.0+k8s-1.28", os.Getenv("LICENSE_ID"), "false"}
t.Logf("%s: downloading embedded-cluster %s on worker node", appVer, time.Now().Format(time.RFC3339))
line = []string{"vandoor-prepare.sh", appVer, os.Getenv("LICENSE_ID"), "false"}
if stdout, stderr, err := tc.RunCommandOnNode(1, line); err != nil {
t.Fatalf("fail to download embedded-cluster on node 0: %v: %s: %s", err, stdout, stderr)
}

t.Logf("%s: installing embedded-cluster 1.8.0+k8s-1.28 on node 0", time.Now().Format(time.RFC3339))
t.Logf("%s: installing embedded-cluster %s on node 0", appVer, time.Now().Format(time.RFC3339))
line = []string{"single-node-install.sh", "ui"}
if stdout, stderr, err := tc.RunCommandOnNode(0, line, withEnv); err != nil {
t.Fatalf("fail to install embedded-cluster on node 0: %v: %s: %s", err, stdout, stderr)
Expand Down Expand Up @@ -600,7 +602,7 @@ func TestUpgradeEC18FromReplicatedApp(t *testing.T) {
}

t.Logf("%s: checking installation state", time.Now().Format(time.RFC3339))
line = []string{"check-installation-state.sh", "1.8.0+k8s-1.28", "v1.28.11"}
line = []string{"check-installation-state.sh", appVer, "v1.28.11"}
if stdout, stderr, err := tc.RunCommandOnNode(0, line, withEnv); err != nil {
t.Fatalf("fail to check installation state: %v: %s: %s", err, stdout, stderr)
}
Expand Down Expand Up @@ -1039,12 +1041,14 @@ func TestAirgapUpgradeFromEC18(t *testing.T) {

withEnv := map[string]string{"KUBECONFIG": "/var/lib/k0s/pki/admin.conf"}

appVer := fmt.Sprintf("appver-%s-1.8.0-k8s-1.28", os.Getenv("SHORT_SHA"))

t.Logf("%s: downloading airgap files", time.Now().Format(time.RFC3339))
airgapInstallBundlePath := "/tmp/airgap-install-bundle.tar.gz"
airgapUpgradeBundlePath := "/tmp/airgap-upgrade-bundle.tar.gz"
runInParallel(t,
func(t *testing.T) error {
return downloadAirgapBundle(t, "1.8.0+k8s-1.28", airgapInstallBundlePath, os.Getenv("AIRGAP_LICENSE_ID"))
return downloadAirgapBundle(t, appVer, airgapInstallBundlePath, os.Getenv("AIRGAP_LICENSE_ID"))
}, func(t *testing.T) error {
return downloadAirgapBundle(t, fmt.Sprintf("appver-%s-upgrade", os.Getenv("SHORT_SHA")), airgapUpgradeBundlePath, os.Getenv("AIRGAP_LICENSE_ID"))
},
Expand Down Expand Up @@ -1150,7 +1154,7 @@ func TestAirgapUpgradeFromEC18(t *testing.T) {
"check-airgap-installation-state.sh",
// the initially installed version is 1.8.0+k8s-1.28
// the '+' character is problematic in the regex used to validate the version, so we use '.' instead
"1.8.0.k8s-1.28",
appVer,
"v1.28.11"}
if _, _, err := tc.RunCommandOnNode(0, line, withEnv); err != nil {
t.Fatalf("fail to check installation state: %v", err)
Expand Down
4 changes: 2 additions & 2 deletions e2e/scripts/check-airgap-installation-state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ main() {
exit 1
fi

# if this is the current version
if echo "$version" | grep -E "^(dev|appver)-" ; then
# if this is the current version in CI
if echo "$version" | grep -qvE "(pre-minio-removal|1.8.0-k8s)" ; then
validate_data_dirs
fi

Expand Down
4 changes: 2 additions & 2 deletions e2e/scripts/check-airgap-post-ha-state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ main() {
exit 1
fi

# if this is the current version
if echo "$version" | grep -E "^(dev|appver)-" ; then
# if this is the current version in CI
if echo "$version" | grep -qvE "(pre-minio-removal|1.8.0-k8s)" ; then
validate_data_dirs
fi

Expand Down
4 changes: 2 additions & 2 deletions e2e/scripts/check-installation-state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ main() {
exit 1
fi

# if this is the current version
if echo "$version" | grep -E "^(dev|appver)-" ; then
# if this is the current version in CI
if echo "$version" | grep -qvE "(pre-minio-removal|1.8.0-k8s)" ; then
validate_data_dirs
fi

Expand Down
4 changes: 2 additions & 2 deletions e2e/scripts/check-post-ha-state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ main() {
exit 1
fi

# if this is the current version
if echo "$version" | grep -E "^(dev|appver)-" ; then
# if this is the current version in CI
if echo "$version" | grep -qvE "(pre-minio-removal|1.8.0-k8s)" ; then
validate_data_dirs
fi

Expand Down

0 comments on commit 430c1c8

Please sign in to comment.