use env variables
This commit is contained in:
parent
1a3952afc4
commit
39667898a7
2 changed files with 21 additions and 17 deletions
|
@ -18,7 +18,7 @@ steps:
|
||||||
- label: "bootstrap"
|
- label: "bootstrap"
|
||||||
commands:
|
commands:
|
||||||
- "git clone --depth 1 --branch \"${PREMERGE_SCRIPTS_BRANCH}\" https://github.com/google/llvm-premerge-checks.git"
|
- "git clone --depth 1 --branch \"${PREMERGE_SCRIPTS_BRANCH}\" https://github.com/google/llvm-premerge-checks.git"
|
||||||
- "llvm-premerge-checks/scripts/buildkite/create_pipeline.py | buildkite-agent pipeline upload"
|
- "llvm-premerge-checks/scripts/buildkite/create_pipeline.py | tee /dev/tty | buildkite-agent pipeline upload"
|
||||||
agents:
|
agents:
|
||||||
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
|
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
|
||||||
os: "linux"
|
os: "linux"
|
||||||
|
|
|
@ -13,20 +13,24 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print("""
|
script_branch = os.getenv("PREMERGE_SCRIPTS_BRANCH", "master")
|
||||||
steps:
|
queue = os.getenv("BUILDKITE_AGENT_META_DATA_QUEUE", "default")
|
||||||
- label: "build"
|
print(f"""
|
||||||
commands:
|
steps:
|
||||||
- "git clone --depth 1 --branch master https://github.com/google/llvm-premerge-checks.git"
|
- label: "build"
|
||||||
- "llvm-premerge-checks/scripts/run_buildkite.sh"
|
commands:
|
||||||
agents:
|
- "git clone --depth 1 --branch '{script_branch}' https://github.com/google/llvm-premerge-checks.git"
|
||||||
queue: "local"
|
- "llvm-premerge-checks/scripts/run_buildkite.sh"
|
||||||
os: "linux"
|
agents:
|
||||||
- label: "parallel step"
|
queue: "{queue}"
|
||||||
commands:
|
os: "linux"
|
||||||
- "echo do nothing"
|
- label: "parallel step"
|
||||||
agents:
|
commands:
|
||||||
queue: "local"
|
- "echo do nothing"
|
||||||
os: "linux"
|
agents:
|
||||||
""")
|
queue: "{queue}"
|
||||||
|
os: "linux"
|
||||||
|
""")
|
||||||
|
|
Loading…
Reference in a new issue