From dd5cc459264c4474e5f521ec47e2c93677a2afb8 Mon Sep 17 00:00:00 2001 From: narcis96 Date: Tue, 5 Mar 2024 15:39:08 +0200 Subject: [PATCH] (ci): build using make --- .github/workflows/e2e.yaml | 114 ++++++++++++++++++++++++++++++++++--- devspace.yaml | 2 +- 2 files changed, 108 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 3cab8e51c..4bc007f77 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -35,16 +35,116 @@ jobs: e2e-test-empty: runs-on: ubuntu-latest + container: + image: quay.io/containers/podman:latest + options: --privileged + name: E2E Empty Test steps: - - name: Echo hello - run: | - echo "hello" - name: Checkout code uses: actions/checkout@v2 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: "1.22" + - name: Install kubectl + run: | + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + chmod +x ./kubectl + sudo mv ./kubectl /usr/local/bin/kubectl + + - name: Run podman + run: | + podman version + + - name: Run kubectl + run: | + kubectl version --client + + # - name: Set up Go + # uses: actions/setup-go@v4 + # with: + # go-version: "1.22" + + # - name: Install Orbstack + # run: go install github.com/your-username/orbstack + + # - name: Run Orbstack Tests + # run: | + # orbstack --test + + - name: Install DevSpace + run: | + curl -fsSL -o /tmp/devspace https://github.com/devspace-cloud/devspace/releases/latest/download/devspace-linux-amd64 + chmod +x /tmp/devspace + sudo mv /tmp/devspace /usr/local/bin/devspace + + # - name: Configure kubectl + # uses: actions-hub/kubectl@master + # env: + # KUBE_CONFIG: YXBpVmVyc2lvbjogdjEKY2x1c3RlcnM6CiAgLSBjbHVzdGVyOgogICAgICBjZXJ0aWZpY2F0ZS1hdXRob3JpdHktZGF0YTogTFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSmtha05EUVZJeVowRjNTVUpCWjBsQ1FVUkJT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PQogICAgICBjbGllbnQta2V5LWRhdGE6IExTMHRMUzFDUlVkSlRpQkZReUJRVWtsV1FWUkZJRXRGV1MwdExTMHRDazFJWTBOQlVVVkZTVTlKTmtZck9EQlhhbWRSTkVoRmNGb3lWV3BvVFZsRVQweEJhekJIZGtnNFNreHVlVUpDTVhkcmR6UnZRVzlIUTBOeFIxTk5ORGtLUVhkRlNHOVZVVVJSWjBGRll6TTJaMmxUV0ZoNEt6aE1ha2xwVTJOeFUwMTBXVmh5V1ZKd01tOXBXREowVjFSa0szQndPWGxOYkdscE1HWkphMFZoVEFwR1NIa3ZSbGRsU3poSGFURk1haXRtVFZCMWJYRkZlbGh3VkVSa1IybDVZek5SUFQwS0xTMHRMUzFGVGtRZ1JVTWdVRkpKVmtGVVJTQkxSVmt0TFMwdExRbz0K + # with: + # args: get pods + + # - name: Setup Kubernetes + # uses: azure/aks-set-context@v1 + # with: + # creds: ${{ secrets.KUBE_CONFIG }} + # kubeconfig: config + # context: your-context-name + + # - name: Check Kubernetes config + # run: | + # cat config + + # - name: Install kubectl, kustomize and clusterctl + # run: | + # # curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" && chmod +x kubectl && sudo mv kubectl /usr/local/bin/ + # curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash && sudo mv kustomize /usr/local/bin/ + # curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.1/clusterctl-linux-amd64 -o clusterctl && chmod +x clusterctl && sudo mv clusterctl /usr/local/bin/ + + # - name: Run clusterctl command + # run: | + # clusterctl config repositories | grep vcluster + + # - name: Check Kubernetes config file + # run: | + # cat $HOME/.kube/config + + # - name: Set Kubernetes context + # run: | + # kubectl config set-context test-PR --kubeconfig=$HOME/.kube/config + + - name: Verify Kubernetes context + run: | + kubectl config get-contexts + + # - name: Configure kubectl + # run: | + # kubectl config set-context test-PR + + - name: Check Kubernetes connectivity + run: | + echo "=== Kubectl version ===" + kubectl version --client + echo "=== Kubectl config ===" + kubectl config view + echo "=== Kubectl current context ===" + kubectl config current-context + echo "=== Kubectl cluster info ===" + kubectl cluster-info + echo "=== Kubectl get nodes ===" + kubectl get nodes + echo "=== Kubectl get pods ===" + kubectl get pods --all-namespaces + echo "=== Kubectl get namespaces ===" + kubectl get namespaces + echo "=== Test kubectl command ===" + kubectl get all --all-namespaces + + - name: Run kubectl get namespaces + run: | + kubectl get namespaces + + - name: DevSpace Deploy + run: | + devspace deploy -p deploy + diff --git a/devspace.yaml b/devspace.yaml index cb636f392..473a2ef7a 100644 --- a/devspace.yaml +++ b/devspace.yaml @@ -42,7 +42,7 @@ dev: - '!/go.mod' - '!/go.sum' - '!/devspace_start.sh' - - 'Makefile' + - '!/Makefile' commands: dev: |-