Skip to content

Commit

Permalink
changed ps1 script paths
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed Mar 19, 2024
1 parent 0423732 commit ac6639c
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .buildkite/auditbeat/auditbeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ steps:
- "auditbeat/build/*.json"

- label: ":windows:-{{matrix.image}} Unit Tests"
command: ".buildkite/auditbeat/scripts/unit-tests-win.ps1"
command: ".buildkite/scripts/win_unit_tests.ps1"
notify:
- github_commit_status:
context: "Auditbeat: windows/Unit Tests"
Expand Down Expand Up @@ -120,7 +120,7 @@ steps:
steps:
- label: ":windows: Win 2019 Unit Tests"
key: "win-extended-2019"
command: ".buildkite/auditbeat/scripts/unit-tests-win.ps1"
command: ".buildkite/scripts/win_unit_tests.ps1"
notify:
- github_commit_status:
context: "Auditbeat/Extended: Win-2019 Unit Tests"
Expand Down
2 changes: 2 additions & 0 deletions .buildkite/env-scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ XPACK_MODULE_PATTERN="^x-pack\\/[a-z0-9]+beat\\/module\\/([^\\/]+)\\/.*"
SETUP_GVM_VERSION="v0.5.1"
ASDF_MAGE_VERSION="1.14.0"
SETUP_MAGE_VERSION="1.14.0"
SETUP_WIN_PYTHON_VERSION="3.11.0"

# Docker & DockerHub
DOCKER_COMPOSE_VERSION="1.21.0"
Expand All @@ -44,6 +45,7 @@ export XPACK_MODULE_PATTERN
export SETUP_GVM_VERSION
export ASDF_MAGE_VERSION
export SETUP_MAGE_VERSION
export SETUP_WIN_PYTHON_VERSION

export DOCKER_COMPOSE_VERSION
export DOCKER_REGISTRY
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/filebeat/filebeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ steps:
- "filebeat/build/*.json"

- label: ":windows:-{{matrix.image}} Unit Tests"
command: ".buildkite/filebeat/scripts/unit-tests-win.ps1"
command: ".buildkite/scripts/win_unit_tests.ps1"
notify:
- github_commit_status:
context: "Filebeat: windows/Unit Tests"
Expand Down Expand Up @@ -120,7 +120,7 @@ steps:
steps:
- label: ":windows: Win 2019 Unit Tests"
key: "win-extended-2019"
command: ".buildkite/filebeat/scripts/unit-tests-win.ps1"
command: ".buildkite/scripts/win_unit_tests.ps1"
notify:
- github_commit_status:
context: "Filebeat/Extended: Win-2019 Unit Tests"
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/heartbeat/heartbeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ steps:

- label: ":windows: Unit Tests / {{matrix.image}}"
command:
- ".buildkite/heartbeat/scripts/unit-tests-win.ps1"
- ".buildkite/scripts/win_unit_tests.ps1"
notify:
- github_commit_status:
context: "Heartbeat: windows/Unit Tests"
Expand Down Expand Up @@ -126,7 +126,7 @@ steps:
steps:
- label: ":windows: Win 2019 Unit Tests"
key: "win-extended-2019"
command: ".buildkite/heartbeat/scripts/unit-tests-win.ps1"
command: ".buildkite/scripts/win_unit_tests.ps1"
notify:
- github_commit_status:
context: "Heartbeat/Extended: Win-2019 Unit Tests"
Expand Down
12 changes: 7 additions & 5 deletions .buildkite/hooks/post-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ checkout_merge() {
local merge_branch=$3

if [[ -z "${target_branch}" ]]; then
echo "No pull request target branch"
echo "--- No pull request target branch"
exit 1
fi

Expand All @@ -24,18 +24,20 @@ checkout_merge() {
git config user.name "github-merged-pr-post-checkout"
git config user.email "auto-merge@buildkite"

git merge --no-edit "${BUILDKITE_COMMIT}" || {
git merge --no-edit "${pr_commit}" || {
local merge_result=$?
echo "Merge failed: ${merge_result}"
echo "--- Merge failed: ${merge_result}"
git merge --abort
exit ${merge_result}
}

git reset --hard "${pr_commit}"
}

pull_request="${BUILDKITE_PULL_REQUEST:-false}"

if [[ "${pull_request}" == "false" ]]; then
echo "Not a pull request, skipping"
echo "--- Not a pull request, skipping"
exit 0
fi

Expand All @@ -46,7 +48,7 @@ MERGE_BRANCH="pr_merge_${PR_ID}"

checkout_merge "${TARGET_BRANCH}" "${PR_COMMIT}" "${MERGE_BRANCH}"

echo "Commit information"
echo "--- Commit information"
git --no-pager log --format=%B -n 1

# Ensure buildkite groups are rendered
Expand Down
5 changes: 2 additions & 3 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ retry() {

if [[ "$BUILDKITE_PIPELINE_SLUG" == "filebeat" || "$BUILDKITE_PIPELINE_SLUG" == "auditbeat" || "$BUILDKITE_PIPELINE_SLUG" == "heartbeat" || "$BUILDKITE_PIPELINE_SLUG" == "deploy-k8s" ]]; then
source .buildkite/env-scripts/env.sh
source .buildkite/env-scripts/win-env.sh
source .buildkite/env-scripts/util.sh

if [[ -z "${GOLANG_VERSION-""}" ]]; then
export GOLANG_VERSION=$(cat "${WORKSPACE}/.go-version")
if [[ -z "${GO_VERSION-""}" ]]; then
export GO_VERSION=$(cat "${WORKSPACE}/.go-version")
fi

if [[ "$BUILDKITE_STEP_KEY" == macos* ]]; then
Expand Down

0 comments on commit ac6639c

Please sign in to comment.