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"
|
||||
commands:
|
||||
- "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:
|
||||
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
|
||||
os: "linux"
|
||||
|
|
|
@ -13,20 +13,24 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
|
||||
if __name__ == '__main__':
|
||||
print("""
|
||||
steps:
|
||||
script_branch = os.getenv("PREMERGE_SCRIPTS_BRANCH", "master")
|
||||
queue = os.getenv("BUILDKITE_AGENT_META_DATA_QUEUE", "default")
|
||||
print(f"""
|
||||
steps:
|
||||
- label: "build"
|
||||
commands:
|
||||
- "git clone --depth 1 --branch master https://github.com/google/llvm-premerge-checks.git"
|
||||
- "git clone --depth 1 --branch '{script_branch}' https://github.com/google/llvm-premerge-checks.git"
|
||||
- "llvm-premerge-checks/scripts/run_buildkite.sh"
|
||||
agents:
|
||||
queue: "local"
|
||||
queue: "{queue}"
|
||||
os: "linux"
|
||||
- label: "parallel step"
|
||||
commands:
|
||||
- "echo do nothing"
|
||||
agents:
|
||||
queue: "local"
|
||||
queue: "{queue}"
|
||||
os: "linux"
|
||||
""")
|
||||
|
|
Loading…
Reference in a new issue