Skip to content

Commit 364b633

Browse files
committed
f
1 parent ed1797a commit 364b633

16 files changed

+138
-140
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ jobs:
248248
path: |
249249
output/bin/embedded-cluster-${{ matrix.k0s_version }}-${{ matrix.type }}
250250
${{ matrix.k0s_version == 'current' && matrix.type == 'install' && 'output/bin/embedded-cluster-original' || '' }}
251-
${{ matrix.k0s_version == 'current' && matrix.type == 'install' && 'output/bin/embedded-cluster-release-builder' || '' }}
252251
253252
- name: Export k0s version
254253
id: export
@@ -571,6 +570,7 @@ jobs:
571570
export K0S_NOOP_VERSION=${{ matrix.env.K0S_NOOP_VERSION || env.K0S_NOOP_VERSION }}
572571
export K0S_UPGRADE_VERSION=${{ matrix.env.K0S_UPGRADE_VERSION || env.K0S_UPGRADE_VERSION }}
573572
export EC_UPGRADE_VERSION=${{ env.EC_UPGRADE_VERSION }}
573+
export EC_BINARY_PATH="../output/bin/embedded-cluster-current-install"
574574
export DR_S3_ENDPOINT=https://s3.amazonaws.com
575575
export DR_S3_REGION=us-east-1
576576
export DR_S3_BUCKET=kots-testim-snapshots
@@ -684,6 +684,7 @@ jobs:
684684
export K0S_NOOP_VERSION=${{ matrix.env.K0S_NOOP_VERSION || env.K0S_NOOP_VERSION }}
685685
export K0S_UPGRADE_VERSION=${{ matrix.env.K0S_UPGRADE_VERSION || env.K0S_UPGRADE_VERSION }}
686686
export EC_UPGRADE_VERSION=${{ env.EC_UPGRADE_VERSION }}
687+
export EC_BINARY_PATH="../output/bin/embedded-cluster-current-install"
687688
export REPLICATED_API_TOKEN=${{ secrets.CMX_REPLICATED_API_TOKEN }}
688689
export DR_S3_ENDPOINT=https://s3.amazonaws.com
689690
export DR_S3_REGION=us-east-1
@@ -759,6 +760,7 @@ jobs:
759760
export K0S_NOOP_VERSION=${{ matrix.env.K0S_NOOP_VERSION || env.K0S_NOOP_VERSION }}
760761
export K0S_UPGRADE_VERSION=${{ matrix.env.K0S_UPGRADE_VERSION || env.K0S_UPGRADE_VERSION }}
761762
export EC_UPGRADE_VERSION=${{ env.EC_UPGRADE_VERSION }}
763+
export EC_BINARY_PATH="../output/bin/embedded-cluster-current-install"
762764
export REPLICATED_API_TOKEN=${{ secrets.CMX_REPLICATED_API_TOKEN }}
763765
export DR_S3_ENDPOINT=https://s3.amazonaws.com
764766
export DR_S3_REGION=us-east-1

.github/workflows/release-prod.yaml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -391,42 +391,13 @@ jobs:
391391
export RELEASE_YAML_DIR=e2e/kots-release-install
392392
./scripts/ci-release-app.sh
393393
394-
embedded-cluster-release-builder:
395-
name: Build embedded-cluster-release-builder
396-
runs-on: ubuntu-latest
397-
needs:
398-
- get-tag
399-
steps:
400-
- name: Checkout
401-
uses: actions/checkout@v4
402-
- name: Setup go
403-
uses: actions/setup-go@v5
404-
with:
405-
go-version-file: go.mod
406-
cache-dependency-path: "**/*.sum"
407-
- name: Compile embedded-cluster-release-builder
408-
run: |
409-
make output/bin/embedded-cluster-release-builder
410-
- name: Upload embedded-cluster-release-builder artifact
411-
uses: actions/upload-artifact@v4
412-
with:
413-
name: embedded-cluster-release-builder
414-
path: |
415-
output/bin/embedded-cluster-release-builder
416-
417394
download-current:
418395
name: Download the current release binary
419396
runs-on: ubuntu-latest
420397
needs:
421398
- release-app
422399
- get-tag
423-
- embedded-cluster-release-builder
424400
steps:
425-
- name: Download embedded-cluster-release-builder
426-
uses: actions/download-artifact@v4
427-
with:
428-
name: embedded-cluster-release-builder
429-
path: output/bin
430401
- name: Download current binary
431402
env:
432403
# staging ci license id
@@ -451,7 +422,6 @@ jobs:
451422
path: |
452423
output/bin/embedded-cluster
453424
output/bin/embedded-cluster-original
454-
output/bin/embedded-cluster-release-builder
455425
456426
# e2e-docker runs the e2e tests inside a docker container rather than a full VM
457427
e2e-docker:

