Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
env:
KBN_ES_SNAPSHOT_USE_CACHED: 'true'

steps:
- command: .buildkite/scripts/steps/build_kibana.sh
label: Build Kibana Distribution
Expand Down
6 changes: 5 additions & 1 deletion src/platform/packages/shared/kbn-es/src/artifact.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ const createCachedArtifact = ({ contents, etag = 'etag' }) => {
};

const previousEnvVars = {};
const ENV_VARS_TO_RESET = ['ES_SNAPSHOT_MANIFEST', 'KBN_ES_SNAPSHOT_USE_UNVERIFIED'];
const ENV_VARS_TO_RESET = [
'ES_SNAPSHOT_MANIFEST',
'KBN_ES_SNAPSHOT_USE_UNVERIFIED',
'KBN_ES_SNAPSHOT_USE_CACHED',
];

beforeAll(() => {
ENV_VARS_TO_RESET.forEach((key) => {
Expand Down
2 changes: 1 addition & 1 deletion src/platform/packages/shared/kbn-es/src/artifact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export class Artifact {
const cacheMeta = cache.readMeta(dest);
const tmpPath = `${dest}.tmp`;

if (useCached) {
if (useCached || process.env.KBN_ES_SNAPSHOT_USE_CACHED === 'true') {
if (cacheMeta.exists) {
this.log.info(
'use-cached passed, forcing to use existing snapshot',
Expand Down
Loading