Skip to content

Commit

Permalink
added image tag and push
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed Feb 1, 2024
1 parent 5291edf commit 0f2dc0c
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 19 deletions.
22 changes: 22 additions & 0 deletions .buildkite/env-scripts/env.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
#!/usr/bin/env bash

source .buildkite/env-scripts/util.sh

docs_changeset="^.*\.(asciidoc|md)$
deploy/kubernetes/.*-kubernetes.yaml"
packaging_changeset="^dev-tools/packaging/
^.go-version"

changeset_applies() {
local changeset=$1
if are_files_changed "$changeset"; then
echo true
else
echo false
fi
}

SETUP_GVM_VERSION="v0.5.1"
WORKSPACE="$(pwd)"
BIN="${WORKSPACE}/bin"
HW_TYPE="$(uname -m)"
PLATFORM_TYPE="$(uname)"
ONLY_DOCS=$(changeset_applies "$docs_changeset")
PACKAGING_CHANGES=$(changeset_applies "$packaging_changeset")
GO_MOD_CHANGES=$(changeset_applies "^go.mod")

export SETUP_GVM_VERSION
export WORKSPACE
export BIN
export HW_TYPE
export PLATFORM_TYPE
export PACKAGING_CHANGES
export ONLY_DOCS
export GO_MOD_CHANGES
8 changes: 4 additions & 4 deletions .buildkite/env-scripts/linux-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [[ $PLATFORM_TYPE == "Linux" ]]; then
sudo apt-get install -y python3-venv
fi

echo ":: Setting up environment ::"
add_bin_path
with_go
with_mage
#echo ":: Setting up environment ::"
#add_bin_path
#with_go
#with_mage
24 changes: 13 additions & 11 deletions .buildkite/filebeat/filebeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ env:
IMAGE_WIN_2019: "family/core-windows-2019"
IMAGE_WIN_2022: "family/core-windows-2022"
IMAGE_MACOS_13: "generic-13-ventura-x64"
SETUP_MAGE_VERSION: "1.14.0"
ASDF_MAGE_VERSION: "1.14.0"

steps:
- group: "Filebeat Mandatory Testing"
Expand All @@ -21,9 +23,9 @@ steps:
- github_commit_status:
context: "Filebeat: Unit Tests"
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "c2-standard-16"
provider: gcp
imageProject: elastic-images-qa
image: family/platform-ingest-eng-prod-base-ubuntu-2204
artifact_paths:
- "filebeat/build/*.xml"
- "filebeat/build/*.json"
Expand All @@ -35,9 +37,9 @@ steps:
- github_commit_status:
context: "Filebeat: Integration Tests"
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "c2-standard-16"
provider: gcp
imageProject: elastic-images-qa
image: family/platform-ingest-eng-prod-base-ubuntu-2204
artifact_paths:
- "filebeat/build/*.xml"
- "filebeat/build/*.json"
Expand All @@ -49,9 +51,9 @@ steps:
- github_commit_status:
context: "Filebeat: Python Integration Tests"
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "c2-standard-16"
provider: gcp
imageProject: elastic-images-qa
image: family/platform-ingest-eng-prod-base-ubuntu-2204
artifact_paths:
- "filebeat/build/*.xml"
- "filebeat/build/*.json"
Expand Down Expand Up @@ -131,12 +133,12 @@ steps:

- group: "Packaging"
key: "packaging"
if: build.env("BUILDKITE_PULL_REQUEST") != "false"
depends_on:
- "mandatory-tests"
- "extended-tests"
- "extended-tests-win"

steps:
- label: Package pipeline
- label: Mage Package
commands: ".buildkite/filebeat/scripts/package-step.sh | buildkite-agent pipeline upload"
if: build.env("BUILDKITE_PULL_REQUEST") != "false" || build.env("ONLY_DOCS") == false
5 changes: 3 additions & 2 deletions .buildkite/filebeat/scripts/package-step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ if are_files_changed "$changeset"; then
- github_commit_status:
context: "Filebeat/Packaging: Linux X86"
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
provider: gcp
imageProject: elastic-images-qa
image: family/platform-ingest-eng-prod-base-ubuntu-2204
- label: ":linux: Packaging Linux ARM"
key: "package-linux-arm"
Expand Down
2 changes: 0 additions & 2 deletions .buildkite/filebeat/scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ set -euo pipefail

source .buildkite/env-scripts/linux-env.sh

echo ":: Evaluate Filebeat Changes ::"

echo ":: Start Packaging ::"
cd filebeat
umask 0022
Expand Down

0 comments on commit 0f2dc0c

Please sign in to comment.