e2e/cluster/docker/cluster.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ type ClusterInput struct {
2323
Distro string
2424
LicensePath string
2525
ECBinaryPath string
26-
ECReleaseBuilderPath string
2726
K0sDir string
2827
SupportBundleNodeIndex int
2928
}
@@ -61,10 +60,6 @@ func NewNode(in *ClusterInput, name string) *Container {
6160
in.T.Logf("using embedded cluster binary %s", in.ECBinaryPath)
6261
c = c.WithECBinary(in.ECBinaryPath)
6362
}
64-
if in.ECReleaseBuilderPath != "" {
65-
in.T.Logf("using embedded cluster release builder %s", in.ECReleaseBuilderPath)
66-
c = c.WithECReleaseBuilder(in.ECReleaseBuilderPath)
67-
}
6863
if in.LicensePath != "" {
6964
in.T.Logf("using license %s", in.LicensePath)
7065
c = c.WithLicense(in.LicensePath)

e2e/cluster/docker/container.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,6 @@ func (c *Container) GetECBinaryPath() string {
5656
return "/usr/local/bin/embedded-cluster"
5757
}
5858

59-
func (c *Container) WithECReleaseBuilder(path string) *Container {
60-
path, err := filepath.Abs(path)
61-
if err != nil {
62-
c.t.Fatalf("failed to get absolute path to embedded-cluster release builder: %v", err)
63-
}
64-
_, err = os.Stat(path)
65-
if err != nil {
66-
c.t.Fatalf("failed to find embedded-cluster release builder: %v", err)
67-
}
68-
err = os.Chmod(path, 0755)
69-
if err != nil {
70-
c.t.Fatalf("failed to chmod embedded-cluster binary: %v", err)
71-
}
72-
return c.WithVolume(fmt.Sprintf("%s:%s", path, c.GetECReleaseBuilderPath()))
73-
}
74-
75-
func (c *Container) GetECReleaseBuilderPath() string {
76-
return "/usr/local/bin/embedded-cluster-release-builder"
77-
}
78-
7959
func (c *Container) WithLicense(path string) *Container {
8060
path, err := filepath.Abs(path)
8161
if err != nil {

e2e/cluster/lxd/cluster.go

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,21 @@ func (n *NoopCloser) Close() error {
5656
// ClusterInput are the options passed in to the cluster creation plus some data
5757
// for internal consumption only.
5858
type ClusterInput struct {
59-
Nodes int
60-
CreateRegularUser bool
61-
LicensePath string
62-
EmbeddedClusterPath string
63-
EmbeddedClusterReleaseBuilderPath string // used to replace the release in the binary
64-
AirgapInstallBundlePath string
65-
AirgapUpgradeBundlePath string
66-
AirgapUpgrade2BundlePath string
67-
Image string
68-
network string
69-
T *testing.T
70-
WithProxy bool
71-
id string
72-
AdditionalFiles []File
73-
SupportBundleNodeIndex int
74-
LowercaseNodeNames bool
59+
Nodes int
60+
CreateRegularUser bool
61+
LicensePath string
62+
ECBinaryPath string
63+
AirgapInstallBundlePath string
64+
AirgapUpgradeBundlePath string
65+
AirgapUpgrade2BundlePath string
66+
Image string
67+
network string
68+
T *testing.T
69+
WithProxy bool
70+
id string
71+
AdditionalFiles []File
72+
SupportBundleNodeIndex int
73+
LowercaseNodeNames bool
7574
}
7675

7776
// File holds information about a file that must be uploaded to a node.
@@ -475,15 +474,10 @@ func CopyFilesToNode(in *ClusterInput, node string) {
475474
Mode: 0644,
476475
},
477476
{
478-
SourcePath: in.EmbeddedClusterPath,
477+
SourcePath: in.ECBinaryPath,
479478
DestPath: "/usr/local/bin/embedded-cluster",
480479
Mode: 0755,
481480
},
482-
{
483-
SourcePath: in.EmbeddedClusterReleaseBuilderPath,
484-
DestPath: "/usr/local/bin/embedded-cluster-release-builder",
485-
Mode: 0755,
486-
},
487481
{
488482
SourcePath: in.AirgapInstallBundlePath,
489483
DestPath: "/assets/ec-release.tgz",

e2e/host-support-bundle_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ func TestHostCollectSupportBundleInCluster(t *testing.T) {
1313

1414
RequireEnvVars(t, []string{
1515
"APP_INSTALL_VERSION",
16+
"EC_BINARY_PATH",
1617
})
1718

1819
tc := docker.NewCluster(&docker.ClusterInput{
1920
T: t,
2021
Nodes: 1,
2122
Distro: "debian-bookworm",
2223
LicensePath: "licenses/license.yaml",
23-
ECBinaryPath: "../output/bin/embedded-cluster",
24+
ECBinaryPath: os.Getenv("EC_BINARY_PATH"),
2425
})
2526
defer tc.Cleanup()
2627

0 commit comments

Comments
 (0)