-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade dependencies and build environment (NEWRELIC-7248) (#386)
* upgrade dependencies and build environment * support a new set of Kubernets versions * fix script name typo * adapt script to use new yq version * revert upgrade of load test pipeline * try to upgrade yq
- Loading branch information
Showing
9 changed files
with
178 additions
and
183 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 |
---|---|---|
|
@@ -9,27 +9,41 @@ jobs: | |
load_tests: | ||
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'ci/skip-load-test') }} | ||
name: Load Tests | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-20.04 # Read the comment below why this is not set to `latest`. | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '^1.13.1' | ||
- name: Installing dependencies yq and skaffold | ||
go-version-file: "go.mod" | ||
- name: Installing dependencies | ||
run: | | ||
sudo wget -O /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64 | ||
sudo chmod +x /usr/local/bin/yq | ||
sudo wget -O /usr/local/bin/skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 | ||
sudo chmod +x /usr/local/bin/skaffold | ||
# Load test uses skaffold to run `nri-prometheus` in the cluster. skaffold is not compatible with minikube when the | ||
# clusters do not use docker as CRI giving this error: | ||
# | ||
# invalid skaffold config: getting minikube env: running [/home/runner/work/_temp/minikube docker-env --shell none -p minikube --user=skaffold] | ||
# - stdout: "false exit code 14\n" | ||
# - stderr: "X Exiting due to MK_USAGE: The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"containerd\" runtime.\n" | ||
# - cause: exit status 14 | ||
# | ||
# Se we are in a dependency cycle: | ||
# - Minikube with Kubernetes > 1.24 needs the CRI to NOT be docker | ||
# - Skaffold needs the CRI to be docker | ||
# | ||
# Here we test `nri-prometheus`, Kubernetes is just a tool we use for testing, so we should not care about the version | ||
# of Kubernetes and we should not upgrade it so the test keeps working. | ||
- name: Setup Minikube | ||
uses: manusa/[email protected] | ||
with: | ||
minikube version: 'v1.15.1' | ||
kubernetes version: 'v1.19.4' | ||
- name: Run laod tests | ||
minikube version: v1.15.1 | ||
kubernetes version: v1.19.4 | ||
github token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Run load tests | ||
env: | ||
NEWRELIC_LICENSE: ${{ secrets.NEWRELIC_LICENSE }} | ||
run : | | ||
source ./load-test/laod_test.sh | ||
source ./load-test/load_test.sh | ||
runLoadTest |
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 |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
kubernetes-version: [ "v1.16.15", "v1.22.0" ] | ||
kubernetes-version: [ "v1.25.6", "v1.26.0" ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
|
@@ -47,10 +47,10 @@ jobs: | |
fi | ||
done | ||
- name: Setup Minikube | ||
uses: manusa/[email protected].1 | ||
uses: manusa/[email protected].2 | ||
if: steps.list-changed.outputs.changed == 'true' | ||
with: | ||
minikube version: v1.20.0 | ||
minikube version: v1.29.0 | ||
kubernetes version: ${{ matrix.kubernetes-version }} | ||
github token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/setup-go@v3 | ||
|
@@ -74,7 +74,7 @@ jobs: | |
|
||
static-analysis: | ||
name: Run all static analysis checks | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v2 | ||
|
@@ -95,21 +95,15 @@ jobs: | |
|
||
test-nix: | ||
name: Run unit tests on *Nix | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Login to DockerHub | ||
if: ${{ env.DOCKER_LOGIN_AVAILABLE }} | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.OHAI_DOCKER_HUB_ID }} | ||
password: ${{ secrets.OHAI_DOCKER_HUB_PASSWORD }} | ||
- name: Unit tests | ||
run: make ci/test | ||
|
||
test-windows: | ||
name: Run unit tests on Windows | ||
runs-on: windows-2019 | ||
runs-on: windows-latest | ||
env: | ||
GOPATH: ${{ github.workspace }} | ||
defaults: | ||
|
@@ -132,14 +126,8 @@ jobs: | |
# make sure code build in all platforms | ||
build: | ||
name: Build binary for all platforms:arch | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Login to DockerHub | ||
if: ${{ env.DOCKER_LOGIN_AVAILABLE }} | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.OHAI_DOCKER_HUB_ID }} | ||
password: ${{ secrets.OHAI_DOCKER_HUB_PASSWORD }} | ||
- name: Build all platforms:arch | ||
run: make ci/build |
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
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
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
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
Oops, something went wrong.