diff --git a/.buildkite/pipeline.fleet-server-tests.yaml b/.buildkite/pipeline.fleet-server-tests.yaml new file mode 100644 index 000000000..832d7f783 --- /dev/null +++ b/.buildkite/pipeline.fleet-server-tests.yaml @@ -0,0 +1,25 @@ +# This pipeline serves as the entry point for your service's quality gates definitions. When +# properly configured, it will be invoked automatically as part of the automated +# promotion process once a new version was rolled out in one of the various cloud stages. +# +# The updated environment is provided via ENVIRONMENT variable. The seedling +# step will branch and execute pipeline snippets at the following location: +# .buildkite/pipeline.tests-qa.yaml +# .buildkite/pipeline.tests-staging.yaml +# .buildkite/pipeline.tests-production.yaml +# +# Docs: https://docs.elastic.dev/serverless/qualitygates + +env: + ENVIRONMENT: ${ENVIRONMENT?} + TEAM_CHANNEL: "#fleet-cloud-services" + +steps: + - label: ":pipeline::grey_question::seedling: Trigger service tests for ${ENVIRONMENT}" + command: "make -C /agent run-environment-tests" + agents: + image: "docker.elastic.co/ci-agent-images/quality-gate-seedling:0.0.2" + +notify: + - slack: "${TEAM_CHANNEL}" + if: build.branch == "main" && build.state == "failed" \ No newline at end of file diff --git a/.buildkite/pipeline.service-tests.yml b/.buildkite/pipeline.service-tests.yml deleted file mode 100644 index f1d454a8b..000000000 --- a/.buildkite/pipeline.service-tests.yml +++ /dev/null @@ -1,16 +0,0 @@ -env: - ENVIRONMENT: ${ENVIRONMENT} - -steps: - - label: ":grey_question: Trigger Tests for ${ENVIRONMENT}" - command: | - TEST_PIPELINE=.buildkite/pipeline.test-${ENVIRONMENT}.yml - if test -f "$TEST_PIPELINE"; then - cat <<- YAML | buildkite-agent pipeline upload - steps: - - label: ":pipeline: Upload Test Pipeline" - command: buildkite-agent pipeline upload "$TEST_PIPELINE" - YAML - else - echo "No pipeline was defined at $TEST_PIPELINE. There is nothing to do here..." - fi diff --git a/.buildkite/pipeline.test-dev.yml b/.buildkite/pipeline.test-dev.yml deleted file mode 100644 index 6fccd3ee3..000000000 --- a/.buildkite/pipeline.test-dev.yml +++ /dev/null @@ -1,30 +0,0 @@ -steps: - - group: "Run tests" - key: "tests" - steps: - - label: "E2E Test" - key: "e2e-test" - command: ".buildkite/scripts/e2e_test.sh" - agents: - provider: "gcp" - depends_on: - - step: "unit-test" - allow_failure: false - - step: "int-test" - allow_failure: false - -notify: - - slack: "#fleet-cloud-services" - if: build.state == "failed" - -env: - SETUP_GVM_VERSION: 'v0.5.0' - DOCKER_COMPOSE_VERSION: '1.25.5' - DOCKER_REGISTRY: "docker.elastic.co" - DOCKER_IMAGE: "${DOCKER_REGISTRY}/observability-ci/temp-fleet-server" # needs to rename after tests - DOCKER_IMAGE_SHA_TAG: "temp-${BUILDKITE_COMMIT}" # needs to rename after tests - DOCKER_IMAGE_LATEST_TAG: "temp-latest" # needs to rename after tests - DOCKER_IMAGE_GIT_TAG: "temp-${BUILDKITE_BRANCH}" # needs to rename after tests - GO_AGENT_IMAGE: "golang:1.20.3" - TERRAFORM_VERSION: '1.4.6' - JOB_GCS_BUCKET: 'fleet-ci-artifacts' \ No newline at end of file diff --git a/.buildkite/pipeline.test-qa.yml b/.buildkite/pipeline.test-qa.yml deleted file mode 100644 index 6fccd3ee3..000000000 --- a/.buildkite/pipeline.test-qa.yml +++ /dev/null @@ -1,30 +0,0 @@ -steps: - - group: "Run tests" - key: "tests" - steps: - - label: "E2E Test" - key: "e2e-test" - command: ".buildkite/scripts/e2e_test.sh" - agents: - provider: "gcp" - depends_on: - - step: "unit-test" - allow_failure: false - - step: "int-test" - allow_failure: false - -notify: - - slack: "#fleet-cloud-services" - if: build.state == "failed" - -env: - SETUP_GVM_VERSION: 'v0.5.0' - DOCKER_COMPOSE_VERSION: '1.25.5' - DOCKER_REGISTRY: "docker.elastic.co" - DOCKER_IMAGE: "${DOCKER_REGISTRY}/observability-ci/temp-fleet-server" # needs to rename after tests - DOCKER_IMAGE_SHA_TAG: "temp-${BUILDKITE_COMMIT}" # needs to rename after tests - DOCKER_IMAGE_LATEST_TAG: "temp-latest" # needs to rename after tests - DOCKER_IMAGE_GIT_TAG: "temp-${BUILDKITE_BRANCH}" # needs to rename after tests - GO_AGENT_IMAGE: "golang:1.20.3" - TERRAFORM_VERSION: '1.4.6' - JOB_GCS_BUCKET: 'fleet-ci-artifacts' \ No newline at end of file diff --git a/.buildkite/pipeline.tests-qa.yaml b/.buildkite/pipeline.tests-qa.yaml new file mode 100644 index 000000000..fe777dc5d --- /dev/null +++ b/.buildkite/pipeline.tests-qa.yaml @@ -0,0 +1,12 @@ +# These pipeline steps constitute the quality gate for your service within the QA environment. +# Incorporate any necessary additional logic to validate the service's integrity. A failure in +# this pipeline build will prevent further progression to the subsequent stage. + +steps: + - label: ":rocket: Run Smoke tests" + trigger: "fleet-smoke-tests" + build: + message: "${BUILDKITE_MESSAGE}" + env: + ENVIRONMENT: ${ENVIRONMENT} + diff --git a/.buildkite/pipeline.tests-staging.yaml b/.buildkite/pipeline.tests-staging.yaml new file mode 100644 index 000000000..c794a285a --- /dev/null +++ b/.buildkite/pipeline.tests-staging.yaml @@ -0,0 +1,11 @@ +# These pipeline steps constitute the quality gate for your service within the Staging environment. +# Incorporate any necessary additional logic to validate the service's integrity. A failure in +# this pipeline build will prevent further progression to the subsequent stage. + +steps: + - label: ":rocket: Run Smoke tests" + trigger: "fleet-smoke-tests" + build: + message: "${BUILDKITE_MESSAGE}" + env: + ENVIRONMENT: ${ENVIRONMENT} diff --git a/catalog-info.yaml b/catalog-info.yaml index 3d302a074..b66e8f172 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -115,7 +115,7 @@ metadata: description: Pipeline tests the service integration in a specific environment links: - title: Pipeline - url: https://buildkite.com/elastic/fleet-server + url: https://buildkite.com/elastic/fleet-server-tests spec: type: buildkite-pipeline owner: group:fleet @@ -128,12 +128,13 @@ spec: description: fleet-server environment tests spec: repository: elastic/fleet-server - pipeline_file: .buildkite/pipeline.service-tests.yml + pipeline_file: .buildkite/pipeline.service-tests.yaml branch_configuration: "main" provider_settings: build_pull_requests: false + trigger_mode: none teams: - cloud-k8s-region: + ingest-fp: access_level: MANAGE_BUILD_AND_READ cloud-tooling: access_level: MANAGE_BUILD_AND_READ