Skip to content

Commit

Permalink
Merge branch 'main' into memory-limits
Browse files Browse the repository at this point in the history
  • Loading branch information
michel-laterman authored Nov 22, 2023
2 parents 7d8b4db + 8ddf3d9 commit 68d3e46
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .buildkite/pipeline.fleet-server-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ 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"
image: "docker.elastic.co/ci-agent-images/quality-gate-seedling:0.0.3"

notify:
- slack: "${TEAM_CHANNEL}"
if: build.branch == "main" && build.state == "failed"
if: build.branch == "main" && build.state == "failed"
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@

steps:
- label: ":pipeline::rocket::seedling: Trigger control-plane e2e tests"
if: build.env("ENVIRONMENT") == "production-canary"
trigger: "ess-k8s-production-e2e-tests" # https://buildkite.com/elastic/ess-k8s-production-e2e-tests
build:
env:
REGION_ID: aws-us-east-1
NAME_PREFIX: ci_test_fleet-promotion_
message: "${BUILDKITE_MESSAGE} (triggered by pipeline.tests-production-canary.yaml)"

- label: ":cookie: 1h bake period before continuing promotion"
if: build.env("ENVIRONMENT") == "production-canary"
command: "sleep 3600"
1 change: 1 addition & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ steps:
image: "docker.elastic.co/cloud-ci/sonarqube/buildkite-scanner:latest"
command:
- "buildkite-agent artifact download build/*coverage.out ."
- "buildkite-agent artifact download build/test-unit.out.xml ."
- "/scan-source-code.sh"
depends_on:
- step: "unit-test"
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.21.3
1.21.4
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 1m
build-tags: integration
go: "1.21.3"
go: "1.21.4"

issues:
# Maximum count of issues with the same text.
Expand Down
1 change: 1 addition & 0 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ spec:
repository: elastic/fleet-server
pipeline_file: .buildkite/pipeline.fleet-server-tests.yaml
branch_configuration: "main"
skip_intermediate_builds: false
provider_settings:
build_pull_requests: false
trigger_mode: none
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/cloud/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ build-and-push-cloud-image:
.PHONY: cloud-deploy
cloud-deploy: build-and-push-cloud-image ## Create a new cloud deployment
@cd ${TERRAFORM_PATH}; echo 'elastic_agent_docker_image="${CI_ELASTIC_AGENT_DOCKER_IMAGE}:${CUSTOM_IMAGE_TAG}"' > docker_image.auto.tfvars
@cd ${TERRAFORM_PATH}; terraform init; terraform apply -auto-approve
@cd ${TERRAFORM_PATH}; terraform init; terraform apply -auto-approve -var="pull_request=${GITHUB_PR_NUMBER}" -var="creator=${GITHUB_PR_HEAD_USER}" -var="buildkite_id=${BUILDKITE_BUILD_NUMBER}"

.PHONY: cloud-clean
cloud-clean: ## Clean cloud deployment
Expand Down
24 changes: 23 additions & 1 deletion dev-tools/cloud/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ locals {
resource "random_uuid" "name" {
}

variable "pull_request" {
type=string
default=""
description="The github pull request number"
}

variable "buildkite_id" {
type=string
default=""
description="The Buildkite build id associated with this deployment"
}

variable "creator" {
type=string
default=""
description="The Buildkite user who created the job"
}

resource "ec_deployment" "deployment" {
name = format("fleet server PR %s", random_uuid.name.result)
region = "gcp-us-west2"
Expand All @@ -34,7 +52,11 @@ resource "ec_deployment" "deployment" {
tags = {
"created_with_terraform" = "true"
"docker_image_ea" = local.docker_image_ea
}
"provisioner" = "terraform"
"pull_request" = var.pull_request
"buildkite_id" = var.buildkite_id
"creator" = var.creator
}

elasticsearch {}

Expand Down
2 changes: 1 addition & 1 deletion dev-tools/integration/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ELASTICSEARCH_VERSION=8.12.0-1a1295ff-SNAPSHOT
ELASTICSEARCH_VERSION=8.12.0-7521d760-SNAPSHOT
ELASTICSEARCH_USERNAME=elastic
ELASTICSEARCH_PASSWORD=changeme
TEST_ELASTICSEARCH_HOSTS=localhost:9200
2 changes: 1 addition & 1 deletion internal/pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (a *apiServer) AgentEnroll(w http.ResponseWriter, r *http.Request, params A
rb := rollback.New(zlog)
defer func() {
if err != nil {
zlog.Error().Err(err).Msg("perform rollback on enrollment failure")
zlog.Info().Err(err).Msg("perform rollback on enrollment failure")
err = rb.Rollback(r.Context())
if err != nil {
zlog.Error().Err(err).Msg("rollback error on enrollment failure")
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sonar.projectKey=elastic_fleet-server_AYpL8BsVaV3I-igkX4hx
sonar.host.url=https://sonar.elastic.dev

sonar.sources=.
sonar.exclusions=**/*_test.go, .git/**, dev-tools/**, /magefile.go, changelog/**, testing/**, **/*.gen.go
sonar.exclusions=**/*_test.go, .git/**, dev-tools/**, /magefile.go, changelog/**, testing/**, **/*.gen.go, internal/pkg/testing/**
sonar.tests=.
sonar.test.inclusions=**/*_test.go

Expand Down

0 comments on commit 68d3e46

Please sign in to comment.