|
42 | 42 | - name: Run tests |
43 | 43 | run: npm test --ignore-scripts |
44 | 44 |
|
| 45 | + cf-deployment-test: |
| 46 | + name: Cloud Foundry Deployment Test |
| 47 | + runs-on: ubuntu-latest |
| 48 | + steps: |
| 49 | + - uses: engineerd/setup-kind@v0.5.0 |
| 50 | + with: |
| 51 | + name: kubecf |
| 52 | + - name: Test Deployment |
| 53 | + run: | |
| 54 | + kubectl cluster-info |
| 55 | + kubectl get pods -n kube-system |
| 56 | + echo "current-context:" $(kubectl config current-context) |
| 57 | + echo "environment-kubeconfig:" ${KUBECONFIG} |
| 58 | + - name: Clone KubeCF Git Repo |
| 59 | + run: git clone --depth=1 https://github.com/cloudfoundry-incubator/kubecf.git |
| 60 | + |
| 61 | + - name: Download cf-operator and KubeCF Helm Charts Bundle |
| 62 | + run: | |
| 63 | + curl -s https://api.github.com/repos/cloudfoundry-incubator/kubecf/releases/latest \ |
| 64 | + | grep -oP '"browser_download_url": "\K(.*)kubecf-bundle(.*)(?=")' \ |
| 65 | + | wget -qi - |
| 66 | + tar xf kubecf-bundle-v*.tgz |
| 67 | +
|
| 68 | + - name: Install KubeCF Required Tools |
| 69 | + run: | |
| 70 | + pushd ./kubecf |
| 71 | + make -I ./kubecf tools-install |
| 72 | + popd |
| 73 | +
|
| 74 | + - name: Install cf-operator |
| 75 | + run: | |
| 76 | + kubectl create ns cfo |
| 77 | + helm install cf-operator \ |
| 78 | + --namespace cfo \ |
| 79 | + --set "global.singleNamespace.name=kubecf" \ |
| 80 | + ./cf-operator.tgz |
| 81 | + kubectl wait \ |
| 82 | + --namespace cfo \ |
| 83 | + --for=condition=ready pod \ |
| 84 | + --timeout=30m \ |
| 85 | + --all |
| 86 | + - name: Install KubeCF |
| 87 | + run: | |
| 88 | + # Configure KubeCF with Node IP address |
| 89 | + node_ip=$(kubectl get node kubecf-control-plane \ |
| 90 | + --output jsonpath='{ .status.addresses[?(@.type == "InternalIP")].address }') |
| 91 | + cat << _EOF_ > values.yaml |
| 92 | + system_domain: ${node_ip}.nip.io |
| 93 | + services: |
| 94 | + router: |
| 95 | + externalIPs: |
| 96 | + - ${node_ip} |
| 97 | + _EOF_ |
| 98 | +
|
| 99 | + # Trust the kubernetes root CA on the kind docker container: |
| 100 | + docker exec -t "kubecf-control-plane" bash -c 'cp /etc/kubernetes/pki/ca.crt /etc/ssl/certs/ && \ |
| 101 | + update-ca-certificates && \ |
| 102 | + (systemctl list-units | grep containerd > /dev/null && systemctl restart containerd)' |
| 103 | +
|
| 104 | + # Install KubeCF |
| 105 | + helm install kubecf \ |
| 106 | + --namespace kubecf \ |
| 107 | + --values values.yaml \ |
| 108 | + ./kubecf_release.tgz |
| 109 | +
|
45 | 110 | code-lint: |
46 | 111 | name: Code Lint |
47 | 112 | runs-on: ubuntu-latest |
|
0 commit comments