Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RELEASE #1466

Merged
merged 5 commits into from
Mar 4, 2024
Merged

RELEASE #1466

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 63 additions & 92 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,23 @@ commands:
sudo apt update
sudo apt install python3-requests
when: always
setup_node:
description: Setup Node 18
steps:
- run:
command: |
export NVM_DIR="/opt/circleci/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install v18
npm ci
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
echo 'nvm alias default v18' >> $BASH_ENV
jobs:
aks_integration_tests:
machine:
docker_layer_caching: true
image: ubuntu-2004:202111-01
docker:
- image: cimg/node:18.19.1
resource_class: large
steps:
- checkout
- setup_node
- setup_remote_docker
- run:
command: npm ci
- install_python_requests
- azure-cli/install
- run:
command: mkdir -p /tmp/logs/test/integration/aks
name: Create temp dir for logs
- run:
command: |
npm ci &&
export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=$(./scripts/circleci-jobs/setup-integration-tests.py)
.circleci/do-exclusively --branch staging --job ${CIRCLE_JOB} npm run test:integration:aks:yaml
name: Integration tests AKS
Expand All @@ -58,10 +46,7 @@ jobs:
working_directory: ~/kubernetes-monitor
build_and_upload_operator:
docker:
- auth:
password: $DOCKERHUB_PASSWORD
username: $DOCKERHUB_USER
image: cimg/python:3.10
- image: cimg/python:3.10
steps:
- checkout
- setup_remote_docker
Expand Down Expand Up @@ -106,10 +91,11 @@ jobs:
when: on_fail
working_directory: ~/kubernetes-monitor
build_image:
machine:
image: ubuntu-2004:202111-02
docker:
- image: cimg/base:current
steps:
- checkout
- setup_remote_docker
- install_python_requests
- run:
command: |
Expand Down Expand Up @@ -149,12 +135,12 @@ jobs:
when: on_fail
working_directory: ~/kubernetes-monitor
code_formatter:
machine:
docker_layer_caching: true
image: ubuntu-2004:202111-01
docker:
- image: cimg/node:18.19.1
steps:
- checkout
- setup_node
- run:
command: npm ci
- install_python_requests
- run:
command: |
Expand All @@ -168,10 +154,7 @@ jobs:
working_directory: ~/kubernetes-monitor
prepare_to_deploy:
docker:
- auth:
password: $DOCKERHUB_PASSWORD
username: $DOCKERHUB_USER
image: cimg/node:16.13
- image: cimg/base:current
steps:
- checkout
- install_python_requests
Expand All @@ -185,10 +168,7 @@ jobs:
working_directory: ~/kubernetes-monitor
deploy_to_prod:
docker:
- auth:
password: $DOCKERHUB_PASSWORD
username: $DOCKERHUB_USER
image: cimg/node:16.13
- image: cimg/base:current
steps:
- checkout
- install_python_requests
Expand All @@ -202,10 +182,7 @@ jobs:
working_directory: ~/kubernetes-monitor
deploy_to_sysdig_integration_cluster:
docker:
- auth:
password: $DOCKERHUB_PASSWORD
username: $DOCKERHUB_USER
image: cimg/base:stable
- image: cimg/base:stable
steps:
- checkout
- run:
Expand Down Expand Up @@ -242,22 +219,22 @@ jobs:
when: on_fail
working_directory: ~/kubernetes-monitor
eks_integration_tests:
machine:
docker_layer_caching: true
image: ubuntu-2004:202111-01
docker:
- image: cimg/node:18.19.1
resource_class: large
steps:
- checkout
- setup_remote_docker
- run:
command: npm ci
- install_python_requests
- setup_node
- aws-cli/install:
override-installed: true
- run:
command: mkdir -p /tmp/logs/test/integration/eks
name: Create temp dir for logs
- run:
command: |
npm ci &&
export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=$(./scripts/circleci-jobs/setup-integration-tests.py)
.circleci/do-exclusively --branch staging --job ${CIRCLE_JOB} npm run test:integration:eks:yaml
name: Integration tests EKS
Expand All @@ -270,13 +247,14 @@ jobs:
path: /tmp/logs/test/integration/eks
working_directory: ~/kubernetes-monitor
integration_tests:
machine:
docker_layer_caching: true
image: ubuntu-2004:202111-01
docker:
- image: cimg/node:18.19.1
resource_class: large
steps:
- checkout
- setup_node
- setup_remote_docker
- run:
command: npm ci
- install_python_requests
- run:
command: mkdir -p /tmp/logs/test/integration/kind
Expand All @@ -295,13 +273,14 @@ jobs:
path: /tmp/logs/test/integration/kind
working_directory: ~/kubernetes-monitor
integration_tests_helm:
machine:
docker_layer_caching: true
image: ubuntu-2004:202111-01
docker:
- image: cimg/node:18.19.1
resource_class: large
steps:
- checkout
- setup_node
- setup_remote_docker
- run:
command: npm ci
- install_python_requests
- run:
command: mkdir -p /tmp/logs/test/integration/kind-helm
Expand All @@ -320,13 +299,14 @@ jobs:
path: /tmp/logs/test/integration/kind-helm
working_directory: ~/kubernetes-monitor
integration_tests_operator_on_k8s:
machine:
docker_layer_caching: true
image: ubuntu-2004:202111-01
resource_class: large
docker:
- image: cimg/node:18.19.1
resource_class: large
steps:
- checkout
- setup_node
- setup_remote_docker
- run:
command: npm ci
- install_python_requests
- run:
command: mkdir -p /tmp/logs/test/integration/kind-olm-operator
Expand All @@ -347,13 +327,14 @@ jobs:
path: /tmp/logs/test/integration/kind-olm-operator
working_directory: ~/kubernetes-monitor
integration_tests_proxy:
machine:
docker_layer_caching: true
image: ubuntu-2004:202111-01
docker:
- image: cimg/node:18.19.1
resource_class: large
steps:
- checkout
- setup_node
- setup_remote_docker
- run:
command: npm ci
- install_python_requests
- run:
command: mkdir -p /tmp/logs/test/integration/proxy
Expand All @@ -372,12 +353,12 @@ jobs:
path: /tmp/logs/test/integration/proxy
working_directory: ~/kubernetes-monitor
lint:
machine:
docker_layer_caching: true
image: ubuntu-2004:202111-01
docker:
- image: cimg/node:18.19.1
steps:
- checkout
- setup_node
- run:
command: npm ci
- install_python_requests
- run:
command: |
Expand All @@ -390,13 +371,14 @@ jobs:
when: on_fail
working_directory: ~/kubernetes-monitor
openshift4_integration_tests:
machine:
docker_layer_caching: true
image: ubuntu-2204:current
resource_class: large
docker:
- image: cimg/node:18.19.1
resource_class: large
steps:
- checkout
- setup_node
- setup_remote_docker
- run:
command: npm ci
- install_python_requests
- run:
command: mkdir -p /tmp/logs/test/integration/openshift4
Expand Down Expand Up @@ -650,10 +632,7 @@ jobs:
working_directory: ~/kubernetes-monitor
publish:
docker:
- auth:
password: $DOCKERHUB_PASSWORD
username: $DOCKERHUB_USER
image: cimg/node:16.13
- image: cimg/node:18.19.1
steps:
- checkout
- setup_remote_docker
Expand Down Expand Up @@ -877,10 +856,7 @@ jobs:
working_directory: ~/kubernetes-monitor
sync_community_operators_with_snyk_fork:
docker:
- auth:
password: $DOCKERHUB_PASSWORD
username: $DOCKERHUB_USER
image: cimg/python:3.10
- image: cimg/python:3.10
steps:
- checkout
- install_python_requests
Expand Down Expand Up @@ -909,10 +885,7 @@ jobs:
working_directory: ~/kubernetes-monitor
sync_embedded_community_operators_with_snyk_fork:
docker:
- auth:
password: $DOCKERHUB_PASSWORD
username: $DOCKERHUB_USER
image: cimg/python:3.10
- image: cimg/python:3.10
steps:
- checkout
- install_python_requests
Expand Down Expand Up @@ -942,10 +915,11 @@ jobs:
system_tests:
machine:
docker_layer_caching: true
image: ubuntu-2204:2022.04.1
image: default
steps:
- checkout
- setup_node
- run:
command: npm ci
- install_python_requests
- run:
command: |
Expand All @@ -966,10 +940,7 @@ jobs:
working_directory: ~/kubernetes-monitor
tag_and_push:
docker:
- auth:
password: $DOCKERHUB_PASSWORD
username: $DOCKERHUB_USER
image: cimg/node:16.13
- image: cimg/node:18.19.1
steps:
- checkout
- setup_remote_docker
Expand All @@ -992,12 +963,12 @@ jobs:
when: on_fail
working_directory: ~/kubernetes-monitor
unit_tests:
machine:
docker_layer_caching: true
image: ubuntu-2004:202111-01
docker:
- image: cimg/node:18.19.1
steps:
- checkout
- setup_node
- run:
command: npm ci
- install_python_requests
- snyk/scan:
additional-arguments: --all-projects --exclude=test
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"packageurl-js": "^1.2.1",
"sleep-promise": "^9.1.0",
"snyk-config": "5.3.0",
"snyk-docker-plugin": "^6.10.2",
"snyk-docker-plugin": "6.10.3",
"source-map-support": "^0.5.21",
"tunnel": "0.0.6",
"typescript": "4.7.4",
Expand Down
6 changes: 4 additions & 2 deletions src/data-scraper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ export async function scrapeData(): Promise<void> {
2,
);

logger.info({}, 'sending runtime data upstream');
await sendRuntimeData(runtimeDataPayload);
if (runtimeDataPayload) {
logger.info({}, 'sending runtime data upstream');
await sendRuntimeData(runtimeDataPayload);
}

cursor = responseBody?.page.next || '';
if (!cursor) {
Expand Down
Loading
Loading