Skip to content

Update from update/networkservicemesh/integration-k8s-kind #743

Update from update/networkservicemesh/integration-k8s-kind

Update from update/networkservicemesh/integration-k8s-kind #743

Workflow file for this run

---
name: ci
on:
pull_request:
push:
branches:
- 'release/**'
jobs:
yamllint:
uses: networkservicemesh/.github/.github/workflows/yamllint.yaml@main
shellcheck:
uses: networkservicemesh/.github/.github/workflows/shellcheck.yaml@main
golangci-lint:
uses: networkservicemesh/.github/.github/workflows/golangci-lint.yaml@main
exclude-fmt-errorf:
uses: networkservicemesh/.github/.github/workflows/exclude-fmt-errorf.yaml@main
checkgomod:
uses: networkservicemesh/.github/.github/workflows/checkgomod.yaml@main
aws:
environment: EKS
name: Amazon Elastic Kubernetes Service
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ip_family:
- ipv4
- ipv6
steps:
- name: Checkout files
uses: actions/checkout@v4
with:
path: ${{ github.repository }}
- name: Set up /bin permissions
run: |
sudo chmod -R 777 /bin
- name: Set up go
uses: actions/setup-go@v5
with:
go-version: 1.20.5
- name: Install deps
working-directory: ${{ github.repository }}
run: |
apt-get update && apt-get -y install curl dnsutils
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
mv /tmp/eksctl /usr/local/bin
eksctl version
curl -o aws-iam-authenticator https://s3.us-west-2.amazonaws.com/amazon-eks/1.21.2/2021-07-05/bin/linux/amd64/aws-iam-authenticator
chmod 755 aws-iam-authenticator
mv ./aws-iam-authenticator /usr/local/bin
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.23.6/bin/linux/amd64/kubectl
chmod +x kubectl
mkdir -p ~/.local/bin
mv ./kubectl ~/.local/bin/kubectl
kubectl version --client
- name: Create clusters
working-directory: ${{ github.repository }}
run: |
sed -i "s/NSM_CLUSTER_NAME/$AWS_CLUSTER_NAME/g" aws-${{ matrix.ip_family }}.yaml
sed -i "s/NSM_REGION/$AWS_REGION/g" aws-${{ matrix.ip_family }}.yaml
sed -i "s/NSM_NODEGROUPS_NAME/$AWS_CLUSTER_NAME-workers/g" aws-${{ matrix.ip_family }}.yaml
eksctl create cluster -f aws-${{ matrix.ip_family }}.yaml
kubectl get pods -A -o wide
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-2
AWS_CLUSTER_NAME: aws-${{ github.run_id }}-${{ github.run_number }}-${{ matrix.ip_family }}
- name: Run tests
working-directory: ${{ github.repository }}
run: |
go test -count 1 -timeout 1h55m -race -v ./... -parallel 4
env:
ARTIFACTS_DIR: logs-${{ matrix.ip_family }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-2
- name: Cleanup
if: ${{ always() }}
working-directory: ${{ github.repository }}
run: |
eksctl delete cluster -f aws-${{ matrix.ip_family }}.yaml --disable-nodegroup-eviction
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-2
AWS_CLUSTER_NAME: aws-${{ github.run_id }}-${{ github.run_number }}-${{ matrix.ip_family }}
- name: Upload logs
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: aws-logs-${{ github.run_number }}-${{ matrix.ip_family }}
path: ${{ github.repository }}/logs-${{ matrix.ip_family }}