Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
${{ secrets.DOCKER_USERNAME }}/kubetasker-controller:${{ github.sha }}
${{ secrets.DOCKER_USERNAME }}/kubetasker-controller:latest

- name: Copy requirements.txt to frontend directory
run: cp requirements.txt helm/kubetasker-frontend/

- name: Build and push Frontend
uses: docker/build-push-action@v5
with:
Expand Down
4 changes: 2 additions & 2 deletions helm/kubetasker-frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
FROM python:3.12-slim

# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

# Set the working directory in the container
WORKDIR /app
Expand Down
18 changes: 18 additions & 0 deletions test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ var (
projectRootDir string
chartsRoot string
testRoot string
kubeconfigPath string
)

// TestE2E runs the end-to-end (e2e) test suite for the project. These tests execute in an isolated,
Expand Down Expand Up @@ -98,6 +99,20 @@ var _ = BeforeSuite(func() {
err = utils.LoadImageToKindClusterWithName(kindClusterName, frontendImage)
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to load the frontend API image into Kind")

By("getting the kubeconfig from Kind")
cmd = exec.Command("kind", "get", "kubeconfig", "--name", kindClusterName)
kubeconfig, err := utils.Run(cmd)
Expect(err).NotTo(HaveOccurred(), "Failed to get kubeconfig from Kind")

f, err := os.CreateTemp("", "kubeconfig")
Expect(err).NotTo(HaveOccurred())
_, err = f.WriteString(kubeconfig)
Expect(err).NotTo(HaveOccurred())
err = f.Close()
Expect(err).NotTo(HaveOccurred())
kubeconfigPath = f.Name()
os.Setenv("KUBECONFIG", kubeconfigPath)

By("updating helm dependencies for the umbrella chart")
umbrellaChartPath := filepath.Join(chartsRoot, "kubetasker")
cmd = exec.Command("helm", "dependency", "update", umbrellaChartPath)
Expand Down Expand Up @@ -195,6 +210,9 @@ var _ = AfterSuite(func() {
// Only remove the files generated during the test, not the whole directory.
_ = os.Remove(filepath.Join(projectRootDir, "kustomize", "base", "all.yaml"))
_ = os.Remove(filepath.Join(projectRootDir, "kustomize", "base", "crd.yaml"))
if kubeconfigPath != "" {
_ = os.Remove(kubeconfigPath)
}
})

// logDebugInfoOnFailure checks if the current Ginkgo spec has failed. If it has, it captures
Expand Down