Skip to content

Commit 277ad39

Browse files
committed
bk: test go-cache-plugin
1 parent dcdcf42 commit 277ad39

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

.buildkite/pipeline.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ env:
1212
IMAGE_WIN_10: "platform-ingest-elastic-agent-windows-10-1757120457"
1313
IMAGE_WIN_11: "platform-ingest-elastic-agent-windows-11-1757120457"
1414

15+
common:
16+
- aws_oidc: &aws_oidc
17+
# See https://github.com/elastic/oblt-infra/blob/main/conf/resources/repos/elastic-agent/01-aws-buildkite-oidc.tf
18+
elastic/oblt-aws-auth#v0.2.0:
19+
1520
steps:
1621
- label: "check-ci"
1722
key: "check-ci"
@@ -37,6 +42,8 @@ steps:
3742
agents:
3843
provider: "gcp"
3944
image: "${IMAGE_UBUNTU_2204_X86_64}"
45+
plugins:
46+
- *aws_oidc
4047
retry:
4148
automatic:
4249
limit: 1

.buildkite/scripts/steps/unit-tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
source .buildkite/scripts/common.sh
33
set +euo pipefail
44

5+
echo "--- Install dependencies"
6+
# See https://github.com/tailscale/go-cache-plugin
7+
make install-go-cache-plugin
8+
export GOCACHEPROG="go-cache-plugin --cache-dir=/tmp/gocache --bucket=elastic-agent-ci-go-cache"
9+
export GOEXPERIMENT=cacheprog
10+
511
echo "--- Unit tests"
612
RACE_DETECTOR=true TEST_COVERAGE=true mage unitTest
713
TESTS_EXIT_STATUS=$?

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ mage:
1111
@go install github.com/magefile/mage
1212
@-mage -clean
1313

14+
## install-go-cache-plugin : Install go-cache-plugin
15+
.PHONY: install-go-cache-plugin
16+
install-go-cache-plugin:
17+
@echo Installing go-cache-plugin
18+
go install github.com/tailscale/go-cache-plugin/cmd/go-cache-plugin@latest
19+
@-go-cache-plugin help
1420

1521
## install-gotestsum : Install gotestsum
1622
.PHONY: install-gotestsum

0 commit comments

Comments
 (0)