[Ops] Create CLI for rewriting buildkite agent targeting rules (#174688)

## Summary
Creates a CLI script to rewrite buildkite agent targeting rules to the
ones we need to use with the Elastic-wide buildkite agents.

This version tries to map all fittable fields from
https://github.com/elastic/kibana-buildkite/blob/main/agents.json to
0df8430357/docs/gobld/providers.mdx (L96)

Based on: #171317 (demonstrated here:
ca0f455456)
Part of: https://github.com/elastic/kibana-operations/issues/15
This commit is contained in:
Alex Szabo 2024-01-18 10:29:08 +01:00 committed by GitHub
parent 423873b509
commit 7aff1f788f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 231 additions and 0 deletions

View file

@ -0,0 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
require('../src/setup_node_env');
require('../src/dev/buildkite_migration/rewrite_buildkite_agent_rules');