-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dg-refactor-cloud-logs-wf
- Loading branch information
Showing
33 changed files
with
542 additions
and
223 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: "GCP Asset Inventory CI" | ||
description: "GCP Asset Inventory integration tests" | ||
inputs: | ||
elk-version: | ||
description: "ELK version" | ||
required: true | ||
credentials-json: | ||
description: "GCP Service account key JSON" | ||
required: true | ||
project-id: | ||
description: "GCP Project ID" | ||
required: true | ||
|
||
debug: | ||
description: "debug" | ||
required: false | ||
default: "false" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Init Integration | ||
uses: ./.github/actions/init-integration | ||
with: | ||
elk-version: ${{ inputs.elk-version }} | ||
|
||
- name: Run cloudbeat in background | ||
env: | ||
ES_HOST: http://localhost:9200 | ||
ES_USERNAME: elastic | ||
ES_PASSWORD: changeme | ||
GCP_PROJECT_ID: ${{ inputs.project-id}} | ||
GCP_CREDENTIALS_JSON: ${{ inputs.credentials-json }} | ||
GCP_ACCOUNT_TYPE: single-account | ||
shell: bash | ||
run: | | ||
./cloudbeat -c deploy/asset-inventory/cloudbeat-gcp-asset-inventory.yml -d '*' & | ||
- name: Wait for cloudbeat to send some events | ||
shell: bash | ||
run: sleep 20 | ||
|
||
- name: Check for assets | ||
working-directory: ./tests | ||
env: | ||
USE_K8S: "false" | ||
shell: bash | ||
run: poetry run pytest -k "asset_inventory_gcp" --alluredir=./allure/results/ --clean-alluredir | ||
|
||
- name: Upload test results | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: allure-results-ci-gcp-asset-inventory | ||
path: tests/allure/results/ | ||
overwrite: true | ||
|
||
- if: ${{ failure() || cancelled() || inputs.debug == 'true' }} | ||
name: Upload cloudbeat logs | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cloubeat-logs-ci-gcp-asset-inventory | ||
path: logs/ | ||
if-no-files-found: warn | ||
retention-days: 1 | ||
overwrite: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
push: | ||
branches: | ||
- main | ||
- "8.x" | ||
paths: | ||
- "deploy/azure/*.json" | ||
|
||
|
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
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
branches: | ||
- main | ||
- "[0-9]+.[0-9]+" | ||
- "8.x" | ||
types: [opened, synchronize, reopened] | ||
|
||
env: | ||
|
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1 +1 @@ | ||
.gcloud-490.0.0.pkg | ||
.gcloud-491.0.0.pkg |
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 |
---|---|---|
@@ -1 +1 @@ | ||
.gcloud-490.0.0.pkg | ||
.gcloud-491.0.0.pkg |
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 |
---|---|---|
@@ -1 +1 @@ | ||
.elastic-package-0.102.0.pkg | ||
.elastic-package-0.103.0.pkg |
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 |
---|---|---|
@@ -1 +1 @@ | ||
.gcloud-490.0.0.pkg | ||
.gcloud-491.0.0.pkg |
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 |
---|---|---|
@@ -1 +1 @@ | ||
.gcloud-490.0.0.pkg | ||
.gcloud-491.0.0.pkg |
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 |
---|---|---|
@@ -1 +1 @@ | ||
.gcloud-490.0.0.pkg | ||
.gcloud-491.0.0.pkg |
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 |
---|---|---|
@@ -1 +1 @@ | ||
.regal-0.25.0.pkg | ||
.regal-0.26.1.pkg |
File renamed without changes.
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,66 @@ | ||
cloudbeat: | ||
type: cloudbeat/asset_inventory | ||
config: | ||
v1: | ||
type: asset_inventory | ||
asset_inventory_provider: gcp | ||
gcp: | ||
project_id: ${GCP_PROJECT_ID:""} | ||
account_type: ${GCP_ACCOUNT_TYPE:""} | ||
credentials: | ||
credentials_json: ${GCP_CREDENTIALS_JSON:""} | ||
# credentials_file_path: ${GOOGLE_APPLICATION_CREDENTIALS:""} | ||
# Defines how often an event is sent to the output | ||
period: 30s | ||
evaluator: | ||
decision_logs: false | ||
# =================================== Kibana =================================== | ||
setup.kibana: | ||
# Kibana Host | ||
host: "http://host.docker.internal:5601" | ||
# =============================== Elastic Cloud ================================ | ||
|
||
# These settings simplify using Cloudbeat with the Elastic Cloud (https://cloud.elastic.co/). | ||
|
||
# The cloud.id setting overwrites the `output.elasticsearch.hosts` and | ||
# `setup.kibana.host` options. | ||
# You can find the `cloud.id` in the Elastic Cloud web UI. | ||
#cloud.id: | ||
|
||
# The cloud.auth setting overwrites the `output.elasticsearch.username` and | ||
# `output.elasticsearch.password` settings. The format is `<user>:<pass>`. | ||
#cloud.auth: | ||
|
||
# ---------------------------- Elasticsearch Output ---------------------------- | ||
output.elasticsearch: | ||
# Array of hosts to connect to. | ||
hosts: ${ES_HOST} | ||
|
||
# Protocol - either `http` (default) or `https`. | ||
# protocol: "https" | ||
|
||
# Authentication credentials - either API key or username/password. | ||
#api_key: "id:api_key" | ||
username: ${ES_USERNAME} | ||
password: ${ES_PASSWORD} | ||
|
||
# Enable to allow sending output to older ES versions | ||
allow_older_versions: true | ||
# ssl.certificate_authorities: ${ES_CERT} | ||
|
||
# ================================= Processors ================================= | ||
processors: | ||
- add_cloud_metadata: ~ | ||
- add_docker_metadata: ~ | ||
- drop_fields: | ||
fields: ["host.name"] | ||
# Sets log level. The default log level is info. | ||
# Available log levels are: error, warning, info, debug | ||
logging.level: debug | ||
# Enable debug output for selected components. To enable all selectors use ["*"] | ||
# Other available selectors are "beat", "publisher", "service" | ||
# Multiple selectors can be chained. | ||
#logging.selectors: ["publisher"] | ||
|
||
# Send all logging output to stderr. The default is false. | ||
#logging.to_stderr: false |
Oops, something went wrong.