Skip to content

Commit e43cd0b

Browse files
authored
do not build a separate binary for the legacy-dr test suite (#1832)
1 parent f543b73 commit e43cd0b

File tree

2 files changed

+12
-93
lines changed

2 files changed

+12
-93
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -213,75 +213,6 @@ jobs:
213213
echo "K0S_VERSION=\"$K0S_VERSION\""
214214
echo "k0s_version=$K0S_VERSION" >> "$GITHUB_OUTPUT"
215215
216-
build-legacydr:
217-
name: Build legacy DR
218-
runs-on: embedded-cluster-2
219-
needs:
220-
- git-sha
221-
outputs:
222-
k0s_version: ${{ steps.export.outputs.k0s_version }}
223-
steps:
224-
- name: Checkout
225-
uses: actions/checkout@v4
226-
with:
227-
fetch-depth: 0
228-
229-
- name: Cache embedded bins
230-
uses: actions/cache@v4
231-
with:
232-
path: |
233-
output/bins
234-
key: bins-cache
235-
236-
- name: Setup go
237-
uses: actions/setup-go@v5
238-
with:
239-
go-version-file: go.mod
240-
cache-dependency-path: "**/*.sum"
241-
242-
- name: Install dagger
243-
run: |
244-
curl -fsSL https://dl.dagger.io/dagger/install.sh | sh
245-
sudo mv ./bin/dagger /usr/local/bin/dagger
246-
247-
- name: Build
248-
env:
249-
APP_CHANNEL_ID: 2cHXb1RCttzpR0xvnNWyaZCgDBP
250-
APP_CHANNEL_SLUG: ci
251-
RELEASE_YAML_DIR: e2e/kots-release-install-legacydr
252-
S3_BUCKET: "tf-staging-embedded-cluster-bin"
253-
USES_DEV_BUCKET: "0"
254-
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_KEY_ID }}
255-
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_SECRET }}
256-
AWS_REGION: "us-east-1"
257-
USE_CHAINGUARD: "1"
258-
UPLOAD_BINARIES: "1"
259-
SKIP_RELEASE: "1"
260-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
261-
run: |
262-
export K0S_VERSION=$(make print-K0S_VERSION)
263-
export EC_VERSION=$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-legacydr
264-
export APP_VERSION=appver-dev-${{ needs.git-sha.outputs.git_sha }}-legacydr
265-
# avoid rate limiting
266-
export FIO_VERSION=$(gh release list --repo axboe/fio --json tagName,isLatest | jq -r '.[] | select(.isLatest==true)|.tagName' | cut -d- -f2)
267-
268-
./scripts/build-and-release.sh
269-
cp output/bin/embedded-cluster output/bin/embedded-cluster-legacydr
270-
271-
- name: Upload release
272-
uses: actions/upload-artifact@v4
273-
with:
274-
name: legacydr-release
275-
path: |
276-
output/bin/embedded-cluster-legacydr
277-
278-
- name: Export k0s version
279-
id: export
280-
run: |
281-
K0S_VERSION="$(make print-K0S_VERSION)"
282-
echo "K0S_VERSION=\"$K0S_VERSION\""
283-
echo "k0s_version=$K0S_VERSION" >> "$GITHUB_OUTPUT"
284-
285216
build-previous-k0s:
286217
name: Build previous k0s
287218
runs-on: embedded-cluster-2
@@ -518,7 +449,6 @@ jobs:
518449
needs:
519450
- git-sha
520451
- build-current
521-
- build-legacydr
522452
- build-previous-k0s
523453
- build-upgrade
524454
- find-previous-stable
@@ -591,7 +521,7 @@ jobs:
591521
./scripts/ci-release-app.sh
592522
593523
# promote a release with improved dr support
594-
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-legacydr"
524+
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')"
595525
export APP_VERSION="appver-${SHORT_SHA}-legacydr"
596526
export RELEASE_YAML_DIR=e2e/kots-release-install-legacydr
597527
./scripts/ci-release-app.sh
@@ -636,12 +566,6 @@ jobs:
636566
export RELEASE_YAML_DIR=e2e/kots-release-install
637567
./scripts/ci-release-app.sh
638568
639-
# promote a release with improved dr support
640-
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-legacydr"
641-
export APP_VERSION="appver-${SHORT_SHA}-legacydr"
642-
export RELEASE_YAML_DIR=e2e/kots-release-install-legacydr
643-
./scripts/ci-release-app.sh
644-
645569
# then a noop upgrade
646570
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')"
647571
export APP_VERSION="appver-${SHORT_SHA}-noop"
@@ -687,7 +611,6 @@ jobs:
687611
needs:
688612
- git-sha
689613
- build-current
690-
- build-legacydr
691614
- build-previous-k0s
692615
- build-upgrade
693616
- find-previous-stable
@@ -735,11 +658,6 @@ jobs:
735658
with:
736659
name: current-release
737660
path: output/bin
738-
- name: Download new DR binary
739-
uses: actions/download-artifact@v4
740-
with:
741-
name: legacydr-release
742-
path: output/bin
743661
- name: Setup go
744662
uses: actions/setup-go@v5
745663
with:
@@ -786,7 +704,6 @@ jobs:
786704
runs-on: ${{ matrix.runner || 'ubuntu-22.04' }}
787705
needs:
788706
- build-current
789-
- build-legacydr
790707
- build-previous-k0s
791708
- build-upgrade
792709
- find-previous-stable
@@ -854,7 +771,6 @@ jobs:
854771
runs-on: ${{ matrix.runner || 'ubuntu-22.04' }}
855772
needs:
856773
- build-current
857-
- build-legacydr
858774
- build-previous-k0s
859775
- build-upgrade
860776
- find-previous-stable

