Skip to content

Commit

Permalink
delete cloudtest add clusterctl
Browse files Browse the repository at this point in the history
Signed-off-by: denis-tingaikin <denis.tingajkin@xored.com>
  • Loading branch information
denis-tingaikin committed Sep 8, 2022
1 parent a4a7aa7 commit 80d5c79
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 133 deletions.
31 changes: 0 additions & 31 deletions .cloudtest.yaml

This file was deleted.

52 changes: 42 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ jobs:
with:
service_account_key: ${{ secrets.GCLOUD_SERVICE_KEY }}
project_id: ${{ secrets.GOOGLE_PROJECT_ID }}
- name: Install cloudtest
run: |
go get github.com/networkservicemesh/cloudtest@master
env:
GO111MODULE: on
GOBIN: /bin
- name: Checkout deployments
uses: actions/checkout@v2
with:
Expand All @@ -93,13 +87,39 @@ jobs:
uses: actions/checkout@v2
with:
path: ${{ github.repository }}
- name: Run tests with cloudtest
- name: Setup kind
uses: engineerd/setup-kind@v0.5.0
with:
image: kindest/node:v1.24.0
- name: Install clusterctl
working-directory: ${{ github.repository }}
run: |
kubectl cluster-info
curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.1/clusterctl-linux-amd64 -o clusterctl
chmod +x ./clusterctl
mv ./clusterctl /usr/local/bin/clusterctl
clusterctl version
- name: Run tests with clusterctl
working-directory: ${{ github.repository }}
run: |
cloudtest
clusterctl init --infrastructure gcp
clusterctl generate cluster gke-cluster --flavor development \
--kubernetes-version v1.24.0 \
--control-plane-machine-count=1 \
--worker-machine-count=2 \
> gke-cluster.yaml
kubectl apply -f gke-cluster.yaml
clusterctl describe cluster gke-cluster
clusterctl get kubeconfig gke-cluster > gke-cluster.kubeconfig
export KUBECONFIG=$(pwd)/gke-cluster.kubecsonfig
kubectl get pods -A
go test -count 1 -timeout 2h -race -v ./...
env:
GCLOUD_SERVICE_KEY: ${{ secrets.GCLOUD_SERVICE_KEY }}
GCLOUD_PROJECT_ID: ${{ secrets.GOOGLE_PROJECT_ID }}
GCP_B64ENCODED_CREDENTIALS: ${{ secrets.GCLOUD_SERVICE_KEY }}
GCP_PROJECT: ${{ secrets.GOOGLE_PROJECT_ID }}
GCP_REGION: us-central1-a
GCP_NODE_MACHINE_TYPE: n1-standard-2
CLUSTER_NAME: gke-test
- name: Publish test report
uses: mikepenz/action-junit-report@v2.1.0
if: ${{ always() }}
Expand All @@ -113,3 +133,15 @@ jobs:
with:
name: logs-${{ github.run_number }}
path: ${{ github.repository }}/.tests/cloud_test/
- name: Delete gke cluster
if: ${{ always() }}
working-directory: ${{ github.repository }}
run: |
kubectl delete cluster gke-cluster
kind delete cluster
env:
GCP_B64ENCODED_CREDENTIALS: ${{ secrets.GCLOUD_SERVICE_KEY }}
GCP_PROJECT: ${{ secrets.GOOGLE_PROJECT_ID }}
GCP_REGION: us-central1-a
GCP_NODE_MACHINE_TYPE: n1-standard-2
CLUSTER_NAME: gke-test
26 changes: 0 additions & 26 deletions cloudtest/gke.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions cloudtest/tests.yaml

This file was deleted.

35 changes: 0 additions & 35 deletions scripts/destroy-old-clusters.sh

This file was deleted.

5 changes: 0 additions & 5 deletions scripts/gke-destroy.sh

This file was deleted.

14 changes: 0 additions & 14 deletions scripts/gke-start.sh

This file was deleted.

0 comments on commit 80d5c79

Please sign in to comment.