From 608e23309451d7531f465e1bd4a5a8f4df0c37f9 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Thu, 22 Aug 2024 16:08:21 +0200 Subject: [PATCH] Add weekly pipeline --- .buildkite/pipeline.schedule-weekly.yml | 29 ++++++++++++ .buildkite/pipeline.yml | 6 ++- catalog-info.yaml | 62 ++++++++++++++++++++----- 3 files changed, 84 insertions(+), 13 deletions(-) create mode 100644 .buildkite/pipeline.schedule-weekly.yml diff --git a/.buildkite/pipeline.schedule-weekly.yml b/.buildkite/pipeline.schedule-weekly.yml new file mode 100644 index 00000000000..b6d8dcab7bd --- /dev/null +++ b/.buildkite/pipeline.schedule-weekly.yml @@ -0,0 +1,29 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json +name: integrations-schedule-weekly + +env: + SETUP_GVM_VERSION: "v0.5.2" + LINUX_AGENT_IMAGE: "golang:${GO_VERSION}" + +# The pipeline is triggered by the scheduler every week +steps: + - label: ":white_check_mark: Check go sources" + key: "check" + command: ".buildkite/scripts/check_sources.sh" + agents: + image: "${LINUX_AGENT_IMAGE}" + cpu: "8" + memory: "4G" + + - label: "Check integrations local stacks and Elastic Agent Ubuntu docker - Stack Version v8.16" + trigger: "integrations" + build: + env: + SERVERLESS: "false" + FORCE_CHECK_ALL: "true" + STACK_VERSION: 8.16.0-SNAPSHOT + PUBLISH_COVERAGE_REPORTS: "false" + ELASTIC_AGENT_DOCKER_IMAGE: "docker.elastic.co/elastic-agent/elastic-agent-complete" + depends_on: + - step: "check" + allow_failure: false diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 7e2e8f5a6ad..87cfec352ef 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,7 +1,6 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json env: SETUP_GVM_VERSION: "v0.5.2" - LINUX_AGENT_IMAGE: "golang:${GO_VERSION}" DOCKER_COMPOSE_VERSION: "v2.24.1" DOCKER_VERSION: "26.1.2" KIND_VERSION: 'v0.20.0' @@ -9,10 +8,13 @@ env: YQ_VERSION: 'v4.35.2' JQ_VERSION: '1.7' GH_CLI_VERSION: "2.29.0" - IMAGE_UBUNTU_X86_64: "family/core-ubuntu-2204" STACK_VERSION: 8.16.0-SNAPSHOT ELASTIC_AGENT_DOCKER_IMAGE: "docker.elastic.co/elastic-agent/elastic-agent" + # Agent images used in pipeline steps + LINUX_AGENT_IMAGE: "golang:${GO_VERSION}" + IMAGE_UBUNTU_X86_64: "family/core-ubuntu-2204" + # Elastic package settings # Manage docker output/logs ELASTIC_PACKAGE_COMPOSE_DISABLE_VERBOSE_OUTPUT: "true" diff --git a/catalog-info.yaml b/catalog-info.yaml index 3b3f7de571a..0d6daf4d3c9 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -56,17 +56,6 @@ spec: cancel_intermediate_builds_branch_filter: '!main !backport-*' skip_intermediate_builds: true skip_intermediate_builds_branch_filter: '!main !backport-*' - schedules: - Test with Elastic Agent ubuntu image: - branch: main - cronline: "30 3 * * 1" - message: Test with Elastic Agent Ubuntu docker - env: - SERVERLESS: "false" - FORCE_CHECK_ALL: "true" - STACK_VERSION: 8.16.0-SNAPSHOT - PUBLISH_COVERAGE_REPORTS: "false" - ELASTIC_AGENT_DOCKER_IMAGE: "docker.elastic.co/elastic-agent/elastic-agent-complete" env: ELASTIC_PR_COMMENTS_ENABLED: 'true' teams: @@ -131,6 +120,57 @@ spec: # yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json apiVersion: backstage.io/v1alpha1 kind: Resource +metadata: + name: pipeline-integrations-schedule-weekly + description: 'Weekly pipeline for the Integrations project' + links: + - title: Pipeline + url: https://buildkite.com/elastic/integrations-schedule-weekly + +spec: + type: buildkite-pipeline + owner: group:ingest-fp + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: integrations-schedule-weekly + description: 'Weekly pipeline for the Integrations project' + spec: + pipeline_file: ".buildkite/pipeline.schedule-weekly.yml" + schedules: + main_weekly: + branch: "main" + cronline: "30 3 * * 1" + message: "Run the weekly jobs" + provider_settings: + trigger_mode: none # don't trigger jobs from github activity + build_pull_request_forks: false + build_pull_requests: true + build_tags: false + filter_enabled: true + filter_condition: >- + build.pull_request.id == null || (build.creator.name == 'elasticmachine' && build.pull_request.id != null && build.source == 'api') + repository: elastic/integrations + cancel_intermediate_builds: true + cancel_intermediate_builds_branch_filter: '!main' + skip_intermediate_builds: true + skip_intermediate_builds_branch_filter: '!main' + env: + ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' + SLACK_NOTIFICATIONS_CHANNEL: '#beats-build' + SLACK_NOTIFICATIONS_ALL_BRANCHES: 'true' + SLACK_NOTIFICATIONS_ON_SUCCESS: 'true' + teams: + ingest-fp: + access_level: MANAGE_BUILD_AND_READ + everyone: + access_level: READ_ONLY +--- +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource metadata: name: pipeline-integrations-serverless description: 'Pipeline for the Integrations project in serverless'