e2e/restore_test.go

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,21 @@ func TestSingleNodeLegacyDisasterRecovery(t *testing.T) {
127127
}
128128

129129
tc := docker.NewCluster(&docker.ClusterInput{
130-
T: t,
131-
Nodes: 1,
132-
Distro: "debian-bookworm",
133-
LicensePath: "snapshot-license.yaml",
134-
ECBinaryPath: "../output/bin/embedded-cluster-legacydr",
130+
T: t,
131+
Nodes: 1,
132+
Distro: "debian-bookworm",
135133
})
136134
defer tc.Cleanup()
137135

136+
appVersion := fmt.Sprintf("appver-%s-legacydr", os.Getenv("SHORT_SHA"))
137+
t.Logf("%s: downloading embedded-cluster on node 0", time.Now().Format(time.RFC3339))
138+
line := []string{"vandoor-prepare.sh", appVersion, os.Getenv("SNAPSHOT_LICENSE_ID"), "false"}
139+
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
140+
t.Fatalf("fail to download embedded-cluster on node 0: %v: %s: %s", err, stdout, stderr)
141+
}
142+
138143
t.Logf("%s: installing embedded-cluster on node 0", time.Now().Format(time.RFC3339))
139-
line := []string{"single-node-install.sh", "ui", os.Getenv("SHORT_SHA")}
144+
line = []string{"single-node-install.sh", "ui", os.Getenv("SHORT_SHA")}
140145
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
141146
t.Fatalf("fail to install embedded-cluster on node 0: %v: %s: %s", err, stdout, stderr)
142147
}
@@ -148,8 +153,6 @@ func TestSingleNodeLegacyDisasterRecovery(t *testing.T) {
148153
t.Fatalf("fail to run playwright test deploy-app: %v", err)
149154
}
150155

151-
appVersion := fmt.Sprintf("appver-%s-legacydr", os.Getenv("SHORT_SHA"))
152-
153156
t.Logf("%s: checking installation state", time.Now().Format(time.RFC3339))
154157
line = []string{"check-installation-state.sh", appVersion, k8sVersion()}
155158
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {

0 commit comments

Comments
 (0)