-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Antonio Ojea
committed
Dec 10, 2020
1 parent
bed27a3
commit 6e4e710
Showing
1 changed file
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Compatibility | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
images: | ||
name: Node Images | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Verify | ||
run: make verify | ||
|
||
- name: Install kind from master | ||
run: sudo make install INSTALL_DIR=/usr/local/bin | ||
|
||
- name: Checkout Kubernetes | ||
uses: actions/checkout@v2 | ||
with: | ||
path: src/k8s.io/kubernetes | ||
repository: kubernetes/kubernetes | ||
ref: v1.20.0 | ||
|
||
- name: Build kind node image from master | ||
run: | | ||
KUBE_PATH="${{ github.workspace }}/src/k8s.io/kubernetes" | ||
kind build node-image --kube-root ${KUBE_PATH} --image kindest/node:test | ||
- name: Install kubectl | ||
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/kubectl | ||
- name: Create cluster with last stable version | ||
run: | | ||
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.9.0/kind-linux-amd64 | ||
chmod +x ./kind | ||
./kind create cluster -v7 --wait 1m --image kindest/node:test --retain | ||
- name: Get Cluster status | ||
run: | | ||
# wait network is ready | ||
sudo kubectl wait --for=condition=ready pods --namespace=kube-system -l k8s-app=kube-dns | ||
sudo kubectl get nodes -o wide | ||
sudo kubectl get pods -A | ||
- name: Load docker image | ||
run: ./kind load docker-image busybox:2 | ||
|
||
- name: Export logs | ||
if: always() | ||
run: | | ||
mkdir -p /tmp/kind/logs | ||
sudo kind export logs /tmp/kind/logs | ||
sudo chown -R $USER:$USER /tmp/kind/logs | ||
- name: Upload logs | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: kind-logs-${{ github.run_id }} | ||
path: /tmp/kind/logs | ||
|
||
- name: Delete cluster | ||
run: kind delete cluster |