1
0
Fork 0

use env variables

This commit is contained in:
Mikhail Goncharov 2020-04-24 15:43:09 +02:00
parent 1a3952afc4
commit 39667898a7
2 changed files with 21 additions and 17 deletions

View file

@ -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"

View file

@ -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:
- label: "build"
commands:
- "git clone --depth 1 --branch master https://github.com/google/llvm-premerge-checks.git"
- "llvm-premerge-checks/scripts/run_buildkite.sh"
agents:
queue: "local"
os: "linux"
- label: "parallel step"
commands:
- "echo do nothing"
agents:
queue: "local"
os: "linux"
""")
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 '{script_branch}' https://github.com/google/llvm-premerge-checks.git"
- "llvm-premerge-checks/scripts/run_buildkite.sh"
agents:
queue: "{queue}"
os: "linux"
- label: "parallel step"
commands:
- "echo do nothing"
agents:
queue: "{queue}"
os: "linux"
""")