chore(deps): update dependency go to v1.22.5 #4413
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
name: E2E over minikube | |
on: | |
pull_request: | |
branches-ignore: | |
- v2 | |
push: | |
branches: | |
- main | |
- renovate/** | |
jobs: | |
e2eTests: | |
# Do not run e2e tests if commit message or PR has skip-e2e. | |
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'ci/skip-e2e') }} | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 6 # len(k8sVersion)/2 is a good number to have here | |
matrix: | |
# Latest patch version can be found in https://github.com/kubernetes/website/blob/main/content/en/releases/patch-releases.md | |
# Some versions might not be available yet in https://storage.googleapis.com/kubernetes-release/release/v1.X.Y/bin/linux/amd64/kubelet | |
k8sVersion: ["v1.30.0", "v1.29.5", "v1.28.3", "v1.27.5", "v1.26.8"] | |
cri: [ containerd ] | |
env: | |
DOCKER_BUILDKIT: '1' # Setting DOCKER_BUILDKIT=1 ensures TARGETOS and TARGETARCH are populated | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Setup Minikube | |
uses: manusa/[email protected] | |
with: | |
minikube version: v1.33.1 | |
kubernetes version: ${{ matrix.k8sVersion }} | |
driver: docker | |
start args: "--container-runtime=${{ matrix.cri }}" | |
- name: Enable addons minikube needed for HPA | |
run: | | |
minikube addons enable metrics-server | |
- name: Compile, Build and load Images | |
run: | | |
GOOS=linux GOARCH=amd64 make compile # Set GOOS and GOARCH explicitly since Dockerfile expects them in the binary name | |
docker build -t e2e/nri-kubernetes:e2e . | |
minikube image load e2e/nri-kubernetes:e2e | |
- name: Setup Helm | |
run: | | |
chmod go-r /home/runner/.kube/config | |
helm repo add newrelic https://helm-charts.newrelic.com | |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts | |
helm repo update | |
- name: Select metrics exception file | |
id: exceptions-version | |
run: | | |
MINOR=$(echo "${{ matrix.k8sVersion }}"|sed -e 's_v\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)_\2_') | |
echo $MINOR | |
if [ "$MINOR" -eq 26 ]; then | |
echo "exceptions=1_26" >> $GITHUB_OUTPUT | |
elif [ "$MINOR" -eq 27 ]; then | |
echo "exceptions=1_27" >> $GITHUB_OUTPUT | |
elif [ "$MINOR" -eq 28 ]; then | |
echo "exceptions=1_28" >> $GITHUB_OUTPUT | |
elif [ "$MINOR" -eq 29 ]; then | |
echo "exceptions=1_29" >> $GITHUB_OUTPUT | |
elif [ "$MINOR" -eq 30 ]; then | |
echo "exceptions=1_30" >> $GITHUB_OUTPUT | |
fi | |
- name: Run e2e-test | |
uses: newrelic/newrelic-integration-e2e-action@v1 | |
env: | |
EXCEPTIONS_SOURCE_FILE: ${{ steps.exceptions-version.outputs.exceptions }}-exceptions.yml | |
with: | |
retry_seconds: 60 | |
retry_attempts: 5 | |
agent_enabled: false | |
spec_path: e2e/test-specs.yml | |
account_id: ${{ secrets.K8S_AGENTS_E2E_ACCOUNT_ID }} | |
api_key: ${{ secrets.K8S_AGENTS_E2E_API_KEY }} | |
license_key: ${{ secrets.K8S_AGENTS_E2E_LICENSE_KEY }} |