Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
9 changes: 9 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ env:
VAULT_PATH: "kv/ci-shared/observability-ingest/cloud/gcp"
DOCKER_REGISTRY: "docker.elastic.co"
steps:
- label: "check-ci"
key: "check-ci"
command: ".buildkite/scripts/steps/check-ci.sh"
agents:
provider: "gcp"
image: "family/core-ubuntu-2204"
retry:
manual:
allowed: true
- group: "Unit tests"
key: "unit-tests"
steps:
Expand Down
12 changes: 12 additions & 0 deletions .buildkite/scripts/steps/check-ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common.sh

echo "--- Check CI"
go version
mage --version
BEAT_VERSION=$(make get-version)
echo "Beat version: $BEAT_VERSION"
Comment thread
pazone marked this conversation as resolved.
make check-ci
85 changes: 1 addition & 84 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,90 +65,7 @@ pipeline {
setEnvVar('GO_VERSION', readFile(file: '.go-version')?.trim())
}
}
}
stage('Check'){
steps {
withGithubNotify(context: "Check") {
withMageEnv(){
dir("${BASE_DIR}"){
setEnvVar('BEAT_VERSION', sh(label: 'Get beat version', script: 'make get-version', returnStdout: true)?.trim())
log(level: 'INFO', text: "env.BEAT_VERSION=${env.BEAT_VERSION}")
cmd(label: 'check', script: 'make check-ci')
}
}
}
}
}
stage('Test') {
Comment thread
alexsapran marked this conversation as resolved.
Outdated
when {
beforeAgent true
expression { return env.ONLY_DOCS == "false" }
}
failFast false
matrix {
agent {label "${PLATFORM}"}
options { skipDefaultCheckout() }
axes {
axis {
name 'PLATFORM'
// Orka workers are not healthy (memory and connectivity issues)
values 'ubuntu-22 && immutable', 'aws && aarch64 && gobld/diskSizeGb:200', 'windows-2016 && windows-immutable', 'windows-2022 && windows-immutable' //, 'macos12 && x86_64'
}
}
stages {
stage('Package') {
when {
beforeAgent true
allOf {
anyOf {
expression { return isE2eEnabled() }
expression { return isPackageEnabled() }
not { changeRequest() }
}
// Run packaging only for the linux specific arch
expression { return (PLATFORM.contains('ubuntu') || PLATFORM.contains('aarch64')) }
}
}
environment {
ARCH = "${PLATFORM.contains('aarch64') ? 'arm64' : 'amd64'}"
DEV = true
EXTERNAL = true
}
steps {
withGithubNotify(context: "Package ${PLATFORM}") {
deleteDir()
unstashV2(name: 'source', bucket: "${JOB_GCS_BUCKET}", credentialsId: "${JOB_GCS_CREDENTIALS}")
withMageEnv(){
dir("${BASE_DIR}"){
withPackageEnv("${PLATFORM}") {
cmd(label: 'Go package', script: 'mage package ironbank')
uploadPackagesToGoogleBucket(
credentialsId: env.JOB_GCS_EXT_CREDENTIALS,
repo: env.REPO,
bucket: env.JOB_GCS_EXT_BUCKET,
pattern: "build/distributions/**/*")
pushDockerImages(
registry: env.DOCKER_REGISTRY,
secret: env.DOCKER_ELASTIC_SECRET,
snapshot: env.SNAPSHOT,
version: env.BEAT_VERSION,
images: [
[ source: "beats/elastic-agent", arch: env.ARCH, target: "observability-ci/elastic-agent"],
[ source: "beats/elastic-agent-oss", arch: env.ARCH, target: "observability-ci/elastic-agent-oss"],
[ source: "beats/elastic-agent-ubi9", arch: env.ARCH, target: "observability-ci/elastic-agent-ubi9"],
[ source: "beats/elastic-agent-complete", arch: env.ARCH, target: "observability-ci/elastic-agent-complete"],
[ source: "beats-ci/elastic-agent-cloud", arch: env.ARCH, target: "observability-ci/elastic-agent-cloud"]
]
)
}
}
}
}
}
}
}
}
}
}
stage('Sync K8s') { //This stage opens a PR to kibana Repository in order to sync k8s manifests
when {
// Only on main branch
Expand Down