forked from gratian/nile
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathkas-container
More file actions
executable file
·29 lines (24 loc) · 1.24 KB
/
kas-container
File metadata and controls
executable file
·29 lines (24 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
#
# Wrapper for the upstream kas-container script, which we leave unmodified
# (to make updates easier) as scripts/kas-container.
#
# This script overrides some of the default values for the kas-container
# script to make manual builds easier.
script_root_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
# Use our build container.
export KAS_CONTAINER_IMAGE="build-nile:latest"
# Set the work directory to the repository root, unless otherwise overridden.
export KAS_WORK_DIR="${KAS_WORK_DIR:-$script_root_dir}"
# Set the inner work dir to be the same path as it exists outside the container,
# so that uninative binaries can be run outside of the container environment.
export KAS_INNER_WORK_DIR="${KAS_WORK_DIR}"
export KAS_BUILD_DIR="${KAS_BUILD_DIR:-$KAS_WORK_DIR/build}"
# If the user has AZDO_TOKEN/GITHUB_TOKEN set in their environment, use
# those. kas does have 'CI_SERVER_HOST' and 'CI_JOB_TOKEN' variables, but
# you only get to pick one, whereas we have on occasion dealt with needing
# to authenticate against both GitHub and Azure DevOps.
${script_root_dir}/scripts/init-netrc "${KAS_BUILD_DIR}/netrc"
export NETRC_FILE="${KAS_BUILD_DIR}/netrc"
# forward on to real kas-container script
exec ${script_root_dir}/scripts/kas-container "$@"