Skip to content

Commit

Permalink
Merge branch 'main' into chore-150429/remove-usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nnacin authored Feb 13, 2023
2 parents d7b4e6d + 7d8ccd6 commit e8a6721
Show file tree
Hide file tree
Showing 42 changed files with 727 additions and 227 deletions.
5 changes: 4 additions & 1 deletion .buildkite/scripts/steps/artifacts/docker_image_trigger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@

set -euo pipefail

ts-node .buildkite/scripts/steps/trigger_pipeline.ts kibana-artifacts-container-image "$BUILDKITE_BRANCH" "$BUILDKITE_COMMIT"
if [[ "$BUILDKITE_BRANCH" == "main" ]]; then
echo "--- Trigger artifacts container image pipeline"
ts-node .buildkite/scripts/steps/trigger_pipeline.ts kibana-artifacts-container-image "$BUILDKITE_BRANCH" "$BUILDKITE_COMMIT"
fi
18 changes: 16 additions & 2 deletions src/dev/build/lib/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ const versionInfo = jest.requireMock('./version_info').getVersionInfo();

expect.addSnapshotSerializer(createAbsolutePathSerializer());

const setup = async ({ targetAllPlatforms = true }: { targetAllPlatforms?: boolean } = {}) => {
const setup = async ({
targetAllPlatforms = true,
isRelease = true,
}: { targetAllPlatforms?: boolean; isRelease?: boolean } = {}) => {
return await Config.create({
isRelease: true,
isRelease,
targetAllPlatforms,
dockerContextUseLocalArtifact: false,
dockerCrossCompile: false,
Expand Down Expand Up @@ -192,6 +195,17 @@ describe('#getBuildSha()', () => {
});
});

describe('#isRelease()', () => {
it('returns true when marked as a release', async () => {
const config = await setup({ isRelease: true });
expect(config.isRelease).toBe(true);
});
it('returns false when not marked as a release', async () => {
const config = await setup({ isRelease: false });
expect(config.isRelease).toBe(false);
});
});

describe('#resolveFromTarget()', () => {
it('resolves a relative path, from the target directory', async () => {
const config = await setup();
Expand Down
2 changes: 1 addition & 1 deletion src/dev/build/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ export class Config {
private readonly dockerTag: string | null,
private readonly dockerTagQualifier: string | null,
private readonly dockerPush: boolean,
public readonly downloadFreshNode: boolean,
public readonly isRelease: boolean,
public readonly downloadFreshNode: boolean,
public readonly pluginSelector: PluginSelector
) {
this.pluginFilter = getPluginPackagesFilter(this.pluginSelector);
Expand Down
Loading

0 comments on commit e8a6721

Please sign in to comment.